/// <summary> /// Returns the one DemoApplicationContext. /// </summary> public static ViewApplicationContext GetContext() { if (context == null) { context = new ViewApplicationContext(); } return(context); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Get the application context and run one form inside it var context = ViewApplicationContext.GetContext(); ViewApplicationContext.GetContext().RunNew(); Application.Run(context); }
/// <summary> /// Opens new window /// </summary> public void NewSpreadsheet() { ViewApplicationContext.GetContext().RunNew(); }
/// <summary> /// Handles a request to open a new window in a different sheet /// </summary> public void HandleOpenInNew() { ViewApplicationContext.GetContext().RunAndOpenNew(); window.SetCellSelection(0, 0); HandleGetCellContents("A1"); }