示例#1
0
 private void _miOpen_Click(object sender, System.EventArgs e)
 {
     if (DialogResult.OK == _dlgOpen.ShowDialog())
     {
         _project = MigrationProject.Load(_dlgOpen.FileName);
         TransferProjectData();
         UpdateTitle();
     }
 }
示例#2
0
 void LoadLastProjectOrCreateNew()
 {
     if (File.Exists(_preferences.LastProject))
     {
         _project = MigrationProject.Load(_preferences.LastProject);
     }
     else
     {
         _project = new MigrationProject();
     }
     TransferProjectData();
     UpdateTitle();
 }
示例#3
0
        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);
        }