示例#1
0
        private static void Main()
        {
            Configuration = new DataMigrationConfigFile();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
示例#2
0
        private void OpenFile()
        {
            var dialogResult = CheckSaveChanges();

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }

            if (dlgOpenFile.ShowDialog() == DialogResult.OK)
            {
                Program.Configuration = DataMigrationConfigFile.Load(dlgOpenFile.FileName);
                treeView.Reset();
                foreach (var job in Program.Configuration.Jobs.OrderBy(j => j.Name))
                {
                    treeView.AddJob(job);
                }
            }
        }