public ChompShopForm() { InitializeComponent(); _controlController = new ControlController(this); ChompShopFloor.LoadReferenceKart(); }
private void loadKartToolStripMenuItem_Click(object sender, EventArgs e) { if (openKartDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (openKartDialog.FileNames.Length > 1) { ChompShopFloor.LoadKarts(openKartDialog.FileNames); } else { ChompShopFloor.LoadKarts(openKartDialog.FileName); } } }
private void newKartToolStripMenuItem_Click(object sender, EventArgs e) { //CheckIfNeedToSave(); //kartName = RequestKartName(); //ChompShopFloor.NewKart(kartName); TextInputForm form = new TextInputForm("Kart Name:", "New Kart Name"); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { //Later on, do better name verifcation if (string.IsNullOrWhiteSpace(form.TextOutput)) { MessageBox.Show("Kart Name is invalid!"); } else { ChompShopFloor.NewKart(form.TextOutput); } } }