Пример #1
0
        public ChompShopForm()
        {
            InitializeComponent();

            _controlController = new ControlController(this);

            ChompShopFloor.LoadReferenceKart();
        }
Пример #2
0
 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);
         }
     }
 }
Пример #3
0
        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);
                }
            }
        }