コード例 #1
0
        /// <summary>
        /// You can use this to setop the Controls on a TabPage befor it is dispplayed
        /// </summary>
        protected override void InitTabPage()
        {
            if (tMaterialDefinition == null)
            {
                tMaterialDefinition = new SimPe.Plugin.TabPage.MaterialDefinition();
            }
            if (tMaterialDefinitionProperties == null)
            {
                tMaterialDefinitionProperties = new SimPe.Plugin.TabPage.MatdForm();
            }
            if (tMaterialDefinitionCat == null)
            {
                tMaterialDefinitionCat = new SimPe.Plugin.TabPage.MaterialDefinitionCategories();
            }
            if (tMaterialDefinitionFiles == null)
            {
                tMaterialDefinitionFiles = new SimPe.Plugin.TabPage.MaterialDefinitionFiles();
            }
            tMaterialDefinitionProperties.tbname.Tag = true;
            tMaterialDefinition.tbdsc.Tag            = true;
            try
            {
                tMaterialDefinition.tb_ver.Text = "0x" + Helper.HexString(this.version);

                tMaterialDefinitionProperties.lldel.Enabled = false;
                tMaterialDefinitionProperties.lbprop.Items.Clear();
                foreach (MaterialDefinitionProperty mdp in this.Properties)
                {
                    tMaterialDefinitionProperties.lbprop.Items.Add(mdp);
                }

                tMaterialDefinition.tbdsc.Text  = FileDescription;
                tMaterialDefinition.tbtype.Text = MatterialType;

                tMaterialDefinitionFiles.lbfl.Items.Clear();
                foreach (string fl in Listing)
                {
                    tMaterialDefinitionFiles.lbfl.Items.Add(fl);
                }

                //if (Helper.WindowsRegistry.HiddenMode)
                {
                    tMaterialDefinitionCat.SetupGrid(this);
                }
            }
            finally
            {
                tMaterialDefinitionProperties.tbname.Tag = null;
                tMaterialDefinition.tbdsc.Tag            = null;
            }
        }
コード例 #2
0
 public override void Dispose()
 {
     if (this.tMaterialDefinition != null)
     {
         this.tMaterialDefinition.Dispose();
     }
     if (tMaterialDefinitionProperties != null)
     {
         tMaterialDefinitionProperties.Dispose();
     }
     if (tMaterialDefinitionCat != null)
     {
         tMaterialDefinitionCat.Dispose();
     }
     if (tMaterialDefinitionFiles != null)
     {
         tMaterialDefinitionFiles.Dispose();
     }
     tMaterialDefinitionFiles      = null;
     tMaterialDefinitionCat        = null;
     tMaterialDefinitionProperties = null;
     tMaterialDefinition           = null;
 }