public bool Apply()
        {
            IHatchLayerExtension extension = null;
            int num;

            for (num = 0; num < this.ilayerExtensions_0.ExtensionCount; num++)
            {
                object obj2 = this.ilayerExtensions_0.get_Extension(num);
                if (obj2 is IHatchLayerExtension)
                {
                    extension = obj2 as IHatchLayerExtension;
                    break;
                }
            }
            if (extension != null)
            {
                extension.RemoveAll();
                for (num = 0; num < this.treeView1.Nodes.Count; num++)
                {
                    TreeNode node = this.treeView1.Nodes[num];
                    extension.AddClass(node.Text, node.Tag as IHatchClass);
                }
                extension.ShowHatches = this.chkShowHatches.Checked;
            }
            return(true);
        }
        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];
                    }
                }
            }
        }