示例#1
0
 /// <summary>
 /// Returns the one FormApplicationContext.
 /// </summary>
 public static FormApplication getAppContext()
 {
     if (appContext == null)
     {
         appContext = new FormApplication();
     }
     return(appContext);
 }
示例#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));
            }
        }
示例#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());
 }