Example #1
0
        public override void Dispose()
        {
            if (this.tObjectGraphNode != null)
            {
                this.tObjectGraphNode.Dispose();
            }
            tObjectGraphNode = null;

            if (this.tGenericRcol != null)
            {
                this.tGenericRcol.Dispose();
            }
            tGenericRcol = null;

            if (tShpeLod != null)
            {
                tShpeLod.Dispose();
            }
            tShpeLod = null;

            if (tShpeItems != null)
            {
                tShpeItems.Dispose();
            }
            tShpeItems = null;

            if (tShpeParts != null)
            {
                tShpeParts.Dispose();
            }
            tShpeParts = null;
        }
Example #2
0
        /// <summary>
        /// You can use this to setop the Controls on a TabPage befor it is dispplayed
        /// </summary>
        protected override void InitTabPage()
        {
            if (tObjectGraphNode == null)
            {
                tObjectGraphNode = new SimPe.Plugin.TabPage.ObjectGraphNode();
            }
            if (tGenericRcol == null)
            {
                tGenericRcol = new SimPe.Plugin.TabPage.GenericRcol();
            }
            if (tShpeLod == null)
            {
                tShpeLod = new SimPe.Plugin.TabPage.ShpeLod();
            }
            if (tShpeItems == null)
            {
                tShpeItems = new SimPe.Plugin.TabPage.ShpeItems();
            }
            if (tShpeParts == null)
            {
                tShpeParts = new SimPe.Plugin.TabPage.ShpeParts();
            }
            tGenericRcol.tb_ver.Text           = "0x" + Helper.HexString(this.version);
            tGenericRcol.gen_pg.SelectedObject = this;

            tShpeLod.lbunk.Items.Clear();
            tShpeItems.lbitem.Items.Clear();
            tShpeParts.lbpart.Items.Clear();
            try
            {
                Shape wrp = this;

                foreach (uint val in wrp.Unknwon)
                {
                    tShpeLod.lbunk.Items.Add(val);
                }
                foreach (ShapeItem item in wrp.Items)
                {
                    tShpeItems.lbitem.Items.Add(item);
                }
                foreach (ShapePart part in wrp.Parts)
                {
                    tShpeParts.lbpart.Items.Add(part);
                }
                foreach (ObjectGraphNodeItem ogni in wrp.GraphNode.Items)
                {
                    tObjectGraphNode.lb_ogn.Items.Add(ogni);
                }
                tObjectGraphNode.tb_ogn_file.Text = wrp.GraphNode.FileName;
                tObjectGraphNode.tb_ogn_ver.Text  = Helper.HexString(wrp.GraphNode.Version);
            }
            catch (Exception ex)
            {
                Helper.ExceptionMessage(Localization.Manager.GetString("erropenfile"), ex);
            }
        }