protected internal virtual void OnItemInitializing(object sender, ItemInitializingEventArgs e) { ItemInitializingEventHandler itemInitializing = this.ItemInitializing; if (itemInitializing == null) { return; } itemInitializing((object)this, e); }
protected virtual bool GenerateControlsRunTime( int currentColumn, KeyValuePair <string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation) { RadPanel radPanel = new RadPanel(); RadLabel labelControl = new RadLabel(); RadLabel validationControl = new RadLabel(); Control editorControl = pair.Value; string str = this.DataEntryControl.ThemeName; if (string.IsNullOrEmpty(str)) { str = ThemeResolutionService.ApplicationThemeName; } radPanel.ThemeName = str; labelControl.ThemeName = str; validationControl.ThemeName = str; if (editorControl is RadControl) { (editorControl as RadControl).ThemeName = str; } this.SetupInnerControls(pair, propertyItemControlSize, propertyItemControlLocation, radPanel, labelControl, validationControl, editorControl); radPanel.Controls.Add(editorControl); radPanel.Controls.Add((Control)labelControl); radPanel.Controls.Add((Control)validationControl); ItemInitializingEventArgs e = new ItemInitializingEventArgs(radPanel); this.OnItemInitializing((object)this, e); if (e.Cancel) { return(false); } this.DataEntryControl.PanelContainer.Controls.Add((Control)radPanel); this.OnItemInitialized((object)this, new ItemInitializedEventArgs(radPanel)); this.allReadyGeneratedProperties.Add(pair.Key, editorControl); if (this.controlsInEachColumn.ContainsKey(currentColumn)) { this.controlsInEachColumn[currentColumn].Add(labelControl); } else { this.controlsInEachColumn.Add(currentColumn, new List <RadLabel>() { labelControl }); } this.validationInfoForEachEditor[editorControl].Label = labelControl; this.validationInfoForEachEditor[editorControl].ValidationLabel = validationControl; return(true); }
protected virtual void GenerateControlsDesignTime( int currentColumn, KeyValuePair <string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation) { IComponent component1 = this.designerHost.CreateComponent(typeof(RadPanel)); IComponent component2 = this.designerHost.CreateComponent(typeof(RadLabel)); IComponent component3 = this.designerHost.CreateComponent(typeof(RadLabel)); RadPanel radPanel = (RadPanel)component1; RadLabel labelControl = (RadLabel)component2; RadLabel validationControl = (RadLabel)component3; this.SetupInnerControls(pair, propertyItemControlSize, propertyItemControlLocation, radPanel, labelControl, validationControl, pair.Value); this.changeService.OnComponentChanging((object)this.DataEntryControl.Site.Component, (MemberDescriptor)null); radPanel.SuspendLayout(); radPanel.Controls.Add(pair.Value); radPanel.Controls.Add((Control)labelControl); radPanel.Controls.Add((Control)validationControl); ItemInitializingEventArgs e = new ItemInitializingEventArgs(radPanel); this.OnItemInitializing((object)this, e); if (e.Cancel) { return; } this.DataEntryControl.PanelContainer.Controls.Add((Control)radPanel); this.OnItemInitialized((object)this, new ItemInitializedEventArgs(radPanel)); this.changeService.OnComponentChanged((object)this.DataEntryControl.Site.Component, (MemberDescriptor)null, (object)null, (object)null); this.allReadyGeneratedProperties.Add(pair.Key, pair.Value); if (this.controlsInEachColumn.ContainsKey(currentColumn)) { this.controlsInEachColumn[currentColumn].Add(labelControl); } else { this.controlsInEachColumn.Add(currentColumn, new List <RadLabel>() { labelControl }); } radPanel.ResumeLayout(true); this.validationInfoForEachEditor[pair.Value].Label = labelControl; this.validationInfoForEachEditor[pair.Value].ValidationLabel = validationControl; }
private void DataEntryElement_ItemInitializing(object sender, ItemInitializingEventArgs e) { this.OnItemInitializing((object)this, e); }