/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void windowNewTextEditor(object sender, EventArgs e) { formTextEditor textEditorInstance = new formTextEditor(); textEditorInstance.MdiParent = this; textEditorInstance.Show(); textEditorInstance.Focus(); }
/// <summary> /// The program will ask the user to select a location to save the file /// </summary> public void FileSaveAs(object sender, EventArgs e) { if (this.MdiChildren.Length > 0) { if (this.ActiveMdiChild.GetType() == typeof(formTextEditor)) { formTextEditor textEditorInstance = (formTextEditor)this.ActiveMdiChild; textEditorInstance.FileSaveAs(sender, e); } } }
/// <summary> /// Copying stuff to the clipboard /// </summary> public void EditCopy(object sender, EventArgs e) { if (this.MdiChildren.Length > 0) { if (this.ActiveMdiChild.GetType() == typeof(formTextEditor)) { formTextEditor textEditorInstance = (formTextEditor)this.ActiveMdiChild; textEditorInstance.EditCopy(sender, e); } else { MessageBox.Show("The copy operation is not supposted by the current selected window."); } } }
/// <summary> /// After copying something to the clipboard you can paste it using this /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditPaste(object sender, EventArgs e) { if (this.ActiveMdiChild != null) { if (this.ActiveMdiChild.GetType() == typeof(formTextEditor)) { formTextEditor textEditorInstance = (formTextEditor)this.ActiveMdiChild; textEditorInstance.EditPaste(sender, e); } else { MessageBox.Show("The Paste operation is not supposted by the current selected window."); } } }