private void _miOpen_Click(object sender, System.EventArgs e) { if (DialogResult.OK == _dlgOpen.ShowDialog()) { _project = MigrationProject.Load(_dlgOpen.FileName); TransferProjectData(); UpdateTitle(); } }
void LoadLastProjectOrCreateNew() { if (File.Exists(_preferences.LastProject)) { _project = MigrationProject.Load(_preferences.LastProject); } else { _project = new MigrationProject(); } TransferProjectData(); UpdateTitle(); }
static MigrationProject ParseCommandLine(string[] args) { if (args.Length < 1) { CommandLineError(); } MigrationProject project = MigrationProject.Load(args[0]); for (int i = 1; i < args.Length; ++i) { string arg = args[i]; string option = arg.Substring(0, 3); switch (option) { case "-s:": { project.SourceFile = arg.Substring(3); break; } case "-t:": { project.TargetFile = arg.Substring(3); break; } default: { CommandLineError(); break; } } } return(project); }