예제 #1
0
파일: Program.cs 프로젝트: jimibue/cs3505
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static DemoApplicationContext getAppContext()
 {
     if (appContext == null)
     {
         appContext = new DemoApplicationContext();
     }
     return appContext;
 }
예제 #2
0
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static DemoApplicationContext getAppContext()
 {
     if (appContext == null)
     {
         appContext = new DemoApplicationContext();
     }
     return(appContext);
 }
예제 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Start an application context and run one form inside it
            DemoApplicationContext appContext = DemoApplicationContext.getAppContext();

            appContext.RunForm(new spreadsheetWinForm());
            Application.Run(appContext);
        }
예제 #4
0
파일: Demo.cs 프로젝트: rensk63/cs-3500
 // Deals with the New menu
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Tell the application context to run the form on the same
     // thread as the other forms.
     DemoApplicationContext.getAppContext().RunForm(new Form1());
 }
예제 #5
0
 /// <summary>
 /// Tells the application context to run the form on the same
 /// thread as the other forms.
 /// </summary>
 private static void RunNewForm()
 {
     DemoApplicationContext.getAppContext().RunForm(new SpreadsheetForm());
 }