Exemplo n.º 1
0
 public static TreeNode CimToNode(CimQualifierFlavor flavor)
 {
     /* <!ENTITY % QualifierFlavor " OVERRIDABLE  (true|false)   'true'
                                 TOSUBCLASS   (true|false)   'true'
                                 TOINSTANCE   (true|false)   'false' //deprecated
                                 TRANSLATABLE (true|false)   'false'"> */
     TreeNode root = new TreeNode("QualifierFlavor");
     root.Nodes.Add(new TreeNode("Overridable - " + flavor.Overridable.ToString()));
     root.Nodes.Add(new TreeNode("ToSubClass - " + flavor.ToSubClass.ToString()));
     root.Nodes.Add(new TreeNode("ToInstance - " + flavor.ToInstance.ToString()));
     root.Nodes.Add(new TreeNode("Translatable - " + flavor.Translatable.ToString()));
     return root;
 }
Exemplo n.º 2
0
 public static List<ListViewItem> ToList(CimQualifierFlavor flavor)
 {
     List<ListViewItem> list = new List<ListViewItem>();
     list.Add(new ListViewItem(new string[] { "Overridable", "Flavor", flavor.Overridable.ToString() }, (int)ImageUtils.ImageIndex.Attribute));
     list.Add(new ListViewItem(new string[] { "ToSubClass", "Flavor", flavor.ToSubClass.ToString() }, (int)ImageUtils.ImageIndex.Attribute));
     list.Add(new ListViewItem(new string[] { "ToInstance", "Flavor", flavor.ToInstance.ToString() }, (int)ImageUtils.ImageIndex.Attribute));
     list.Add(new ListViewItem(new string[] { "Translatable", "Flavor", flavor.Translatable.ToString() }, (int)ImageUtils.ImageIndex.Attribute));
     return list;
 }