/// <summary> /// From the menu bar, "open" button opens a new GUI window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void newButton_Click(object sender, EventArgs e) { SpreadsheetGUI newWindow = new SpreadsheetGUI(); int count = SSApplicationContext.getAppContext().RunWindow(newWindow); newWindow.Text = "Spreadsheet " + count; // change spreadsheet title }
/// <summary> /// Returns the one SSApplicationContext. /// </summary> public static SSApplicationContext getAppContext() { if (appContext == null) { appContext = new SSApplicationContext(); } return(appContext); }
internal void CreateSpreadsheet(SpreadSheetForm spreadSheetForm) { if (this.InvokeRequired) { ssDelegate n = new ssDelegate(CreateSpreadsheet); this.Invoke(n, spreadSheetForm); return; } SSApplicationContext.getAppContext().RunForm(spreadSheetForm); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SSApplicationContext appContext = SSApplicationContext.getAppContext(); appContext.RunForm(new Form1("")); Application.Run(appContext); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SSApplicationContext appContext = SSApplicationContext.getAppContext(); appContext.RunWindow(new SpreadsheetGUI()); Application.Run(appContext); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SSApplicationContext appContext = SSApplicationContext.getAppContext(); string path = null; if (args.Length > 0) { path = args[0]; } // Tell the application context to run the form on the same // thread as the other forms. //appContext.RunForm(new SplashForm()); appContext.RunForm(new SpreadSheetForm(false, "", "", new SSController(new ClientController()))); Application.Run(appContext); }
//Event Handler for New Spreadsheet private void newMenuItem_Click(object sender, EventArgs e) { SSApplicationContext.getAppContext().RunForm(new Form1("")); }
/// <summary> /// Returns the one DemoApplicationContext. /// </summary> public static SSApplicationContext getAppContext() { if (appContext == null) { appContext = new SSApplicationContext(); } return appContext; }