Example #1
0
 /// <summary>
 /// Prints information about the current application.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Help(object sender, EventArgs e)
 {
     if (this.MdiChildren.Length > 0)
     {
         if (this.ActiveMdiChild.GetType() == typeof(formTextEditor))
         {
             formTextEditor textEditorInstance = (formTextEditor)this.ActiveMdiChild;
             textEditorInstance.HelpAbout(sender, e);
         }
         else if (this.ActiveMdiChild.GetType() == typeof(AverageUnitsShipped))
         {
             AverageUnitsShipped averageUnitsShippedInstance = (AverageUnitsShipped)this.ActiveMdiChild;
             averageUnitsShippedInstance.AverageUnitsShippedHelp();
         }
         else if (this.ActiveMdiChild.GetType() == typeof(formAwesomeness))
         {
             formAwesomeness awesomenessInstance = (formAwesomeness)this.ActiveMdiChild;
             awesomenessInstance.AwesomenessHelp();
         }
         else if (this.ActiveMdiChild.GetType() == typeof(CarInventory))
         {
             CarInventory carHelpInstance = (CarInventory)this.ActiveMdiChild;
             carHelpInstance.CarHelp();
         }
         else
         {
             MessageBox.Show("The Help operation is not supported by the current selected window.");
         }
     }
     else
     {
         MessageBox.Show("Final Project\n" + "By Nimsith Fernandopulle and Gaelen Rhoads\n\n" + "For NETD 2202" +
                         "\n" + "April 2021", "About this Application");
     }
 }
Example #2
0
 /// <summary>
 /// Saves a file to the users computer for the first time.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private 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);
         }
         else if (this.ActiveMdiChild.GetType() == typeof(AverageUnitsShipped))
         {
             AverageUnitsShipped UnitsShippedInstance = (AverageUnitsShipped)
                                                        this.ActiveMdiChild;
             MessageBox.Show("This application doesn’t support that functionality");
         }
         else if (this.ActiveMdiChild.GetType() == typeof(CarInventory))
         {
             CarInventory UnitsShippedInstance = (CarInventory)
                                                 this.ActiveMdiChild;
             MessageBox.Show("This application doesn’t support that functionality");
         }
         else if (this.ActiveMdiChild.GetType() == typeof(formAwesomeness))
         {
             formAwesomeness UnitsShippedInstance = (formAwesomeness)
                                                    this.ActiveMdiChild;
             MessageBox.Show("This application doesn’t support that functionality");
         }
     }
 }
Example #3
0
        /// <summary>
        /// Opens Awesomeness application.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void WindowNewAwesomeness(object sender, EventArgs e)
        {
            formAwesomeness awesomenessInstance = new formAwesomeness();

            awesomenessInstance.MdiParent = this;
            awesomenessInstance.Show();
            awesomenessInstance.Focus();
        }