public CimParameterForm(CimParameter displayParameter) { InitializeComponent(); //------------------------------------------------------ List<ListViewItem> list; DisplayParameter = displayParameter; this.Text = "CimProperty - " + DisplayParameter.Name.ToString(); #region Display Signature this.AddLabel(LabelType.Type); LastLabel.Text = DisplayParameter.Type.ToString(); this.AddLabel(LabelType.Name); LastLabel.Text = DisplayParameter.Name.ToString(); #endregion #region Display Description this.uxLbl_Description.Text = "Description:"; if (DisplayParameter.Qualifiers["Description"] != null) { string desc = DisplayParameter.Qualifiers["Description"].Values[0]; this.uxTxtBx_Description.Lines = desc.Split('\n'); this.uxTxtBx_Description.Select(0, 0); } #endregion #region Display Attributes #endregion #region Display Qualifiers list = ListViewUtils.ToList(DisplayParameter.Qualifiers); #endregion uxLstView_Items.Items.AddRange(list.ToArray()); colName.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); colType.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); this.AlignSignatureLabels(null, null); }
public static TreeNode CimToNode(CimParameter parameter) { /* <!ELEMENT PARAMETER (QUALIFIER*)> * <!ATTLIST PARAMETER * %CIMName; * %CIMType; #REQUIRED> * */ TreeNode root = new TreeNode(parameter.Name.ToString()); root.Nodes.Add(new TreeNode("CimType - " + parameter.Type.ToString())); return root; }