Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var context = SpreadsheetGUIContext.GetContext();

            SpreadsheetGUIContext.GetContext().RunNew();
            Application.Run(context);
        }
Exemplo n.º 2
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();
        }