private void buttonNewDocument_Click(object sender, RoutedEventArgs e) { NewDocumentDialog docDia = new NewDocumentDialog(); docDia.Closed += new EventHandler(docDia_Closed); docDia.Show(); }
private void btnNew_Click(object sender, EventArgs e) { if (Util.AskForSave(document)) { /*KDocument doc = new KDocument(); * doc.Pages.Add(new KPage()); * doc.SetCurrentStateAsSaved(); * window.SetDocument(doc); * CloseMenu?.Invoke();*/ NewDocumentDialog pa = new NewDocumentDialog(control, document, window); pa.Width = 5 * Util.GetGUISize(); pa.Dock = DockStyle.Left; this.Parent.Controls.Add(pa); pa.BringToFront(); pa.Show(); this.Hide(); pa.Close += new CloseDelegate(delegate() { CloseMenu?.Invoke(); }); this.parent.Refresh(); } }