Пример #1
0
        private void identify_button_Click(object sender, EventArgs e)
        {
            PillIdentifier pill = new PillIdentifier();

            if (pill.IdentifyPill(imprint_value.Text))
            {
                drug_result.Text           = pill.DrugName;
                strength_result.Text       = pill.PillImprint;
                imprint_result.Text        = pill.DrugStrenght;
                color_result.Text          = pill.PillColor;
                shape_result.Text          = pill.PillShape;
                pictureBox1.AccessibleName = pill.PillPhoto;
                date_result.Text           = pill.Date.ToString();
            }
            else
            {
                MessageBox.Show("That imprint you have entered is not in the data base");
            }
        }
Пример #2
0
        private void Search_Click(object sender, EventArgs e)
        {
            PillIdentifier pill = new PillIdentifier();

            if (pill.IdentifyPill(imprint_value.Text)) // change hi for what ever the database suppose to be
            {
                resultDrugName_value.Text  = pill.DrugName;
                resultImprint_value.Text   = pill.PillImprint;
                resultStrength_value.Text  = pill.DrugStrenght;
                resultColor_value.Text     = pill.PillColor;
                resultShape_value.Text     = pill.PillShape;
                pictureBox1.AccessibleName = pill.PillPhoto;

                search_container.Hide();
                modify_container.Show();
            }
            else
            {
                MessageBox.Show("That imprint you have entered is not in the data base");
            }
        }