Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
 /// <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);
         }
     }
 }
Exemplo n.º 3
0
 /// <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.");
         }
     }
 }
Exemplo n.º 4
0
 /// <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.");
         }
     }
 }