private void delPartButton_Click(object sender, EventArgs e)
        {
            BikePartList.RemPart(selectedPart);

            updatePartListBox();

            Console.WriteLine(BikePartList.PartList.Count);
            Console.WriteLine("Part LBox: " + PartListBox.Items.Count);
        }
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (File.Exists(BikePartList.serializeFile))
            {
                BikePartList.loadPartList();
                Console.WriteLine("LOAD");
                updatePartListBox();
            }

            else
            {
                MessageBox.Show("Please verify 'partlist.bin' is present.");
            }
        }
        private void addPartButton_Click(object sender, EventArgs e)
        {
            if (PartNameBox.Text.Length < 3)
            {
                MessageBox.Show("Please enter at least 3 characters for a name.");
                return;
            }

            if (PartTypeDropDown.Text.Length < 3)
            {
                MessageBox.Show("Please select a type.");
                return;
            }

            if (YearsDropdown.Text.Length < 3)
            {
                MessageBox.Show("Please select a manufacturing timeline.");
                return;
            }

            if (MfgDropDown.Text.Length < 4)
            {
                MessageBox.Show("Please select a manufacturer.");
                return;
            }

            partToAdd = new BikePart(PartNameBox.Text, PartTypeDropDown.Text, MfgDropDown.Text, YearsDropdown.Text, float.Parse(ebayPriceBox.Text));

            BikePartList.AddPart(partToAdd);

            updatePartListBox();
            PartListBox.Update();

            PartListBox.SelectedIndex = PartListBox.Items.Count - 1;

            Console.WriteLine(BikePartList.PartList.Count);
            Console.WriteLine("Part LBox: " + PartListBox.Items.Count);
        }
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     BikePartList.savePartList();
 }
 private void updatePartListBox()
 {
     PartListBox.DataSource    = null;
     PartListBox.DataSource    = BikePartList.GetPartList();
     PartListBox.DisplayMember = "display";
 }