private PropertiesToolsWindowsProperty MakePropertyText(string name, string caption, string value) { PropertiesToolsWindowsProperty propertiesToolsWindowsPart = new PropertiesToolsWindowsProperty(PropertiesToolsWindowsProperty.Type.Text); propertiesToolsWindowsPart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); propertiesToolsWindowsPart.DownControl = null; //propertiesToolsWindowsPart.Location = new System.Drawing.Point(10, 5); propertiesToolsWindowsPart.Name = name; propertiesToolsWindowsPart.ParentControl = null; propertiesToolsWindowsPart.Size = new System.Drawing.Size(pPanel.Width, propertiesToolsWindowsPart.Height); propertiesToolsWindowsPart.TabIndex = 1; propertiesToolsWindowsPart.PropertyName = name; propertiesToolsWindowsPart.PropertyCaption = caption; propertiesToolsWindowsPart.PropertyValue = value; // subscribe to change event propertiesToolsWindowsPart.Change += new PropertiesToolsWindowsEventHandler(property_Change); if (lastAddedControl != null) { propertiesToolsWindowsPart.UpControl = (PropertiesToolsWindowsProperty)lastAddedControl; } this.pPanel.Controls.Add(propertiesToolsWindowsPart); lastAddedControl = propertiesToolsWindowsPart; return(propertiesToolsWindowsPart); }
void property_Change(PropertiesToolsWindowsProperty property) { if (Change != null) { Change(property); } }
private PropertiesToolsWindowsProperty MakePropertyComboBox(string name, string caption, string[] values, string selected) { PropertiesToolsWindowsProperty propertiesToolsWindowsPart = new PropertiesToolsWindowsProperty(PropertiesToolsWindowsProperty.Type.ComboBox); propertiesToolsWindowsPart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); propertiesToolsWindowsPart.DownControl = null; //propertiesToolsWindowsPart.Location = new System.Drawing.Point(10, 5); propertiesToolsWindowsPart.Name = name; propertiesToolsWindowsPart.ParentControl = null; propertiesToolsWindowsPart.Size = new System.Drawing.Size(pPanel.Width, propertiesToolsWindowsPart.Height); propertiesToolsWindowsPart.TabIndex = 1; propertiesToolsWindowsPart.PropertyName = name; propertiesToolsWindowsPart.PropertyCaption = caption; // fill combobox with values propertiesToolsWindowsPart.PropertyListSet(values); // select default text propertiesToolsWindowsPart.PropertyValue = selected; // subscribe to change event propertiesToolsWindowsPart.Change += new PropertiesToolsWindowsEventHandler(property_Change); if (lastAddedControl != null) { propertiesToolsWindowsPart.UpControl = (PropertiesToolsWindowsProperty)lastAddedControl; } this.pPanel.Controls.Add(propertiesToolsWindowsPart); lastAddedControl = propertiesToolsWindowsPart; return(propertiesToolsWindowsPart); }
public bool Contains(PropertiesToolsWindowsProperty value) { foreach (PropertiesToolsWindowsProperty property in propertyList) { if (property.Equals(value)) { return(true); } } return(false); }
public bool Contains(PropertiesToolsWindowsProperty value) { foreach (PropertiesToolsWindowsProperty property in propertyList) { if (property.Equals(value)) { return true; } } return false; }
public void Add(PropertiesToolsWindowsProperty property) { propertyList.Add(property); }
private PropertiesToolsWindowsProperty MakePropertyTrueFalse(string name, string caption, bool selected) { PropertiesToolsWindowsProperty propertiesToolsWindowsPart = new PropertiesToolsWindowsProperty(PropertiesToolsWindowsProperty.Type.TrueFalse); propertiesToolsWindowsPart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); propertiesToolsWindowsPart.DownControl = null; //propertiesToolsWindowsPart.Location = new System.Drawing.Point(10, 5); propertiesToolsWindowsPart.Name = name; propertiesToolsWindowsPart.ParentControl = null; propertiesToolsWindowsPart.Size = new System.Drawing.Size(pPanel.Width, propertiesToolsWindowsPart.Height); propertiesToolsWindowsPart.TabIndex = 1; propertiesToolsWindowsPart.PropertyName = name; propertiesToolsWindowsPart.PropertyCaption = caption; // select default text propertiesToolsWindowsPart.PropertyValueTrueFalse = selected; // subscribe to change event propertiesToolsWindowsPart.Change += new PropertiesToolsWindowsEventHandler(property_Change); if (lastAddedControl != null) { propertiesToolsWindowsPart.UpControl = (PropertiesToolsWindowsProperty)lastAddedControl; } this.pPanel.Controls.Add(propertiesToolsWindowsPart); lastAddedControl = propertiesToolsWindowsPart; return propertiesToolsWindowsPart; }