private void method_1(string string_0, IHatchClass ihatchClass_0, TreeView treeView_0) { TreeNode node = new TreeNode(string_0) { Tag = ihatchClass_0 }; treeView_0.Nodes.Add(node); IEnumHatchDefinition enumHatchDefinitions = ihatchClass_0.HatchTemplate.EnumHatchDefinitions; enumHatchDefinitions.Reset(); IHatchDefinition pHatchDefinition = null; int pHatchInterval = 0; enumHatchDefinitions.Next(ref pHatchInterval, ref pHatchDefinition); while (pHatchDefinition != null) { TreeNode node2 = new TreeNode("Hatch Def(" + pHatchInterval.ToString() + ")") { Tag = new HatchDef(pHatchInterval, pHatchDefinition) }; node.Nodes.Add(node2); enumHatchDefinitions.Next(ref pHatchInterval, ref pHatchDefinition); } }
private void btnDeleteHatchClass_Click(object sender, EventArgs e) { this.treeView1.Nodes.Remove(this.treeView1.SelectedNode); if (this.treeView1.Nodes.Count == 0) { IHatchClass class2 = this.method_3(); this.method_1("Hatch Class", class2, this.treeView1); } }
private void btnDeleteAll_Click(object sender, EventArgs e) { this.treeView1.Nodes.Clear(); if (this.treeView1.Nodes.Count == 0) { IHatchClass class2 = this.method_3(); this.method_1("Hatch Class", class2, this.treeView1); } }
private void method_0() { object extension; if (this.ilayerExtensions_0 != null) { IHatchLayerExtension hatchLayerExtension = null; int i = 0; while (true) { if (i < this.ilayerExtensions_0.ExtensionCount) { extension = this.ilayerExtensions_0.Extension[i]; if (extension is IHatchLayerExtension) { hatchLayerExtension = extension as IHatchLayerExtension; break; } else { i++; } } else { break; } } if (hatchLayerExtension != null) { this.chkShowHatches.Checked = hatchLayerExtension.ShowHatches; extension = hatchLayerExtension.HatchClassNames(); if (hatchLayerExtension.HatchClassCount() != 0) { IEnumerator enumerator = ((System.Array)extension).GetEnumerator(); enumerator.Reset(); enumerator.MoveNext(); for (i = 0; i < hatchLayerExtension.HatchClassCount(); i++) { string str = enumerator.Current.ToString(); IHatchClass hatchClass = hatchLayerExtension.HatchClass(str); this.method_1(str, (hatchClass as IClone).Clone() as IHatchClass, this.treeView1); enumerator.MoveNext(); } } else { this.method_1("df", this.method_3(), this.treeView1); } if (this.treeView1.Nodes.Count > 0) { this.treeView1.SelectedNode = this.treeView1.Nodes[0]; } } } }
private void btnAddHatchClass_Click(object sender, EventArgs e) { frmNewHatchClassName name = new frmNewHatchClassName(); if (name.ShowDialog() == DialogResult.OK) { IHatchClass class2 = this.method_3(); this.method_1(name.HatchClassName, class2, this.treeView1); } }