Example #1
0
 private void SetChaves()
 {
     try
     {
         _memorias.SetF(false);
         _memorias.SetG(false);
         Control.ControlCollection controls = pnCalculator.Controls;
         foreach (Control item in controls)
         {
             if (item.GetType() == typeof(Botao))
             {
                 ((Botao)item).DesativarFuncoes();
             }
         }
         if (_chave != EnumChave.isento)
         {
             if (_chave == EnumChave.F)
             {
                 _memorias.SetF(true);
             }
             else if (_chave == EnumChave.G)
             {
                 _memorias.SetG(true);
             }
             foreach (Control item in controls)
             {
                 if (item.GetType() == typeof(Botao))
                 {
                     SetChaveBotao((Botao)item);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }