public OptionsForm(BackupForm parentForm, BackupSettings settings) { InitializeComponent(); this.parentForm = parentForm; this.settings = settings; this.ServerAddressTextBox.Text = settings.ServerUrl; this.AuthenticationKeyTextBox.Text = settings.AuthenticationKey; this.CertificateIdentityTextBox.Text = settings.CertificateIdentity; // Set version label this.VersionLabel.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // Populate storage accounts bool https; foreach(BackupStorageAccount storageAccount in settings.StorageAccounts) { if (storageAccount.Protocol == "Https") { https = true; } else { https = false; } this.StorageAccountDataGridView.Rows.Add(storageAccount.Label, storageAccount.AccountName, storageAccount.AccountKey, https); } }
public static Form DecideForm() { var args = new List <string>(Environment.GetCommandLineArgs()); // TODO. if (args.Contains(@"-i") || args.Count <= 1 && !Installer.IsInstalled) { return(new InstallForm()); } else if (args.Contains(@"-u") || args.Count <= 1 && Installer.IsInstalled) { return(new UninstallForm()); } else if (args.Contains(@"-b") && args.Count == 3) { var r = new BackupForm(); r.Initialize(args[2]); return(r); } else if (args.Contains(@"-r") && args.Count == 3) { var r = new RestoreForm(); r.Initialize(args[2]); return(r); } else { throw new Exception("Unknown/invalid command line arguments."); } }
private void 备份_Click(object sender, EventArgs e) { BackupForm backup = new BackupForm(); backup.textBox2.Text = path; backup.ShowDialog(); }
public OptionsForm(BackupForm parentForm, BackupSettings settings) { InitializeComponent(); this.parentForm = parentForm; this.settings = settings; this.ServerAddressTextBox.Text = settings.ServerUrl; this.AuthenticationKeyTextBox.Text = settings.AuthenticationKey; this.CertificateIdentityTextBox.Text = settings.CertificateIdentity; // Set version label this.VersionLabel.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // Populate storage accounts bool https; foreach (BackupStorageAccount storageAccount in settings.StorageAccounts) { if (storageAccount.Protocol == "Https") { https = true; } else { https = false; } this.StorageAccountDataGridView.Rows.Add(storageAccount.Label, storageAccount.AccountName, storageAccount.AccountKey, https); } }
public void Backup() { try { using (var modal = new BackupForm()) { modal.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "OperationError".GetUiTranslation(), MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// handle Click event to restore shortcut /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnRestore_Click(object sender, EventArgs e) { //Restore objRestore = new Restore(); //objRestore.ShowDialog(); var objBachup = new BackupForm(); objBachup.ShowDialog(); }
private void btnUpdate_Click(object sender, EventArgs e) { this.Hide(); BackupForm backform = new BackupForm(); backform.ShowDialog(); }
/*Precondition: Postcondition: Opens up the backup form */ private void btnBackup_Click(object sender, EventArgs e) { this.Hide(); BackupForm buf = new BackupForm(this); buf.Show(); }
/// <summary> /// Show the form to backup the data /// </summary> private void BackupData() { BackupForm backup = new BackupForm(); //backup.CurrentAuthenticator = this.Authenticator; backup.CurrentAuthenticatorFile = Config.Filename; backup.CurrentConfig = this.Config; backup.ShowDialog(this); }
private void ShowForm(object Sender, BackupForm Form) { _FormCount++; // Must be before the close, as the program is otherwise terminated! //((BackupForm)Sender).Close(); Form.Closed += new EventHandler(FormClosed); Form.Show(); }
/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> public MainForm() { //this.tmrFade = new System.Timers.Timer(); //((System.ComponentModel.ISupportInitialize)(this.tmrFade)).BeginInit(); InitializeComponent(); //((System.ComponentModel.ISupportInitialize)(this.tmrFade)).EndInit(); ////Shows Dialog for BL selection //ServerSelectionForm serverSelectionForm = new ServerSelectionForm(); //serverSelectionForm.TopMost = true; //serverSelectionForm.ShowDialog(); ////Generate the Selected BusinessLogic //patComp = SPDLFactory.GetBussinessLogicObject(ServerSelectionForm.GetEndPointData());//new SPDBL(); patComp = new SPDBL(); this.newOperation = new OPControl(this.patComp); this.newOperation.Store += new NewOperationStoreEventHandler(newOperation_Store); this.newPatientControl = new NewPatientControl(this.patComp); this.newPatientControl.Store += new NewPatientStoreEventHandler(this.patientStore); this.patientSearchControl = new PatientSearchControl(); this.patientSearchControl.AddVisit += new AddVisitEventHandler(patientSearchControl_AddVisit); this.patientSearchControl.ChangePatientData += new ChangePatientDataEventHandler(patientSearchControl_ChangePatientData); this.patientSearchControl.ShowPatientData += new ShowPatientDataEventHandler(patientSearchControl_ShowPatientData); this.patientSearchControl.ShowVisits += new ShowVisitsEventHandler(patientSearchControl_ShowVisits); this.patientSearchControl.AddOperation += new AddOperationEventHandler(patientSearchControl_AddOperation); this.patientSearchControl.AddFurtherTreatment += new AddFurtherTreatmentEventHandler(patientSearchControl_AddFurtherTreatment); this.patientSearchControl.ShowOperations += new ShowOperationsEventHandler(patientSearchControl_ShowOperations); this.patientSearchControl.AddImages += new ImagesEventHandler(patientSearchControl_AddImages); this.patientSearchControl.SelectionChange += new SelectionChangeEventHandler(patientSearchControl_SelectionChange); this.patientSearchControl.PlanOP += new PlanOPEventHandler(patientSearchControl_PlanOP); this.patientSearchControl.NextAction += new NextActionEventHandler(patientSearchControl_NextAction); this.imagesControl = new ImagesControl(); this.imagesControl.Store += new PhotoStoreEventHandler(imagesControl_Store); this.imagesControl.Delete += new DeleteImageEventHandler(imagesControl_Delete); this.showOperationsControl = new ShowOperationsControl(); this.showOperationsControl.ChangeOP += new ChangeOPEventHandler(showOperationsControl_ChangeOP); this.newVisit = new NewVisit(this.patComp); this.visitsControl = new VisitsControl(); this.visitsControl.Change += new VisitChangeEventHandler(visitControl_VisitChange); this.newVisit.Store +=new NewVisitStoreEventHandler(this.visitStore); this.furtherTreatmentControl = new FinalReportControl(); this.furtherTreatmentControl.Store += new NewFinalReportStoreEventHandler(furtherTreatmentControl_Store); this.printMorePatientsControl = new PrintMorePatientsControl(); this.barDiagramm = new BarDiagram(); this.backupForm = new BackupForm(); this.nextActionControl = new NextActionControl(this.patComp); this.nextActionOverviewControl = new NextActionOverviewControl(this.patComp); this.importControl = new ImportControl(this.patComp); this.overviewControl = new OverviewControl(this.patComp); Bitmap img; img = SPD.GUI.Properties.Resources.logogross; PictureBox picBox = new PictureBox(); picBox.Image = img; picBox.Size = new Size(591, 383); picBox.Location = new System.Drawing.Point(200, 10); this.Controls.Add(picBox); img = SPD.GUI.Properties.Resources.KinderurologieLogo; picBox = new PictureBox(); picBox.Image = img; picBox.Size = new Size(482, 323); picBox.Location = new System.Drawing.Point(259, 435); this.Controls.Add(picBox); // // tmrFade // //this.tmrFade.Interval = 10; //this.tmrFade.SynchronizingObject = this; //this.tmrFade.Elapsed += new System.Timers.ElapsedEventHandler(this.tmrFade_Elapsed); //this.Opacity = 0; //this.Show(); //tmrFade.Enabled = true; this.Text = Application.ProductName + " - " + Application.ProductVersion; // + " - Development Version!!"; this.menuStrip.Items["backupToolStripMenuItem"].Enabled = patComp.SupportsBackup(); ((ToolStripMenuItem)this.menuStrip.Items["settingsToolStripMenuItem"]).DropDownItems["databaseSettingsToolStripMenuItem"].Enabled = patComp.SupportDatabaseManagement(); }