Beispiel #1
0
        public void ExportWithoutErrorHandling(DatabaseVersion newVersion)
        {
            this.Database.Export(
                newVersion,
                SettingsManager.Get().Setting.PgDumpLocation,
                SettingsManager.Get().Setting.Host,
                SettingsManager.Get().Setting.Id,
                SettingsManager.Get().Setting.Password,
                SettingsManager.Get().Setting.Port);

            // open the diff files so user can verify them
            var diff     = new SQLFileDisplayData(this.Database.DiffFiles.SingleOrDefault(f => f.Version == newVersion));
            var undoDiff = new SQLFileDisplayData(this.Database.UndoDiffFiles.SingleOrDefault(f => f.Version == newVersion));

            if (SettingsManager.Get().Setting.OpenFilesInDefaultApplication)
            {
                this.processManager.Start(diff.SQLFile.Path);
                this.processManager.Start(undoDiff.SQLFile.Path);
            }
            else
            {
                BaseViewModel.OpenExportWindow(diff, undoDiff);
            }
        }
 partial void SelectedDiffFileBeforeSet(SQLFileDisplayData newValue);
Beispiel #3
0
 partial void UndoDiffFileBeforeSet(SQLFileDisplayData newValue);
Beispiel #4
0
 public ExportWindowViewModel(SQLFileDisplayData diffFile, SQLFileDisplayData undoDiffFile)
 {
     this.DiffFile     = diffFile;
     this.UndoDiffFile = undoDiffFile;
 }