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