Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();

            detailsBox.Items.Clear();
            string path = Convert.ToString(textBox1.Text);

            textBoxPath.Clear();
            locationBox.Clear();
            PersoaneBox.Clear();

            open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
            if (open.ShowDialog() == DialogResult.OK)
            {
                Bitmap bmp = new Bitmap(open.FileName);
                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox1.Image    = bmp;
                textBox1.Text        = open.FileName;
                textBoxPath.Text     = open.FileName;


                if (client.checkPath(textBoxPath.Text) == false)
                {
                    List <string> aux = client.getDetails(textBoxPath.Text);
                    locationBox.Text      = aux[1];
                    anotimpBox.Text       = aux[2];
                    dateTimePicker1.Value = Convert.ToDateTime(aux[3]);
                    PersoaneBox.Text      = aux[4];
                    Details(aux[0], aux[1], aux[2], Convert.ToDateTime(aux[3]), aux[4]);
                }
            }
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            detailsBox.Items.Clear();
            string path = Convert.ToString(textBox1.Text);

            textBoxPath.Clear();
            locationBox.Clear();
            PersoaneBox.Clear();
            if (client.checkPath(path) == false)
            {
                List <string> aux = client.getDetails(path);

                textBoxPath.Text      = aux[0];
                locationBox.Text      = aux[1];
                anotimpBox.Text       = aux[2];
                dateTimePicker1.Value = Convert.ToDateTime(aux[3]);
                PersoaneBox.Text      = aux[4];
                Details(aux[0], aux[1], aux[2], Convert.ToDateTime(aux[3]), aux[4]);
            }
            else
            {
                MessageBox.Show("Imaginea nu exista in baza de date");
            }
        }