Пример #1
0
 private void Add(Object sender, EventArgs e)
 {
     try
     {
         FrmShortCut kseg = new FrmShortCut();
         kseg.ShowDialog();
         if (kseg.DialogResult == DialogResult.OK)
         {
             shortCutList = AppVariables.AllList;
             Utility.List2ListView(lstShortCuts, shortCutList);
         }
         return;
     }
     catch (Exception ex)
     {
         MessageUtil.Error("Shortcuts could not be loaded.");
         Logger.WriteException(ex, "ShortCut DoubleClick", "Program could not be started.");
     }
 }
Пример #2
0
 private void Update(Object sender, EventArgs e)
 {
     try
     {
         if (lstShortCuts.Items.Count > 0 && lstShortCuts.SelectedItems.Count > 0)
         {
             FrmShortCut kseg = new FrmShortCut(shortCutList[lstShortCuts.SelectedIndices[0]].Id);
             kseg.ShowDialog();
             if (kseg.DialogResult == DialogResult.OK)
             {
                 shortCutList = AppVariables.AllList;
                 Utility.List2ListView(lstShortCuts, shortCutList);
             }
         }
         return;
     }
     catch (Exception ex)
     {
         MessageUtil.Error("An Error occured at Updating shortcut!..");
         Logger.WriteException(ex, "An error occured at updating shortcut.", "ERR_UPDATE");
     }
 }