예제 #1
0
 public void EnableSectorAction(string sectorKey, SectorActions action, bool enable)
 {
     if(InvokeRequired)
     Invoke(new Action<string, SectorActions, bool>(EnableSectorAction), sectorKey, action, enable);
       else
       {
     try
     {
       if(!sectorActionsAbilitations.ContainsKey(sectorKey))
     sectorActionsAbilitations.Add(sectorKey, new Dictionary<SectorActions, bool>());
       if(!sectorActionsAbilitations[sectorKey].ContainsKey(action))
     sectorActionsAbilitations[sectorKey].Add(action, false);
       sectorActionsAbilitations[sectorKey][action] = enable;
     }
     catch(Exception ex)
     {
       HandleException(ex);
     }
       }
 }
 public bool Supports(SectorActions action)
 {
     return supportEntries[action];
 }