Esempio n. 1
0
 public static SpreadsheetGUIContext GetContext()
 {
     if (context == null)
     {
         context = new SpreadsheetGUIContext();
     }
     return(context);
 }
Esempio n. 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var context = SpreadsheetGUIContext.GetContext();

            SpreadsheetGUIContext.GetContext().RunNew();
            Application.Run(context);
        }
Esempio n. 3
0
        /// <summary>
        /// Handles a request to open a new spreadsheet
        /// </summary>
        private void HandleNew()
        {
            Thread thread = new Thread(() =>
            {
                var context = SpreadsheetGUIContext.GetContext();
                SpreadsheetGUIContext.GetContext().RunNew();
                Application.Run(context);
            });

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }