public NodeIcon AddIconControl(string dataPropertyName) { iconControl = new NodeIcon(); iconControl.LeftMargin = 1; iconControl.ParentColumn = null; iconControl.ScaleMode = ImageScaleMode.Clip; AddNodeControl(dataPropertyName, iconControl); return iconControl; }
/// <summary> /// Constructor that initializes the model with the given objects /// </summary> /// <param name="TreeView">The TreeViewAdv control this model belongs to</param> /// <param name="GrtTree">The GRT tree this model belongs to</param> /// <param name="NodeStateIcon">The NodeStateIcon NodeControl that displays the icon</param> public DbMysqlTableColumnsListModel(IModelChangeListener listener, TreeViewAdv tree, MySQLTableColumnsListWrapper grtList, NodeIcon columnIconNodeControl, AdvNodeTextBox nameNodeControl, AdvNodeComboBox datatypeComboBoxNodeControl, NodeCheckBox pkNodeControl, NodeCheckBox nnNodeControl, NodeCheckBox uqNodeControl, NodeCheckBox binNodeControl, NodeCheckBox unNodeControl, NodeCheckBox zfNodeControl, NodeCheckBox aiNodeControl, NodeCheckBox gNodeControl, AdvNodeTextBox defaultNodeControl, MySQLTableEditorWrapper wrapper) : base(tree, grtList, columnIconNodeControl, true) { this.listener = listener; this.nameNodeControl = nameNodeControl; this.datatypeComboBoxNodeControl = datatypeComboBoxNodeControl; this.pkNodeControl = pkNodeControl; this.nnNodeControl = nnNodeControl; this.uqNodeControl = uqNodeControl; this.binNodeControl = binNodeControl; this.unNodeControl = unNodeControl; this.zfNodeControl = zfNodeControl; this.aiNodeControl = aiNodeControl; this.gNodeControl = gNodeControl; this.defaultNodeControl = defaultNodeControl; this.mySQLTableEditorWrapper = wrapper; // assign virtual value events for displaying and processing the edited value content nameNodeControl.EditorInitialize += new EditorInitializeEventHandler(EditorInitialize); nameNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); nameNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); datatypeComboBoxNodeControl.EditorInitialize += new EditorInitializeEventHandler(EditorInitialize); datatypeComboBoxNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); datatypeComboBoxNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); pkNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); pkNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); nnNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); nnNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); uqNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); uqNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); binNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); binNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); unNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); unNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); zfNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); zfNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); aiNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); aiNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); gNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); gNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); defaultNodeControl.EditorInitialize += new EditorInitializeEventHandler(EditorInitialize); defaultNodeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(ValueNeeded); defaultNodeControl.ValuePushed += new EventHandler<NodeControlValueEventArgs>(ValuePushed); }
public PluginTreeView() { var nodeCheckBox = new NodeCheckBox(); NodeControls.Add(nodeCheckBox); var nodeIcon = new NodeIcon { DataPropertyName = "Image", }; NodeControls.Add(nodeIcon); NodeControls.Add(new NodeTextBox()); }
public ProjectTreeView() { var nodeIcon = new NodeIcon {DataPropertyName = "Image", LeftMargin = 1, ParentColumn = null}; NodeControls.Add(nodeIcon); var nodeTextBox = new NodeTextBox { DataPropertyName = "Text", IncrementalSearchEnabled = true, EditEnabled = false, LeftMargin = 3, ParentColumn = null }; NodeControls.Add(nodeTextBox); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ComplexConcMorphDlg)); this.m_btnHelp = new System.Windows.Forms.Button(); this.m_btnCancel = new System.Windows.Forms.Button(); this.m_btnOK = new System.Windows.Forms.Button(); this.m_helpProvider = new System.Windows.Forms.HelpProvider(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.m_glossWsComboBox = new System.Windows.Forms.ComboBox(); this.m_glossTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.m_entryWsComboBox = new System.Windows.Forms.ComboBox(); this.m_entryTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.m_formWsComboBox = new System.Windows.Forms.ComboBox(); this.m_formTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.m_categoryNotCheckBox = new System.Windows.Forms.CheckBox(); this.m_categoryComboBox = new SIL.FieldWorks.Common.Widgets.TreeCombo(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.m_inflFeatsTreeView = new Aga.Controls.Tree.TreeViewAdv(); this.m_featureColumn = new Aga.Controls.Tree.TreeColumn(); this.m_notColumn = new Aga.Controls.Tree.TreeColumn(); this.m_valueColumn = new Aga.Controls.Tree.TreeColumn(); this.m_featureIcon = new Aga.Controls.Tree.NodeControls.NodeIcon(); this.m_featureTextBox = new Aga.Controls.Tree.NodeControls.NodeTextBox(); this.m_valueComboBox = new Aga.Controls.Tree.NodeControls.NodeComboBox(); this.m_inflNotCheckBox = new Aga.Controls.Tree.NodeControls.NodeCheckBox(); this.m_imageList = new System.Windows.Forms.ImageList(this.components); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_glossTextBox)).BeginInit(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_entryTextBox)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_formTextBox)).BeginInit(); this.groupBox4.SuspendLayout(); this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // m_btnHelp // resources.ApplyResources(this.m_btnHelp, "m_btnHelp"); this.m_btnHelp.Name = "m_btnHelp"; this.m_btnHelp.UseVisualStyleBackColor = true; this.m_btnHelp.Click += new System.EventHandler(this.m_btnHelp_Click); // // m_btnCancel // resources.ApplyResources(this.m_btnCancel, "m_btnCancel"); this.m_btnCancel.Name = "m_btnCancel"; this.m_btnCancel.UseVisualStyleBackColor = true; this.m_btnCancel.Click += new System.EventHandler(this.m_btnCancel_Click); // // m_btnOK // resources.ApplyResources(this.m_btnOK, "m_btnOK"); this.m_btnOK.Name = "m_btnOK"; this.m_btnOK.UseVisualStyleBackColor = true; this.m_btnOK.Click += new System.EventHandler(this.m_btnOK_Click); // // groupBox2 // this.groupBox2.Controls.Add(this.m_glossWsComboBox); this.groupBox2.Controls.Add(this.m_glossTextBox); resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Name = "groupBox2"; this.m_helpProvider.SetShowHelp(this.groupBox2, ((bool)(resources.GetObject("groupBox2.ShowHelp")))); this.groupBox2.TabStop = false; // // m_glossWsComboBox // this.m_glossWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_glossWsComboBox.FormattingEnabled = true; resources.ApplyResources(this.m_glossWsComboBox, "m_glossWsComboBox"); this.m_glossWsComboBox.Name = "m_glossWsComboBox"; this.m_helpProvider.SetShowHelp(this.m_glossWsComboBox, ((bool)(resources.GetObject("m_glossWsComboBox.ShowHelp")))); this.m_glossWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_glossWsComboBox_SelectedIndexChanged); // // m_glossTextBox // this.m_glossTextBox.AcceptsReturn = false; this.m_glossTextBox.AdjustStringHeight = true; this.m_glossTextBox.BackColor = System.Drawing.SystemColors.Window; this.m_glossTextBox.controlID = null; resources.ApplyResources(this.m_glossTextBox, "m_glossTextBox"); this.m_glossTextBox.HasBorder = true; this.m_glossTextBox.Name = "m_glossTextBox"; this.m_helpProvider.SetShowHelp(this.m_glossTextBox, ((bool)(resources.GetObject("m_glossTextBox.ShowHelp")))); this.m_glossTextBox.SuppressEnter = true; this.m_glossTextBox.WordWrap = false; // // groupBox3 // this.groupBox3.Controls.Add(this.m_entryWsComboBox); this.groupBox3.Controls.Add(this.m_entryTextBox); resources.ApplyResources(this.groupBox3, "groupBox3"); this.groupBox3.Name = "groupBox3"; this.m_helpProvider.SetShowHelp(this.groupBox3, ((bool)(resources.GetObject("groupBox3.ShowHelp")))); this.groupBox3.TabStop = false; // // m_entryWsComboBox // this.m_entryWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_entryWsComboBox.FormattingEnabled = true; resources.ApplyResources(this.m_entryWsComboBox, "m_entryWsComboBox"); this.m_entryWsComboBox.Name = "m_entryWsComboBox"; this.m_helpProvider.SetShowHelp(this.m_entryWsComboBox, ((bool)(resources.GetObject("m_entryWsComboBox.ShowHelp")))); this.m_entryWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_entryWsComboBox_SelectedIndexChanged); // // m_entryTextBox // this.m_entryTextBox.AcceptsReturn = false; this.m_entryTextBox.AdjustStringHeight = true; this.m_entryTextBox.BackColor = System.Drawing.SystemColors.Window; this.m_entryTextBox.controlID = null; resources.ApplyResources(this.m_entryTextBox, "m_entryTextBox"); this.m_entryTextBox.HasBorder = true; this.m_entryTextBox.Name = "m_entryTextBox"; this.m_helpProvider.SetShowHelp(this.m_entryTextBox, ((bool)(resources.GetObject("m_entryTextBox.ShowHelp")))); this.m_entryTextBox.SuppressEnter = true; this.m_entryTextBox.WordWrap = false; // // groupBox1 // this.groupBox1.Controls.Add(this.m_formWsComboBox); this.groupBox1.Controls.Add(this.m_formTextBox); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // // m_formWsComboBox // this.m_formWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_formWsComboBox.FormattingEnabled = true; resources.ApplyResources(this.m_formWsComboBox, "m_formWsComboBox"); this.m_formWsComboBox.Name = "m_formWsComboBox"; this.m_formWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_formWsComboBox_SelectedIndexChanged); // // m_formTextBox // this.m_formTextBox.AcceptsReturn = false; this.m_formTextBox.AdjustStringHeight = true; this.m_formTextBox.BackColor = System.Drawing.SystemColors.Window; this.m_formTextBox.controlID = null; resources.ApplyResources(this.m_formTextBox, "m_formTextBox"); this.m_formTextBox.HasBorder = true; this.m_formTextBox.Name = "m_formTextBox"; this.m_formTextBox.SuppressEnter = true; this.m_formTextBox.WordWrap = false; // // groupBox4 // this.groupBox4.Controls.Add(this.m_categoryNotCheckBox); this.groupBox4.Controls.Add(this.m_categoryComboBox); resources.ApplyResources(this.groupBox4, "groupBox4"); this.groupBox4.Name = "groupBox4"; this.groupBox4.TabStop = false; // // m_categoryNotCheckBox // resources.ApplyResources(this.m_categoryNotCheckBox, "m_categoryNotCheckBox"); this.m_categoryNotCheckBox.Name = "m_categoryNotCheckBox"; this.m_categoryNotCheckBox.UseVisualStyleBackColor = true; // // m_categoryComboBox // this.m_categoryComboBox.AdjustStringHeight = true; this.m_categoryComboBox.BackColor = System.Drawing.SystemColors.Window; this.m_categoryComboBox.DropDownWidth = 120; this.m_categoryComboBox.DroppedDown = false; this.m_categoryComboBox.HasBorder = true; resources.ApplyResources(this.m_categoryComboBox, "m_categoryComboBox"); this.m_categoryComboBox.Name = "m_categoryComboBox"; this.m_categoryComboBox.UseVisualStyleBackColor = true; // // groupBox5 // this.groupBox5.Controls.Add(this.m_inflFeatsTreeView); resources.ApplyResources(this.groupBox5, "groupBox5"); this.groupBox5.Name = "groupBox5"; this.groupBox5.TabStop = false; // // m_inflFeatsTreeView // this.m_inflFeatsTreeView.BackColor = System.Drawing.SystemColors.Window; this.m_inflFeatsTreeView.Columns.Add(this.m_featureColumn); this.m_inflFeatsTreeView.Columns.Add(this.m_notColumn); this.m_inflFeatsTreeView.Columns.Add(this.m_valueColumn); this.m_inflFeatsTreeView.DefaultToolTipProvider = null; this.m_inflFeatsTreeView.DragDropMarkColor = System.Drawing.Color.Black; this.m_inflFeatsTreeView.FullRowSelect = true; this.m_inflFeatsTreeView.LineColor = System.Drawing.SystemColors.ControlDark; resources.ApplyResources(this.m_inflFeatsTreeView, "m_inflFeatsTreeView"); this.m_inflFeatsTreeView.Model = null; this.m_inflFeatsTreeView.Name = "m_inflFeatsTreeView"; this.m_inflFeatsTreeView.NodeControls.Add(this.m_featureIcon); this.m_inflFeatsTreeView.NodeControls.Add(this.m_featureTextBox); this.m_inflFeatsTreeView.NodeControls.Add(this.m_valueComboBox); this.m_inflFeatsTreeView.NodeControls.Add(this.m_inflNotCheckBox); this.m_inflFeatsTreeView.SelectedNode = null; this.m_inflFeatsTreeView.UseColumns = true; // // m_featureColumn // resources.ApplyResources(this.m_featureColumn, "m_featureColumn"); this.m_featureColumn.SortOrder = System.Windows.Forms.SortOrder.None; // // m_notColumn // resources.ApplyResources(this.m_notColumn, "m_notColumn"); this.m_notColumn.SortOrder = System.Windows.Forms.SortOrder.None; // // m_valueColumn // resources.ApplyResources(this.m_valueColumn, "m_valueColumn"); this.m_valueColumn.SortOrder = System.Windows.Forms.SortOrder.None; // // m_featureIcon // this.m_featureIcon.DataPropertyName = "Image"; this.m_featureIcon.LeftMargin = 1; this.m_featureIcon.ParentColumn = this.m_featureColumn; this.m_featureIcon.ScaleMode = Aga.Controls.Tree.ImageScaleMode.Clip; // // m_featureTextBox // this.m_featureTextBox.DataPropertyName = "Text"; this.m_featureTextBox.IncrementalSearchEnabled = true; this.m_featureTextBox.LeftMargin = 1; this.m_featureTextBox.ParentColumn = this.m_featureColumn; // // m_valueComboBox // this.m_valueComboBox.DataPropertyName = "Value"; this.m_valueComboBox.EditEnabled = true; this.m_valueComboBox.EditOnClick = true; this.m_valueComboBox.IncrementalSearchEnabled = true; this.m_valueComboBox.LeftMargin = 1; this.m_valueComboBox.ParentColumn = this.m_valueColumn; this.m_valueComboBox.CreatingEditor += new System.EventHandler<Aga.Controls.Tree.NodeControls.EditEventArgs>(this.m_valueComboBox_CreatingEditor); this.m_valueComboBox.IsEditEnabledValueNeeded += new System.EventHandler<Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs>(this.m_valueComboBox_IsEditEnabledValueNeeded); // // m_inflNotCheckBox // this.m_inflNotCheckBox.DataPropertyName = "IsChecked"; this.m_inflNotCheckBox.EditEnabled = true; this.m_inflNotCheckBox.LeftMargin = 1; this.m_inflNotCheckBox.ParentColumn = this.m_notColumn; this.m_inflNotCheckBox.IsVisibleValueNeeded += new System.EventHandler<Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs>(this.m_inflNotCheckBox_IsVisibleValueNeeded); // // m_imageList // this.m_imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_imageList.ImageStream"))); this.m_imageList.TransparentColor = System.Drawing.Color.Transparent; this.m_imageList.Images.SetKeyName(0, ""); this.m_imageList.Images.SetKeyName(1, ""); // // ComplexConcMorphDlg // this.AcceptButton = this.m_btnOK; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.m_btnCancel; this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.m_btnHelp); this.Controls.Add(this.m_btnCancel); this.Controls.Add(this.m_btnOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ComplexConcMorphDlg"; this.m_helpProvider.SetShowHelp(this, ((bool)(resources.GetObject("$this.ShowHelp")))); this.ShowIcon = false; this.ShowInTaskbar = false; this.groupBox2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_glossTextBox)).EndInit(); this.groupBox3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_entryTextBox)).EndInit(); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_formTextBox)).EndInit(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); this.groupBox5.ResumeLayout(false); this.ResumeLayout(false); }
public SimpleGrtListModel(TreeViewAdv tree, MySQL.Grt.ListModelWrapper grtList, NodeIcon nodeIcon, bool dynamicContextMenu) : base(tree, grtList, nodeIcon, dynamicContextMenu) { this.grtList = grtList; treeView = tree; }
protected GrtListModel(TreeViewAdv ListView, MySQL.Grt.ListModelWrapper GrtList, NodeIcon NodeIcon, bool DynamicContextMenu) : this(ListView, GrtList, DynamicContextMenu) { nodeIcon = NodeIcon; // Ensure that the VirtualMode is enabled nodeIcon.VirtualMode = true; // Assign virtual value events for displaying and processing the edited value content nodeIcon.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(IconNeeded); }
private void InitializeColumnControls() { // // ncProcessIcon // _ncProcessIcon = new NodeIcon { DataPropertyName = "Icon", LeftMargin = 1, ParentColumn = _tcProcessIcon, ScaleMode = ImageScaleMode.Clip }; // // nodeProcessName // _ncProcessName = new NodeTextBox { DataPropertyName = "Text", IncrementalSearchEnabled = true, LeftMargin = 3, ParentColumn = _tcProcessIcon }; //_ncProcessName.ParentColumn = _tcProcessName; // // ncProcessGroup // _ncProcessCategory = new NodeCategoryTitle { DataPropertyName = "CategoryTitle", IncrementalSearchEnabled = true, LeftMargin = 1, ParentColumn = _tcProcessIcon, FirstRowVerticalAlign = VerticalAlignment.Top }; // // ncCategoryTitleSize // _ncProcessCategoryTitleSize = new NodeSizeControl(new Size(0, 45), new Size(0, 30), new List<Type> { typeof (ProcessCategoryNode), typeof (NodeWithUniqueChildren) }); // // nodeProcessPid // _ncProcessPid = new NodeTextBox { DataPropertyName = "Pid", IncrementalSearchEnabled = true, LeftMargin = 3, ParentColumn = _tcProcessPid }; }
public int AddColumn(NodeIcon treeControl, int grtIndex) { ColumnContent column = new ColumnContent(); column.editable = false; column.index = grtIndex; column.control = treeControl; treeControl.VirtualMode = true; treeControl.ValueNeeded += new EventHandler<NodeControlValueEventArgs>(StateIconNeeded); columns.Add(column); return column.index; }