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); } }
void Update() { StaticPicture.Update(); InfoLabel.Text = StaticPicture.GetInfo(); pbShowPictures.Image = StaticPicture.BmpCopy; UpdateFeatures(); }
private void LbSearchresulltListbox_SelectedIndexChanged(object sender, EventArgs e) { string name = lbSearchresulltListbox.SelectedItem.ToString(); Picture pic = StaticAlbum.GetPicture(name); StaticPicture.CopyActualPicture(pic); Update(); }
void UpdateNPA() { StaticPicture.namePic = textBoxPictureName.Text; StaticPicture.photographer = textBoxPicturePhotographer.Text; StaticPicture.adress = textBoxPeopleAdress.Text; StaticPicture.Update(); UpdateListBoxFeatures(); Update(); }
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(); }
private void BtnAddToActualpic_Click(object sender, EventArgs e) { try { StaticPicture.AddLabel(StaticAlbum.SearchLabel(LabelListBoxColection.SelectedItem.ToString())); } catch (NullReferenceException) { } }
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) { } }
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(); }
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) { } }
//-----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) { } }
void UpdatePic(Picture pic) { StaticPicture.CopyActualPicture(pic); Update(); }
void Update() { InfoLabel.Text = StaticPicture.GetInfo(); pbShowPictures.Image = (StaticPicture.BmpCopy); }