private void editSyncComp()
 {
     try
     {
         var sc = getSelectedSyncComp();
         if (sc == null) return;
         var d = new WndSyncComps(this, sc, AddEditMode.Edit);
         var showDialog = d.ShowDialog();
         if (showDialog != null && showDialog.Value)
         {
             fillSyncComps(false);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
 private void cmdAddComp_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var d = new WndSyncComps(this, AddEditMode.Add);
         var showDialog = d.ShowDialog();
         if (showDialog != null && showDialog.Value)
         {
             fillSyncComps(false);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }