Exemple #1
0
 protected override void WndProc(ref Message m)
 {
     switch (m.Msg)
     {
     case MKC.WM_HOTKEY:
         string modifier = KeyParse((int)m.LParam & 0xFFFF);
         int    K        = ((int)m.LParam >> 16) & 0xFFFF;
         string key      = GetKeyName(K);
         if (VUIKeys.ContainsKey(modifier + key) == true)
         {
             (string Func, string Param) = FuncParse(VUIKeys[modifier + key]);
             if (API.GetPClass() == "MagicKeys")
             {
                 List <string> VUFValues = Ini.IniReadValues(API.GetVUIPath() + API.GetVUI() + ".vuf", Func);
                 VUFInvoke(VUFValues);
             }
             else
             {
                 InvokeFromString(Func, Param);
             }
         }
         break;
     }
     base.WndProc(ref m);
 }
Exemple #2
0
        public static void VUIObjectSpeak()
        {
            string SpeakObject = API.GetText();

            if (SpeakType == true)
            {
                SpeakObject += " " + API.GetObjectType();
            }
            if (API.GetAutoFunc() != null)
            {
                string AutoFunc;
                if (API.GetPClass() == "MagicKeys")
                {
                    List <string> VUFValues = Ini.IniReadValues(API.GetVUIPath() + API.GetVUI() + ".vuf", API.GetAutoFunc());
                    AutoFunc = VUFAutoFunc(VUFValues);
                }
                else
                {
                    AutoFunc = InvokeFromString(API.GetAutoFunc());
                }
                SpeakObject += " " + AutoFunc;
            }
            SpeakObject += " " + API.GetObjectKey();
            Speak(SpeakObject);
        }
 public static void VUIObjectEnter()
 {
     KeyUnReg();
     if (API.GetPClass() == "MagicKeys")
     {
         List <string> VUFValues = Ini.IniReadValues(API.GetVUIPath() + API.GetVUI() + ".vuf", API.GetFunc());
         VUFInvoke(VUFValues);
         KeyReg();
         return;
     }
     if (API.GetParam() == null)
     {
         InvokeFromString(API.GetFunc());
         KeyReg();
         return;
     }
     InvokeFromString(API.GetFunc(), API.GetParam());
     KeyReg();
 }
Exemple #4
0
 public static void VUIPluginLoad()
 {
     if (API.GetLoader() == "Code")
     {
         InvokeFromString(API.GetVUI() + "Loader");
         return;
     }
     else if (API.GetLoader() == "VUF")
     {
         string VUIPath = API.GetVUIPath() + API.GetVUI() + "Load.vui";
         if (File.Exists(@VUIPath) == false)
         {
             return;
         }
         int VUICount = Ini.IniCountSections(VUIPath);
         for (int I = 1; I <= VUICount; I++)
         {
             List <string> VUIItems  = Ini.IniReadKeys(VUIPath, I.ToString());
             List <string> VUIValues = Ini.IniReadValues(VUIPath, I.ToString());
             string[]      Trigger   = VUIValues[0].Split("|");
             if (Trigger[0] == "Img")
             {
                 if (ImgSearch(Trigger[1], true)[0] == Convert.ToInt32(Convert.ToBoolean(Trigger[2])))
                 {
                     string        VUFPath   = API.GetVUIPath() + API.GetVUI() + "Load.vuf";
                     List <string> VUFValues = Ini.IniReadValues(VUFPath, I.ToString());
                     VUFInvoke(VUFValues, Convert.ToInt32(VUIValues[1]));
                 }
             }
             else if (Trigger[0] == "VUI")
             {
                 if (Trigger[1] == API.GetVUI())
                 {
                     string        VUFPath   = API.GetVUIPath() + API.GetVUI() + "Load.vuf";
                     List <string> VUFValues = Ini.IniReadValues(VUFPath, I.ToString());
                     VUFInvoke(VUFValues, Convert.ToInt32(VUIValues[1]));
                 }
             }
         }
     }
 }