Ejemplo n.º 1
0
 private void button2_Click(object sender, System.EventArgs e)
 {
     DataDumper.CreateFilesList();
     DataDumper.WriteFilesList();
     MainForm.Log("File list Builded");
     this.Close();
 }
Ejemplo n.º 2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            CompileFilesTable();

            DataDumper.WriteFilesList();

            this.Close();
        }
Ejemplo n.º 3
0
 public static void Dump()
 {
     MainForm.ToggleLock();
     BarReset(Bars.Data);
     BarReset(Bars.Html);
     DataDumper.Dump();
     HtmlCompiler.CompileHtml();
     MainForm.ToggleLock();
 }
Ejemplo n.º 4
0
        public void LoadFiles(string folder, string type, string race)
        {
            string[] files = Directory.GetFiles(folder);
            foreach (string f in files)
            {
                string Race = race;
                if (f.EndsWith(".lua") || f.EndsWith(".nil"))
                {
                    string fileName = f.Remove(0, folder.Length + 1);

                    if (Race == null || Race == "")
                    {
                        Race = DataDumper.GetRace(fileName);
                    }

                    if (Race == "none")
                    {
                        continue;
                    }

                    TreeNodeCollection t1   = this.treeView1.Nodes;
                    string             subs = "";

                    switch (type)
                    {
                    case "Unit":
                        subs = "Squads";
                        break;

                    case "Building":
                        subs = "Buildings";
                        break;
                    }
                    TreeNode t1_sub = t1.Find(subs, false)[0];


                    foreach (TreeNode node in t1_sub.Nodes)
                    {
                        if (node.Text == Race)
                        {
                            TreeNodeCollection t1_sub_race = node.Nodes;
                            TreeNode           newNode     = new TreeNode(fileName);
                            newNode.Name = fileName;
                            if (!t1_sub_race.ContainsKey(newNode.Name))
                            {
                                t1_sub_race.Add(newNode);
                            }
                            break;
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public MainForm()
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent.
            //
            DataPath.LoadPaths();
            Translation.Initialize();
            DataDumper.LoadFilesList();
            DataDumper.LoadAbilitiesConfig();
        }
Ejemplo n.º 6
0
        private void CompileFilesTable()
        {
            DataDumper.FilesTable.Clear();
            for (int i = 0; i < 2; i++)
            {
                TreeNode tn   = treeView2.Nodes[i];
                string   path = "";

                for (int j = 0; j < 9; j++)
                {
                    TreeNode tn_sub = tn.Nodes[j];
                    foreach (TreeNode tn_sub_child in tn_sub.Nodes)
                    {
                        if (tn.Text == "Squads")
                        {
                            path = DataPath.GetPath(DataPath.GetCategoryPath(tn_sub_child.Text, DataDumper.GetInfoType(tn.Text), tn_sub.Text));
                        }
                        else
                        if (tn.Text == "Buildings")
                        {
                            path = DataPath.GetPath(DataPath.GetCategoryPath(tn_sub_child.Text, DataDumper.GetInfoType(tn.Text), tn_sub.Text));
                        }
                        DataDumper.FilesTable.Add(tn_sub_child.Text, new LuaInfo(path, DataDumper.GetInfoType(tn.Text), tn_sub.Text));
                    }
                }
            }
        }