private void btnImport_Click(object sender, EventArgs e) { this.btnOK.Enabled = false; this.btnCancel.Enabled = false; if (StaticWindows.Requester( "Wollen Sie wirklich Ihre Microsoft SQL Server Datenbank in die SQLite Datenbank migrieren?" ) == System.Windows.Forms.DialogResult.Yes) { this.lblState.Text = "Migration gestartet, lade Daten..."; this.btnCancel.Enabled = true; this._importer = new SQLServerToSQLiteImporter(); this._importer.PercentState += new ImportPercentEventHandler(_importer_PercentState); if (this._importer.Import()) { StaticWindows.InfoBox("Erfolgreich migriert!"); } else { StaticWindows.ErrorBox("Während der Migration ist ein Fehler aufgetreten!"); } } else { this.lblState.Text = "Migration abgebrochen!"; this.btnOK.Enabled = true; this.btnCancel.Enabled = true; } }
static void Main() { bool __startOldApp = false; int __windowsVersion = Environment.OSVersion.Version.Major; if (__windowsVersion < 6) { StaticWindows.InfoBox( "MovieMatic2: Windows Vista Not Found", "This program requires Windows Vista or later to run," + "\nbut for compatibility reason we start the old version." ); __startOldApp = true; } if (__startOldApp) { string mmPath = Application.ResourceAssembly.Location; mmPath = mmPath.Replace(Application.ResourceAssembly.ManifestModule.Name, "MovieMatic.exe"); if (File.Exists(mmPath)) { AppLoader loader = new AppLoader(); loader.LoadApp(mmPath); } else { StaticWindows.ErrorBox( "MovieMatic2: MovieMatic version 1.x not found", "MovieMatic version 1.x cannot start then the program was not found." ); } } else { App.Main(); } }