Exemple #1
0
 private void ChangeEnablalContestPower(ContestPower cp)
 {
     rb100w.IsEnabled = rb1020w.IsEnabled = rb5w.IsEnabled = rbLicense.IsEnabled = false;
     rb100w.IsChecked = rb1020w.IsChecked = rb5w.IsChecked = rbLicense.IsChecked = false;
     if (cp == ContestPower.None)
     {
         return;
     }
     if (cp.HasFlag(ContestPower.License))
     {
         rbLicense.IsEnabled = true;
     }
     if (cp.HasFlag(ContestPower.Hundred))
     {
         rb100w.IsEnabled = true;
     }
     if (cp.HasFlag(ContestPower.TwentyTen))
     {
         rb1020w.IsEnabled = true;
     }
     if (cp.HasFlag(ContestPower.Five))
     {
         rb5w.IsEnabled = true;
     }
 }
Exemple #2
0
 public string GetCodeDivPower(string code, ContestPower power)
 {
     if (power.HasFlag(ContestPower.TwentyTen) || GetPowerAllowed(code) == ContestPower.License)
     {
         return(code);
     }
     else
     {
         return(code.Substring(0, code.Length - 1));
     }
 }
Exemple #3
0
 public string GetCodeWithPower(string code, ContestPower power)
 {
     if (power.HasFlag(ContestPower.TwentyTen) || GetPowerAllowed(code) == ContestPower.License)
     {
         return(code);
     }
     else
     {
         if (power.HasFlag(ContestPower.License))
         {
             return(code + "H");
         }
         else if (power.HasFlag(ContestPower.Hundred))
         {
             return(code + "M");
         }
         else
         {
             return(code + "P");
         }
     }
 }
Exemple #4
0
 public string GetCodeDivPower(string code, ContestPower power)
 {
     if(power.HasFlag(ContestPower.TwentyTen) || GetPowerAllowed(code) == ContestPower.License)
         return code;
     else {
         return code.Substring(0, code.Length - 1);
     }
 }
Exemple #5
0
 public string GetCodeWithPower(string code, ContestPower power)
 {
     if(power.HasFlag(ContestPower.TwentyTen) || GetPowerAllowed(code) == ContestPower.License)
         return code;
     else {
         if(power.HasFlag(ContestPower.License)) return code + "H";
         else if(power.HasFlag(ContestPower.Hundred)) return code + "M";
         else return code + "P";
     }
 }
Exemple #6
0
 private void ChangeEnablalContestPower(ContestPower cp)
 {
     rb100w.IsEnabled = rb1020w.IsEnabled = rb5w.IsEnabled = rbLicense.IsEnabled = false;
     rb100w.IsChecked = rb1020w.IsChecked = rb5w.IsChecked = rbLicense.IsChecked = false;
     if (cp == ContestPower.None) return;
     if (cp.HasFlag(ContestPower.License)) rbLicense.IsEnabled = true;
     if (cp.HasFlag(ContestPower.Hundred)) rb100w.IsEnabled = true;
     if (cp.HasFlag(ContestPower.TwentyTen)) rb1020w.IsEnabled = true;
     if (cp.HasFlag(ContestPower.Five)) rb5w.IsEnabled = true;
 }