/// <summary>
 /// Returns the one ApplicationContext.
 /// </summary>
 public static SpreadsheetGUIApplicationContext GetContext()
 {
     if (context == null)
     {
         context = new SpreadsheetGUIApplicationContext();
     }
     return(context);
 }
예제 #2
0
        /// <summary>
        /// Open.
        /// </summary>
        public void DoOpen()
        {
            OpenFileDialog open = new OpenFileDialog();

            open.Filter           = "spreadsheet files (*.ss)|*.ss|All files (*.*)|*.*";
            open.RestoreDirectory = true;
            if (open.ShowDialog() == DialogResult.OK)
            {
                SpreadsheetGUIApplicationContext.GetContext().RunNew(open.FileName);
            }
        }
예제 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Get the application context and run one form inside it
            var context = SpreadsheetGUIApplicationContext.GetContext();

            context.RunNew();
            Application.Run(context);
        }
예제 #4
0
 /// <summary>
 /// New.
 /// </summary>
 public void OpenNew()
 {
     SpreadsheetGUIApplicationContext.GetContext().RunNew();
 }