public void Restore() { try { using (var modal = new RestoreForm()) { modal.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "OperationError".GetUiTranslation(), MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void RestoreMenuItem_Click(object sender, EventArgs e) { RestoreForm restoreForm = new RestoreForm(); DialogResult result = restoreForm.ShowDialog(); if (result == DialogResult.OK) { SPSiteCollection collection = CurrentNode.Tag as SPSiteCollection; Cursor.Current = Cursors.WaitCursor; collection.Restore( restoreForm.tbSiteName.Text, restoreForm.tbFilename.Text, restoreForm.cbOverride.Checked, restoreForm.cbHostHeader.Checked); Cursor.Current = Cursors.Default; } }