public override void ShowDialog(object sender, EventArgs e)
        {
            string[] files;
            string path;
            if (ConvDlg.Show("", GetOpenFilter(), out files, out path) == DialogResult.OK)
            {
                ProgressDlg pd = new ProgressDlg(DevStringTable.Instance["GUI:Converting"]);

                pd.MinVal = 0;
                pd.Value = 0;
                pd.MaxVal = files.Length;

                pd.Show();

                string dest = Path.Combine(path, "color.ini");
                ini = new IniConfiguration();

                iniSect = new IniSection("Textures");
                ini.Add(iniSect.Name, iniSect);

                for (int i = 0; i < files.Length; i++)
                {
                    Convert(new DevFileLocation(files[i]), null);

                    pd.Value = i;
                    Application.DoEvents();
                }
                pd.Close();
                pd.Dispose();

                ini.Save(dest);
            }
        }
Beispiel #2
0
        public override void ShowDialog(object sender, EventArgs e)
        {
            string[] files;
            string   path;

            if (ConvDlg.Show("", GetOpenFilter(), out files, out path) == DialogResult.OK)
            {
                ProgressDlg pd = new ProgressDlg(DevStringTable.Instance["GUI:Converting"]);

                pd.MinVal = 0;
                pd.Value  = 0;
                pd.MaxVal = files.Length;

                pd.Show();

                string dest = Path.Combine(path, "color.ini");
                ini = new IniConfiguration();

                iniSect = new IniSection("Textures");
                ini.Add(iniSect.Name, iniSect);

                for (int i = 0; i < files.Length; i++)
                {
                    Convert(new DevFileLocation(files[i]), null);

                    pd.Value = i;
                    Application.DoEvents();
                }
                pd.Close();
                pd.Dispose();

                ini.Save(dest);
            }
        }