Ejemplo n.º 1
0
 /// <summary>
 /// Returns the one FormApplicationContext.
 /// </summary>
 public static FormApplication getAppContext()
 {
     if (appContext == null)
     {
         appContext = new FormApplication();
     }
     return(appContext);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Method that opens file.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //opens up an open dialog, prompts the user the choose destination, give it a name and open the folder.
            OpenFileDialog openDialog = new OpenFileDialog();

            if (openDialog.ShowDialog() == DialogResult.OK)
            {
                FormApplication.getAppContext().RunForm(new Form1(openDialog.FileName));
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Method that envokes a new item from the file strip.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //opens up a new Form.
     FormApplication.getAppContext().RunForm(new Form1());
 }