public virtual void RemoveEditor(IInputEditor editor) { if (editor == null || this.editor != editor) { return; } RadItem editorElement = this.GetEditorElement((IValueEditor)editor); if (editorElement != null && this.ContentElement.Children.Contains((RadElement)editorElement)) { this.ContentElement.Children.Remove((RadElement)editorElement); } this.editor = (IInputEditor)null; this.Synchronize(); }
public virtual void RemoveEditor(IInputEditor editor) { if (editor != null && this.editor == editor) { RadItem element = GetEditorElement(editor); if (element != null && this.ContentElement.Children.Contains(element)) { this.ContentElement.Children.Remove(element); } this.editor = null; this.Synchronize(); } }
public virtual void AddEditor(IInputEditor editor) { if (editor != null && this.editor != editor) { this.editor = editor; this.editorElement = GetEditorElement(editor); if (this.editorElement != null && !this.valueElement.Children.Contains(this.editorElement)) { this.valueElement.Children.Add(this.editorElement); SetValue(IsInEditModeProperty, true); this.Synchronize(); this.UpdateLayout(); } } }
public virtual void AddEditor(IInputEditor editor) { if (editor == null || this.editor == editor) { return; } this.editor = editor; this.editorElement = this.GetEditorElement((IValueEditor)editor); if (this.editorElement == null || this.Children.Contains((RadElement)this.editorElement)) { return; } this.Children.Add((RadElement)this.editorElement); this.Synchronize(); this.UpdateLayout(); }
public SPFInputEditor(IInputEditor <SingleTrajectoryInput> editor) { InitializeComponent(); shortcutSetFactoryComboBox.DataSource = shortcutSetFactories; shortcutSetFactoryComboBox.SelectedItem = shortcutSetFactories[0]; shortcutSetFactoryComboBox.Format += (o, e) => e.Value = ((ShortcutSetFactory)e.Value).Name; errorUpDown.Maximum = decimal.MaxValue; sourceIndexUpDown.Maximum = decimal.MaxValue; targetIndexUpdown.Maximum = decimal.MaxValue; trajectoryEditor = new SimpleInputEditor <SingleTrajectoryInput>(editor); splitContainer1.Panel2.Fill(trajectoryEditor); Name = trajectoryEditor.Name; }
public virtual void RemoveEditor(IInputEditor editor) { if (editor != null && this.editor == editor) { this.editorElement = GetEditorElement(editor); if (this.editorElement != null && this.valueElement.Children.Contains(this.editorElement)) { this.valueElement.Children.Remove(this.editorElement); this.editorElement = null; } this.editor = null; SetValue(IsInEditModeProperty, false); this.Synchronize(); } }
public virtual void RemoveEditor(IInputEditor editor) { if (editor == null || this.editor != editor) { return; } this.editorElement = this.GetEditorElement((IValueEditor)editor); if (this.editorElement != null && this.valueElement.Children.Contains((RadElement)this.editorElement)) { this.valueElement.Children.Remove((RadElement)this.editorElement); this.editorElement = (RadItem)null; } this.editor = (IInputEditor)null; int num = (int)this.SetValue(PropertyGridItemElement.IsInEditModeProperty, (object)false); this.Synchronize(); }
public override void RemoveEditor(IInputEditor editor) { if (this.EditingElement == null || this.EditingElement.Editor == null) { return; } this.RemoveEditorItems(); this.EditingElement.RemoveEditor(); this.EditingElement = (DataFilterEditorElement)null; if (this.Data == null) { return; } this.Data.RootNode.TreeViewElement.ViewElement.UpdateItems(); this.UpdateLayout(); this.Synchronize(); }
public virtual void AddEditor(IInputEditor editor) { if (editor == null || this.editor == editor) { return; } this.editor = editor; RadItem editorElement = this.GetEditorElement((IValueEditor)editor); if (editorElement == null || this.Children.Contains((RadElement)editorElement)) { return; } this.Children.Add((RadElement)editorElement); this.Data.Owner.ViewElement.ViewElement.UpdateItems(); this.UpdateLayout(); }
public virtual void AddEditor(IInputEditor editor) { if (editor != null && this.editor != editor) { this.editor = editor; RadItem element = GetEditorElement(editor); if (element != null && !this.ContentElement.Children.Contains(element)) { this.ContentElement.Children.Add(element); //this.ContentElement.Text = ""; //this.ContentElement.Image = null; this.TreeViewElement.ViewElement.UpdateItems(); this.UpdateLayout(); } } }
public override void InitializeEditor(IInputEditor editor) { GridSpinEditor gridSpinEditor = editor as GridSpinEditor; if (gridSpinEditor == null) { return; } RadSpinElement editorElement = (RadSpinElement)gridSpinEditor.EditorElement; editorElement.DecimalPlaces = GridViewHelper.IsInteger(this.DataType) || GridViewHelper.IsIntegerSql(this.DataType) ? 0 : this.DecimalPlaces; gridSpinEditor.ValueType = this.DataType; editorElement.ShowUpDownButtons = this.ShowUpDownButtons; editorElement.Step = this.Step; editorElement.MinValue = this.Minimum; editorElement.MaxValue = this.Maximum; editorElement.ThousandsSeparator = this.ThousandsSeparator; }
public virtual void AddEditor(IInputEditor editor) { if (editor == null || this.editor == editor) { return; } this.editor = editor; this.editorElement = this.GetEditorElement((IValueEditor)editor); if (this.editorElement == null || this.valueElement.Children.Contains((RadElement)this.editorElement)) { return; } this.valueElement.Children.Add((RadElement)this.editorElement); int num = (int)this.SetValue(PropertyGridItemElement.IsInEditModeProperty, (object)true); this.Synchronize(); this.UpdateLayout(); }
public virtual IInputEditor GetDefaultEditor(IEditorProvider provider) { if (provider == null) { return((IInputEditor)null); } EditorRequiredEventArgs args = new EditorRequiredEventArgs(provider.GetDefaultEditorType()); this.gridViewElement.Template.EventDispatcher.RaiseEvent <EditorRequiredEventArgs>(EventDispatcher.EditorRequired, (object)this, args); bool flag = this.IsPermanentEditor(args.EditorType); if ((object)args.EditorType == null || flag) { return((IInputEditor)null); } if (args.Editor is IInputEditor) { IInputEditor editor = args.Editor as IInputEditor; editor.EditorManager = (IEditorManager)this; return(editor); } IInputEditor editor1 = (IInputEditor)null; if (!this.cachedEditors.TryGetValue(args.EditorType, out editor1)) { editor1 = Activator.CreateInstance(args.EditorType) as IInputEditor; } else { RadItem editorElement = this.GetEditorElement(editor1); if (editorElement != null && editorElement.IsDisposed) { this.cachedEditors.Remove(args.EditorType); editor1 = Activator.CreateInstance(args.EditorType) as IInputEditor; } } if (editor1 != null && !this.cachedEditors.ContainsValue(editor1)) { this.cachedEditors.Add(args.EditorType, editor1); } editor1.EditorManager = (IEditorManager)this; return(editor1); }
public virtual void RemoveEditor(IInputEditor editor) { GridViewEditManager gridViewEditManager = (GridViewEditManager)null; if (this.GridViewElement != null) { gridViewEditManager = this.GridViewElement.EditorManager; } if (gridViewEditManager == null || editor != null && !gridViewEditManager.IsPermanentEditor(editor.GetType())) { RadItem editorElement = this.GetEditorElement(editor); if (editorElement != null && this.Children.Contains((RadElement)editorElement)) { this.Children.Remove((RadElement)editorElement); } this.editor = (IInputEditor)null; this.SetContent(); } int num = (int)this.SetValue(GridDataCellElement.IsInEditModeProperty, (object)false); }
public virtual void AddEditor(IInputEditor editor) { GridViewEditManager editorManager = this.GridViewElement.EditorManager; if (editor != null && this.editor != editor && !editorManager.IsPermanentEditor(editor.GetType())) { this.editor = editor; RadItem editorElement = this.GetEditorElement(this.editor); if (editorElement != null && !this.Children.Contains((RadElement)editorElement)) { int num = (int)editorElement.SetDefaultValueOverride(VisualElement.ForeColorProperty, (object)Color.FromKnownColor(KnownColor.ControlText)); this.Children.Add((RadElement)editorElement); BaseGridEditor baseGridEditor = editor as BaseGridEditor; if (baseGridEditor != null && baseGridEditor.ClearCellText) { this.Text = string.Empty; } } } int num1 = (int)this.SetValue(GridDataCellElement.IsInEditModeProperty, (object)true); }
public RadItem GetEditorElement(IInputEditor editor) { RadItem radItem = editor as RadItem; if (radItem == null) { BaseGridEditor baseGridEditor = editor as BaseGridEditor; if (baseGridEditor != null) { radItem = baseGridEditor.EditorElement as RadItem; } else { BaseInputEditor baseInputEditor = editor as BaseInputEditor; if (baseInputEditor != null) { radItem = baseInputEditor.EditorElement as RadItem; } } } return(radItem); }
public override void InitializeEditor(IInputEditor editor) { RadDateTimeEditor radDateTimeEditor = editor as RadDateTimeEditor; if (radDateTimeEditor != null) { RadDateTimePickerElement editorElement = (RadDateTimePickerElement)radDateTimeEditor.EditorElement; editorElement.Format = this.Format; editorElement.CustomFormat = this.CustomFormat; editorElement.Culture = this.FormatInfo; editorElement.ShowUpDown = this.EditorType == GridViewDateTimeEditorType.DateTimePickerSpinMode; } GridTimePickerEditor timePickerEditor = editor as GridTimePickerEditor; if (timePickerEditor == null) { return; } RadTimePickerElement editorElement1 = timePickerEditor.EditorElement as RadTimePickerElement; editorElement1.Format = this.Format != DateTimePickerFormat.Custom ? this.FormatString : this.CustomFormat; editorElement1.Culture = this.FormatInfo; }
public virtual void AddEditor(IInputEditor editor) { if (editor == null || this.editor == editor) { return; } this.editor = editor; RadItem editorElement = this.GetEditorElement(this.editor); if (editorElement == null || this.Children.Contains((RadElement)editorElement)) { return; } int num = (int)editorElement.SetDefaultValueOverride(VisualElement.ForeColorProperty, (object)Color.FromKnownColor(KnownColor.ControlText)); this.Children.Add((RadElement)editorElement); BaseVirtualGridEditor virtualGridEditor = editor as BaseVirtualGridEditor; if (virtualGridEditor == null || !virtualGridEditor.ClearCellText) { return; } this.Text = string.Empty; }
public override void AddEditor(IInputEditor editor) { this.colorBox.Visibility = ElementVisibility.Collapsed; base.AddEditor(editor); }
/// <summary> /// Initializes <see cref="EditorRequiredEventArgs"/> setting the required editor type. /// The IInputEditor property is initialized by GridViewEditManager prior to event call, /// if default implementation is available. /// </summary> /// <param name="editorType">The type of the editor required.</param> /// <param name="defaultEditor">IInputEditor instance if available.</param> internal EditorRequiredEventArgs(Type editorType, IInputEditor defaultEditor) { this.EditorType = editorType; this.Editor = defaultEditor; }
public override void RemoveEditor(IInputEditor editor) { editor.ValueChanged -= new EventHandler(this.editor_ValueChanged); base.RemoveEditor(editor); }
public GanttViewItemEditorInitializedEventArgs(GanttViewDataItem item, IInputEditor editor) : base(item) { this.editor = editor; }
protected void AddSimpleInputEditor(IInputEditor <TIn> inputEditor) { InputEditors.Add(new SimpleInputEditor <TIn>(inputEditor)); }
public override void RemoveEditor(IInputEditor editor) { base.RemoveEditor(editor); this.colorBox.Visibility = ElementVisibility.Visible; }
public GanttViewItemEditedEventArgs(GanttViewDataItem item, IInputEditor editor, bool commit) : base(item) { this.editor = editor; this.commit = commit; }
internal override void AddEditor(IInputEditor editor) { }
public override void InitializeEditor(IInputEditor editor) { }
public override void RemoveEditor(IInputEditor editor) { }
public override void AddEditor(IInputEditor editor) { }
public RadPageViewEditorEventArgs(RadPageViewPage page, IInputEditor activeEditor) : base(page) { this.activeEditor = activeEditor; }