Esempio n. 1
0
 private void _miOpen_Click(object sender, System.EventArgs e)
 {
     if (DialogResult.OK == _dlgOpen.ShowDialog())
     {
         _project = MigrationProject.Load(_dlgOpen.FileName);
         TransferProjectData();
         UpdateTitle();
     }
 }
Esempio n. 2
0
 private void _miNew_Click(object sender, System.EventArgs e)
 {
     if (CloseProject())
     {
         _project = new MigrationProject();
         TransferProjectData();
         UpdateTitle();
     }
 }
Esempio n. 3
0
 void LoadLastProjectOrCreateNew()
 {
     if (File.Exists(_preferences.LastProject))
     {
         _project = MigrationProject.Load(_preferences.LastProject);
     }
     else
     {
         _project = new MigrationProject();
     }
     TransferProjectData();
     UpdateTitle();
 }
Esempio n. 4
0
        static int Main(string[] args)
        {
            try
            {
                MigrationProject project = ParseCommandLine(args);
                WriteLine("Bamboo.Prevalence Version Migrator 1.0");
                MigrationContext context = new MigrationContext(project);
                context.Migrate();
            }
            catch (Exception x)
            {
                WriteLine(x.Message);
                return(-1);
            }

            return(0);
        }
Esempio n. 5
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);
        }