Exemplo n.º 1
0
 private void tbConfigName_Click(object sender, EventArgs e)
 {
     if (ofOpenDialog.ShowDialog() == DialogResult.OK)
     {
         tbConfigName.Text = ofOpenDialog.FileName;
         var showDumpField = ConfigScript.PreloadShowDumpField(tbConfigName.Text);
         tbDumpName.Enabled = showDumpField;
         lbDumpName.Enabled = showDumpField;
     }
 }
Exemplo n.º 2
0
 private void tbConfigName_Click(object sender, EventArgs e)
 {
     ofOpenDialog.Filter = "Config files|*.cs";
     if (ofOpenDialog.ShowDialog() == DialogResult.OK)
     {
         cbConfigName.Text = ofOpenDialog.FileName;
         updateCbConfigInDirectory(cbConfigName.Text);
         var showDumpField = ConfigScript.PreloadShowDumpField(cbConfigName.Text);
         updateDumpFieldVisible(showDumpField);
     }
 }
Exemplo n.º 3
0
        private void btOpen_Click(object sender, EventArgs e)
        {
            FileName     = tbFileName.Text;
            ConfigName   = tbConfigName.Text;
            DumpName     = ConfigScript.PreloadShowDumpField(ConfigName) ? tbDumpName.Text : "";
            DialogResult = DialogResult.OK;
            Close();

            Properties.Settings.Default["FileName"]   = FileName;
            Properties.Settings.Default["DumpName"]   = DumpName;
            Properties.Settings.Default["ConfigName"] = ConfigName;
            Properties.Settings.Default.Save();
        }
Exemplo n.º 4
0
        private void OpenFile_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default["FileName"].ToString() != "")
            {
                tbFileName.Text = Properties.Settings.Default["FileName"].ToString();
            }
            if (Properties.Settings.Default["DumpName"].ToString() != "")
            {
                tbDumpName.Text = Properties.Settings.Default["DumpName"].ToString();
            }
            if (Properties.Settings.Default["ConfigName"].ToString() != "")
            {
                cbConfigName.Text = Properties.Settings.Default["ConfigName"].ToString();
            }

            var showDumpField = ConfigScript.PreloadShowDumpField(cbConfigName.Text);

            updateDumpFieldVisible(showDumpField);

            if (fileName == "" && ConfigScript.romName != "")
            {
                tbFileName.Text = ConfigScript.romName;
            }
            if (dumpName == "" && ConfigScript.dumpName != "")
            {
                tbDumpName.Text = ConfigScript.dumpName;
            }
            if (configName == "" && ConfigScript.cfgName != "")
            {
                cbConfigName.Text = ConfigScript.cfgName;
            }

            ofOpenDialog.InitialDirectory = Environment.CurrentDirectory;
            if (fileName != "")
            {
                tbFileName.Text = fileName;
            }
            if (configName != "")
            {
                cbConfigName.Text = configName;
            }
            if (dumpName != "")
            {
                tbDumpName.Text = dumpName;
            }

            updateCbConfigInDirectory(cbConfigName.Text);
        }
Exemplo n.º 5
0
        private void OpenFile_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default["FileName"].ToString() != "")
            {
                tbFileName.Text = Properties.Settings.Default["FileName"].ToString();
            }
            if (Properties.Settings.Default["DumpName"].ToString() != "")
            {
                tbDumpName.Text = Properties.Settings.Default["DumpName"].ToString();
            }
            if (Properties.Settings.Default["ConfigName"].ToString() != "")
            {
                tbConfigName.Text = Properties.Settings.Default["ConfigName"].ToString();
            }

            var showDumpField = ConfigScript.PreloadShowDumpField(tbConfigName.Text);

            tbDumpName.Enabled = showDumpField;
            lbDumpName.Enabled = showDumpField;

            if (FileName == "" && ConfigScript.romName != "")
            {
                tbFileName.Text = ConfigScript.romName;
            }
            if (DumpName == "" && ConfigScript.dumpName != "")
            {
                tbDumpName.Text = ConfigScript.dumpName;
            }
            if (ConfigName == "" && ConfigScript.cfgName != "")
            {
                tbConfigName.Text = ConfigScript.cfgName;
            }

            ofOpenDialog.InitialDirectory = Environment.CurrentDirectory;
            if (FileName != "")
            {
                tbFileName.Text = FileName;
            }
            if (ConfigName != "")
            {
                tbConfigName.Text = ConfigName;
            }
            if (DumpName != "")
            {
                tbDumpName.Text = DumpName;
            }
        }