Beispiel #1
0
 private void btnCopy_Click(object sender, EventArgs e)
 {
     //Copy a kart
     if (SelectedKart != null)
     {
         ChompShopFloor.CopyKart(SelectedKart);
     }
 }
Beispiel #2
0
 private void btnAddKart_Click(object sender, EventArgs e)
 {
     //Add a kart
     if (openKartDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         ChompShopFloor.LoadKarts(openKartDialog.FileName);
     }
 }
Beispiel #3
0
 private void btnSaveRef_Click(object sender, EventArgs e)
 {
     //Save the reference kart, and select the rad
     if (ChompShopFloor.ReferenceKart != null)
     {
         ChompShopFloor.SaveReferenceKart();
         radUseFile.Checked = true;
         radUseFile.Enabled = true;
     }
 }
Beispiel #4
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     //Remove a kart
     if (SelectedKart != null)
     {
         KartWrapper kart = SelectedKart;
         ChompShopFloor.RemoveKart(kart);
         ChompShopForm.ControlController.ClearKartForms(kart); //Move to an alert if we use this line anywhere else?
     }
 }
Beispiel #5
0
 private void btnExport_Click(object sender, EventArgs e)
 {
     if (_checkedWrappers.Count > 0)
     {
         if (saveKartDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             ChompShopFloor.SaveKartToDisk(saveKartDialog.FileName, _checkedWrappers);
         }
     }
 }
Beispiel #6
0
        private void radCheckedChanged(object sender, EventArgs e)
        {
            if (_initializing)
            {
                return;
            }

            lbKarts.Enabled    = radUseKart.Checked;
            btnSaveRef.Enabled = radUseKart.Checked;

            if (radUseFile.Checked)
            {
                ChompShopFloor.LoadReferenceKart();
            }
            else if (radDontUse.Checked)
            {
                ChompShopFloor.ClearReferenceKart();
            }
        }
Beispiel #7
0
        private void lbKarts_SelectedIndexChanged(object sender, EventArgs e)
        {
            btnSaveRef.Enabled = (lbKarts.SelectedIndex != -1);

            ChompShopFloor.LoadReferenceKart((KartWrapper)lbKarts.SelectedItem);
        }