Beispiel #1
0
 public static KeyPadLayout GetKeyPadLayout(MatrixMX.KeyPadControl KPSettings)
 {
   KeyPadLayout layout = new KeyPadLayout();
   layout.EnableKeyPad = false;
   layout.EnableCustom = false;
   layout.KeyPadMapping = false;
   layout.Label1 = false;
   string type = Settings.Instance.Type;
   if (type != null)
   {
     if (!(type == "CFontz") && !(type == "MatrixMX"))
     {
       if (((type == "VLSYS_Mplay") || (type == "MatrixGX")) || (type == "iMONLCDg")) {}
     }
     else
     {
       layout.EnableKeyPad = true;
       if (KPSettings.EnableKeyPad)
       {
         layout.EnableCustom = true;
         if (KPSettings.EnableCustom)
         {
           layout.KeyPadMapping = true;
         }
       }
       return layout;
     }
   }
   layout.Label1 = true;
   return layout;
 }
Beispiel #2
0
 public static void SaveKeyPadSettings(MatrixMX.KeyPadControl KeyPadOptions)
 {
   string type = Settings.Instance.Type;
   if (type.Equals("MatrixMX"))
   {
     MatrixMX.AdvancedSettings toSave = MatrixMX.AdvancedSettings.Load();
     toSave.EnableKeypad = KeyPadOptions.EnableKeyPad;
     toSave.UseCustomKeypadMap = KeyPadOptions.EnableCustom;
     MatrixMX.AdvancedSettings.Instance = toSave;
     MatrixMX.AdvancedSettings.Save(toSave);
     MatrixMX.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("CFontz"))
   {
     CFontz.AdvancedSettings settings2 = CFontz.AdvancedSettings.Load();
     settings2.EnableKeypad = KeyPadOptions.EnableKeyPad;
     settings2.UseCustomKeypadMap = KeyPadOptions.EnableCustom;
     CFontz.AdvancedSettings.Instance = settings2;
     CFontz.AdvancedSettings.Save(settings2);
     CFontz.AdvancedSettings.NotifyDriver();
   }
 }