コード例 #1
0
        private void CommandBindingEditPersonGroup_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            PersonGroup personGroup = dataBase.GetPersonGroupByName(ComboBoxName.Text, false);

            if (personGroup != null)
            {
                PersonGroupWindow pgw = new PersonGroupWindow(dataBase, PersonType.Unknown, personGroup);
                pgw.ShowDialog();
            }
        }
コード例 #2
0
        private void buttonNew_Click(object sender, EventArgs e)
        {
            PersonGroup personGroup = new PersonGroup();

            PersonGroupWindow personGroupWindow = new PersonGroupWindow(dataBase, PersonType.Unknown, personGroup);

            if (personGroupWindow.ShowDialog() == true)
            {
                UpdateWindowState();
                FillArtistList();
            }
        }
コード例 #3
0
        private void listboxParticipantPicture_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (listboxParticipantPicture.SelectedItem == null)
            {
                return;
            }

            GroupParticipant groupParticipant = listboxParticipantPicture.SelectedItem as GroupParticipant;

            if (groupParticipant == null)
            {
                return;
            }

            PersonGroup       personGroup = DataBase.GetPersonGroupByName(groupParticipant.Name, false);
            PersonGroupWindow pgw         = new PersonGroupWindow(DataBase, PersonType.Unknown, personGroup);

            pgw.Owner = Window.GetWindow(this);
            pgw.ShowDialog();

            // Refresh
            this.PersonGroup = DataBase.GetPersonGroupByName(this.PersonGroup.Name, false);
        }
コード例 #4
0
        private void Edit()
        {
            PersonGroupDataSet.PersonGroupRow personGroupRow = GetSelectedRow();

            if (personGroupRow == null)
            {
                return;
            }

            PersonGroup       personGroup       = dataBase.GetPersonGroupById(personGroupRow.PersonGroupID);
            PersonGroupWindow personGroupWindow = new PersonGroupWindow(dataBase, PersonType.Unknown, personGroup);

            personGroupWindow.ChangeAllSoundFiles = true;

            int    oldPersonGroupId = personGroup.ID;
            string oldPersonGroup   = personGroup.Name;

            if (personGroupWindow.ShowDialog() == true)
            {
                personGroupListBox.ClearImageCache();
                personGroupListBox.Invalidate(false);
            }
        }