Esempio n. 1
0
        public ViewDetailForm()
        {
            InitializeComponent();
            if (UploadForm.selectedrb.Text == "isPhoto")
            {
                var path = client.GetPhotoByID(ResultsForm.photoID).Path;
                pictureBox1.Image    = new Bitmap(path);
                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            else
            {
                (new VideoPlayer()).Show();
                this.Hide();
            }

            photo_name.Text = client.GetPhotoByID(ResultsForm.photoID).Name;
        }
Esempio n. 2
0
 private void search_btn_Click(object sender, EventArgs e)
 {
     resultList = new List <PhotoModel>();
     if (searchTextBox.Text == null)
     {
         MessageBox.Show("Please add something!");
     }
     if (client.SearchPhotoByName(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchPhotoByName(searchTextBox.Text).Length; i++)
         {
             var photo = client.SearchPhotoByName(searchTextBox.Text);
             if (photo.ElementAt(i).IsDeleted == false)
             {
                 resultList.Add(photo.ElementAt(i));
             }
         }
     }
     if (client.SearchByLocation(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchByLocation(searchTextBox.Text).Length; i++)
         {
             var photo = client.SearchByLocation(searchTextBox.Text);
             if (photo.ElementAt(i).IsDeleted == false)
             {
                 resultList.Add(photo.ElementAt(i));
             }
         }
     }
     if (client.SearchByCreationDate(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchByCreationDate(searchTextBox.Text).Length; i++)
         {
             var photo = client.SearchByCreationDate(searchTextBox.Text);
             if (photo.ElementAt(i).IsDeleted == false)
             {
                 resultList.Add(photo.ElementAt(i));
             }
         }
     }
     if (client.SearchEventByName(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchEventByName(searchTextBox.Text).Length; i++)
         {
             var events = client.SearchEventByName(searchTextBox.Text);
             var photo  = client.GetPhotoByID(events.ElementAt(i).Id);
             if (photo.IsDeleted == false)
             {
                 resultList.Add(photo);
             }
         }
     }
     if (client.SearchPeopleByName(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchPeopleByName(searchTextBox.Text).Length; i++)
         {
             var people = client.SearchPeopleByName(searchTextBox.Text);
             var photo  = client.GetPhotoByID(people.ElementAt(i).Id);
             if (photo.IsDeleted == false)
             {
                 resultList.Add(photo);
             }
         }
     }
     if (client.SearchByKey(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchByKey(searchTextBox.Text).Length; i++)
         {
             var people = client.SearchByKey(searchTextBox.Text);
             var photo  = client.GetPhotoByID(people.ElementAt(i).Id);
             if (photo.IsDeleted == false)
             {
                 resultList.Add(photo);
             }
         }
     }
     if (client.SearchByValue(searchTextBox.Text).Length != 0)
     {
         for (var i = 0; i < client.SearchByValue(searchTextBox.Text).Length; i++)
         {
             var people = client.SearchByValue(searchTextBox.Text);
             var photo  = client.GetPhotoByID(people.ElementAt(i).Id);
             if (photo.IsDeleted == false)
             {
                 resultList.Add(photo);
             }
         }
     }
     (new ResultsForm()).Show();
     this.Hide();
 }
Esempio n. 3
0
 private void play_btn_Click(object sender, EventArgs e)
 {
     axWindowsMediaPlayer1.URL = client.GetPhotoByID(ResultsForm.photoID).Path;
     axWindowsMediaPlayer1.Ctlcontrols.play();
 }