コード例 #1
0
        void UpdateListBoxFeatures()
        {
            PeopleListBoxColection.Items.Clear();
            foreach (string name in StaticAlbum.ShowPeopleNames())
            {
                PeopleListBoxColection.Items.Add(name);
            }

            LabelListBoxColection.Items.Clear();
            foreach (string name in StaticAlbum.ShowLabelNames())
            {
                LabelListBoxColection.Items.Add(name);
            }

            PictureLabelListBox.Items.Clear();
            foreach (string name in StaticPicture.ShowLabelListPic())
            {
                PictureLabelListBox.Items.Add(name);
            }

            PicturePeopleListBox.Items.Clear();
            foreach (string name in StaticPicture.ShowPersonListPic())
            {
                PicturePeopleListBox.Items.Add(name);
            }

            TagPeopleListBox.Items.Clear();
            foreach (string name in StaticAlbum.ShowPeopleNames())
            {
                TagPeopleListBox.Items.Add(name);
            }
        }
コード例 #2
0
 void Update()
 {
     StaticPicture.Update();
     InfoLabel.Text       = StaticPicture.GetInfo();
     pbShowPictures.Image = StaticPicture.BmpCopy;
     UpdateFeatures();
 }
コード例 #3
0
        private void LbSearchresulltListbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  name = lbSearchresulltListbox.SelectedItem.ToString();
            Picture pic  = StaticAlbum.GetPicture(name);

            StaticPicture.CopyActualPicture(pic);
            Update();
        }
コード例 #4
0
 void UpdateNPA()
 {
     StaticPicture.namePic      = textBoxPictureName.Text;
     StaticPicture.photographer = textBoxPicturePhotographer.Text;
     StaticPicture.adress       = textBoxPeopleAdress.Text;
     StaticPicture.Update();
     UpdateListBoxFeatures();
     Update();
 }
コード例 #5
0
 void UpdateFeatures()
 {
     textBoxPictureName.Text         = StaticPicture.namePic;
     textBoxPicturePhotographer.Text = StaticPicture.photographer;
     textBoxPeopleAdress.Text        = StaticPicture.adress;
     lblAspectRatioLabel.Text        = StaticPicture.aspectRatio;
     lblResolutionLabel.Text         = StaticPicture.resolution;
     lblSaturationLabel.Text         = StaticPicture.saturation;
     StaticPicture.Update();
 }
コード例 #6
0
 private void BtnAddToActualpic_Click(object sender, EventArgs e)
 {
     try
     {
         StaticPicture.AddLabel(StaticAlbum.SearchLabel(LabelListBoxColection.SelectedItem.ToString()));
     }
     catch (NullReferenceException)
     {
     }
 }
コード例 #7
0
 private void LbPictureListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string  name = lbPictureListBox.SelectedItem.ToString();
         Picture pic  = StaticAlbum.GetPicture(name);
         StaticPicture.CopyActualPicture(pic);
         Update();
     }
     catch (NullReferenceException)
     {
     }
 }
コード例 #8
0
 void UpdateListBox()
 {
     AllPicsListBox.Items.Clear();
     foreach (string name in StaticAlbum.ShowNames())
     {
         AllPicsListBox.Items.Add(name);
     }
     SelectedPicListBox.Items.Clear();
     foreach (string name in StaticAlbum.ShowSelectedNames())
     {
         SelectedPicListBox.Items.Add(name);
     }
     b = false;
     StaticPicture.Update();
 }
コード例 #9
0
 private void BtnDelatePersonOfPicture_Click(object sender, EventArgs e)
 {
     try
     {
         int index = PicturePeopleListBox.SelectedIndex;
         StaticPicture.DelatePerson(index);
         try
         {
             UpdateListBoxFeatures();
         }
         catch (NullReferenceException)
         {
         }
         Update();
     }
     catch (NullReferenceException)
     {
     }
     catch (ArgumentOutOfRangeException)
     {
     }
 }
コード例 #10
0
 //-----EDIT FEATURES TAG EVENTS-----//
 private void TagPersonBtn_Click(object sender, EventArgs e)
 {
     try
     {
         string name = TagPeopleListBox.SelectedItem.ToString();
         Person p    = StaticAlbum.SearchPerson(name);
         int    X    = Convert.ToInt32(lblXCoordenadas.Text);
         int    Y    = Convert.ToInt32(lblYCoordenadas.Text);
         StaticPicture.AddPerson(p, X, Y);
         Coordenada co = new Coordenada(X, Y, p);
         try
         {
             StaticPicture.BmpCopy = Filters.TagPerson(co, StaticPicture.BmpCopy, Convert.ToInt32(numericUpDownFaceSize.Value));
             Update();
         }
         catch (NullReferenceException)
         {
             MessageBox.Show("No picture loaded");
         }
     }
     catch (NullReferenceException)
     {
     }
 }
コード例 #11
0
 void UpdatePic(Picture pic)
 {
     StaticPicture.CopyActualPicture(pic);
     Update();
 }
コード例 #12
0
 void Update()
 {
     InfoLabel.Text       = StaticPicture.GetInfo();
     pbShowPictures.Image = (StaticPicture.BmpCopy);
 }