Exemplo n.º 1
0
        public void UpdateTree(ref OGIs OGIs, int Index)
        {
            this.OGITree.BeginUpdate();
            int num = (OGIs._Item.Length - 1);
            int i   = 0;

            while ((i <= num))
            {
                OGI ogi = (OGI)OGIs._Item[i];
                this.OGITree.Nodes.Add((i.ToString() + ") ID: " + ogi.ID.ToString()));
                i += 1;
            }
            TextBox box1 = this.T1Edit;

            string[] lines = box1.Lines;
            Array.Resize <string>(ref lines, 6);
            box1.Lines = lines;
            TextBox box2 = this.T2Edit;

            lines = box2.Lines;
            Array.Resize <string>(ref lines, 5);
            box2.Lines = lines;
            TextBox box3 = this.T3Edit;

            lines = box3.Lines;
            Array.Resize <string>(ref lines, 4);
            box3.Lines = lines;
            this.OGITree.EndUpdate();
        }
Exemplo n.º 2
0
        public void UpdateOGI(int index)
        {
            this.OGI = (OGI)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[1].Nodes[3].Nodes[index]));
            uint Flag = (uint)(this.OGI.Flag1 + this.OGI.Flag2 * 256 + this.OGI.Flag3 * 65536 + this.OGI.Flag4 * 65536 * 256);

            this.FlagsVal.Text  = Flag.ToString();
            this.Unk1Val.Text   = this.OGI.UnkI321.ToString();
            this.Unk2Val.Text   = this.OGI.UnkI322.ToString();
            this.Vect1XVal.Text = this.OGI.Coordinates1.X.ToString();
            this.Vect1YVal.Text = this.OGI.Coordinates1.Y.ToString();
            this.Vect1ZVal.Text = this.OGI.Coordinates1.Z.ToString();
            this.Vect1WVal.Text = this.OGI.Coordinates1.W.ToString();
            this.Vect2XVal.Text = this.OGI.Coordinates2.X.ToString();
            this.Vect2YVal.Text = this.OGI.Coordinates2.Y.ToString();
            this.Vect2ZVal.Text = this.OGI.Coordinates2.Z.ToString();
            this.Vect2WVal.Text = this.OGI.Coordinates2.W.ToString();
            this.ID4Val.Text    = this.OGI.SomeInt321.ToString();
            this.ID5Val.Text    = this.OGI.SomeInt322.ToString();
            this.T1Ind          = 0;
            this.T2Ind          = 0;
            this.T3Ind          = 0;
            this.UpdateT1();
            this.UpdateT2();
            this.UpdateT3();
            this.GCList.Items.Clear();
            int num2 = (this.OGI.GCNumber - 1);
            int i    = 0;

            while ((i <= num2))
            {
                this.GCList.Items.Add((this.OGI.GCI[i].ID.ToString() + ")" + this.OGI.GCI[i].GCID.ToString()));
                i += 1;
            }
            if ((this.GCList.Items.Count > 0))
            {
                this.GCList.SelectedIndex = 0;
            }
            this.TextBox1.Text = this.OGI.ID.ToString();
        }