コード例 #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());
 }