Ejemplo n.º 1
0
 private void cmdAddContactGroup_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var newID = 0;
         if (_Groups.Count > 0)
         {
             newID = _Groups.Max(g => g.ID) + 1;
         }
         var dlgContactGroup = new WndGroups(newID) { Owner = this };
         dlgContactGroup.ContactGroupChanged += dlgContactGroup_ContactGroupChanged;
         var showDialog = dlgContactGroup.ShowDialog();
         if (showDialog != null && !showDialog.Value)
         {
             dlgContactGroup.ContactGroupChanged -= dlgContactGroup_ContactGroupChanged;
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
Ejemplo n.º 2
0
 private void editContactsGroup()
 {
     try
     {
         var gr = getSelectedContactsGroup();
         if (gr == null) return;
         var dlgContactGroup = new WndGroups(gr) { Owner = this };
         dlgContactGroup.ContactGroupChanged += dlgContactGroup_ContactGroupChanged;
         var showDialog = dlgContactGroup.ShowDialog();
         if (showDialog != null && !showDialog.Value)
         {
             dlgContactGroup.ContactGroupChanged -= dlgContactGroup_ContactGroupChanged;
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
Ejemplo n.º 3
0
 private void actionAddContactsGroup()
 {
     try
     {
         var newId = 0;
         if (PNStatic.ContactGroups.Count > 0)
         {
             newId = PNStatic.ContactGroups.Max(g => g.ID) + 1;
         }
         var dlgContactGroup = new WndGroups(newId) { Owner = this };
         dlgContactGroup.ContactGroupChanged += dlgContactGroup_ContactGroupChanged;
         var showDialog = dlgContactGroup.ShowDialog();
         if (showDialog == null || !showDialog.Value)
         {
             dlgContactGroup.ContactGroupChanged -= dlgContactGroup_ContactGroupChanged;
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }