/// <summary> /// Opens a new form with a new spreadsheet panel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void newToolStripMenuItem_Click(object sender, EventArgs e) { NewF newForm = new NewF(this); newForm.Visible = true; newForm.SetDesktopLocation(x, y); x += 30; y += 30; }
public void newOpen(string filename) { if (fileList != null) { if (fileList.Contains(filename)) { DialogResult result = MessageBox.Show("That filename already exist.\n" + "Please choose a different filename.", "Spreadsheet | Error", MessageBoxButtons.OK); if (result == DialogResult.OK) { NewF newForm = new NewF(this); newForm.Visible = true; newForm.SetDesktopLocation(x, y); x += 30; y += 30; } } else { //scm.SendMessage("CREATE" + "\\e" + filename + "\\e\\e\\e\n"); SpreadsheetApplicationContext.getAppContext().RunForm(new Form1(filename, username, port, password)); } } }