Пример #1
0
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static PS6ApplicationContext getAppContext()
 {
     if (appContext == null)
     {
         appContext = new PS6ApplicationContext();
     }
     return(appContext);
 }
Пример #2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            PS6ApplicationContext appContext = PS6ApplicationContext.getAppContext();

            if (args.Count() > 0)
            {
                appContext.RunForm(new PS6(args[0]));
            }
            else
            {
                appContext.RunForm(new PS6());
            }
            Application.Run(appContext);
        }
Пример #3
0
 /// <summary>
 /// Called when the user clicks "New". Begins a new window.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Tell the application context to run the form on the same
     // thread as the other forms.
     PS6ApplicationContext.getAppContext().RunForm(new PS6());
 }
Пример #4
0
 /// <summary>
 /// This is the method that allows for multiple forms to be up and running.
 /// Program will terminate when the last window is closed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     PS6ApplicationContext.getAppContext().RunForm(new Form1());
 }