Beispiel #1
0
 public BarItem(int id, int bar, int key)
 {
     ItemId = id;
     Bar = bar;
     Key = key;
     _wrap = new KeyWrapper("Unkown item", "none", bar.ToString(), key.ToString());
 }
Beispiel #2
0
 /// <summary>
 ///   Release a held key.
 /// </summary>
 /// <param name = "name">
 ///   Key name to release
 /// </param>
 public static void ReleaseKey(string name)
 {
     lock (_lock)
     {
         if (KeysList.ContainsKey(name))
         {
             //  Logging.Debug("ReleaseKey: " + name);
             KeyWrapper key = KeysList[name];
             key.ReleaseKey();
         }
         else
         {
             Logging.Write("The key " + name + " could not be send");
         }
     }
 }
Beispiel #3
0
 /// <summary>
 ///   SendKey
 /// </summary>
 /// <param name = "name">
 ///   Key name to send
 /// </param>
 public static void SendKey(string name)
 {
     lock (_lock)
     {
         //LazyBot.Log.Debug("IsCasting spell: " + name);
         if (KeysList.ContainsKey(name))
         {
             KeyWrapper key = KeysList[name];
             key.SendKey();
         }
         else
         {
             Logging.Write("Unknown key: " + name);
         }
     }
 }
Beispiel #4
0
 /// <summary>
 ///   Press and hold a key
 /// </summary>
 /// <param name = "name">
 ///   Key name to press and hold
 /// </param>
 public static void PressKey(string name)
 {
     lock (_lock)
     {
         if (KeysList.ContainsKey(name))
         {
             // Logging.Debug("PressKey: " + name);
             KeyWrapper key = KeysList[name];
             //Logging.Write(key.Bar + " " + key.Key);
             key.PressKey();
         }
         else
         {
             Logging.Write("The key " + name + " could not be send");
         }
     }
 }