Example #1
0
        private void Save_Clck(object sender, EventArgs e)
        {
            PillDB         database = new PillDB();
            PillIdentifier pill     = new PillIdentifier(imprint_value.Text, resultColor_value.Text, resultShape_value.Text,
                                                         resultDrugName_value.Text, resultStrength_value.Text, "Testing.png");


            database.UpdatePet(pill);
        }
Example #2
0
        private void add_button_Click(object sender, EventArgs e)
        {
            string pillImprint  = pillImprint_value.Text;
            string pillColor    = color_value.Text;
            string pillShape    = shape_value.Text;
            string pillName     = drugName_value.Text;
            string pillStrength = strength_value.Text;
            PillDB database     = new PillDB();

            PillIdentifier pill = new PillIdentifier(pillImprint, pillColor, pillShape, pillName, pillStrength, "Intento1.png");

            database.InsertPill(pill);
        }
        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");
            }
        }
Example #4
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");
            }
        }