Example #1
0
 private void addDdsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.treeView.Nodes.Add("Dds : \"New node\"");
     this.treeView.Refresh();
     dds dds = new dds();
     dds.colour_key = 0;
     dds.path = "New node";
     dds.ddselement_count = 0;
     dds dds2 = new dds();
     dds2.path = "New node";
     dds2.colour_key = 0;
     this.ListDDS.Add(dds2);
 }
Example #2
0
 private void copyDDSToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.copyDDS = this.ListDDS[this.treeView.SelectedNode.Index];
 }
Example #3
0
 public void load_tsi(string path)
 {
     this.treeView.Nodes.Clear();
     this.ListDDS.Clear();
     BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open));
     this.dds_count = binaryReader.ReadInt16();
     for (int num = 0; num != (int)this.dds_count; num++)
     {
         dds dds = new dds();
         short count = binaryReader.ReadInt16();
         dds.path = Encoding.UTF7.GetString(binaryReader.ReadBytes((int)count));
         this.treeView.Nodes.Add("Dds : \"" + dds.path + "\"");
         dds.colour_key = binaryReader.ReadInt32();
         this.ListDDS.Add(dds);
     }
     this.totalelement_count = binaryReader.ReadInt16();
     for (int num = 0; num != (int)this.dds_count; num++)
     {
         this.ListDDS[num].ddselement_count = binaryReader.ReadInt16();
         for (int num2 = 0; num2 != (int)this.ListDDS[num].ddselement_count; num2++)
         {
             dds.dds_element dds_element = new dds.dds_element();
             dds_element.Load_element(ref binaryReader);
             this.ListDDS[num].ListDDS_element.Add(dds_element);
             this.treeView.Nodes[num].Nodes.Add(dds_element.name);
         }
     }
     this.propertyGrid.SelectedObject = this.ListDDS[0].ListDDS_element[0];
     binaryReader.Close();
 }