コード例 #1
0
        private void SaveRunButton_Click(object sender, EventArgs e)
        {
            if (Recalculate())
            {
                var fileInfo = new FileInfo(NameBox.Text);
                if (fileInfo.Exists)
                {
                    var result = MessageBox.Show(this, "File already exists, overwrite?", "File exists", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                    if (result != DialogResult.OK)
                    {
                        return;
                    }
                }

                File.WriteAllText(fileInfo.FullName, _currentXml.ToString());

                DialogResult = DialogResult.OK;
                Close();

                var lra = new LoadRomArgs {
                    OpenAdvanced = new OpenAdvanced_OpenRom {
                        Path = fileInfo.FullName
                    }
                };
                MainForm.LoadRom(fileInfo.FullName, lra);
            }
        }
コード例 #2
0
        private void _LoadRom(string filename, string archive = null)
        {
            var args = new LoadRomArgs();

            args.OpenAdvanced = new OpenAdvanced_OpenRom {
                Path = filename
            };
            LoadRom(filename, args);
        }
コード例 #3
0
ファイル: MultiDiskBundler.cs プロジェクト: gocha/BizHawk
        private void SaveRunButton_Click(object sender, EventArgs e)
        {
            FileInfo fileInfo;

            if (!DoSave(out fileInfo))
            {
                return;
            }

            DialogResult = DialogResult.OK;
            Close();

            var lra = new LoadRomArgs {
                OpenAdvanced = new OpenAdvanced_OpenRom {
                    Path = fileInfo.FullName
                }
            };

            MainForm.LoadRom(fileInfo.FullName, lra);
        }