Example #1
0
        // Token: 0x06002029 RID: 8233 RVA: 0x0006AD44 File Offset: 0x00068F44
        public bool method_10(Class183 state)
        {
            bool result;

            lock (Class318.object_0)
            {
                Class318.Class184 @class = state as Class318.Class184;
                if (!this.dictionary_0.ContainsKey(@class.ID))
                {
                    throw new ArgumentException("The specified hotkey does not exist in this component.");
                }
                this.dictionary_0.Remove(@class.ID);
                Class318.dictionary_1.Remove(@class.ID);
                result = this.method_14(@class);
            }
            return(result);
        }
Example #2
0
 // Token: 0x06002028 RID: 8232 RVA: 0x0006ACB0 File Offset: 0x00068EB0
 public Class183 method_9(Struct21 hotkey, bool allow_repeat, object state, EventHandler <EventArgs18> callback)
 {
     lock (Class318.object_0)
     {
         int num = Class318.int_0++;
         if (Class318.int_0 > 49151)
         {
             Class318.int_0 = 0;
         }
         Class318.Class184 @class = new Class318.Class184(this, num, hotkey, allow_repeat, state, callback);
         if (this.method_13(@class))
         {
             this.dictionary_0.Add(num, @class);
             Class318.dictionary_1.Add(num, @class);
             return(@class);
         }
     }
     return(null);
 }
Example #3
0
        private bool method_14(Class318.Class184 hotkey)
        {
            bool result;

            lock (Class318.object_0)
            {
                try
                {
                    Class302.smethod_1(this.class523_0.Handle, hotkey.ID);
                    result = true;
                }
                catch (Exception ex)
                {
                    ex.smethod_1(new object[]
                    {
                        "Failure to unregister hotkey: " + hotkey.ToString()
                    });
                    result = false;
                }
            }
            return(result);
        }
Example #4
0
        // Token: 0x06002021 RID: 8225 RVA: 0x0006AB0C File Offset: 0x00068D0C
        private void method_2(object sender, EventArgs41 e)
        {
            Class318.Class184 @class = null;
            lock (Class318.object_0)
            {
                @class = this.dictionary_0[e.HotkeyID];
            }
            bool flag2 = @class.AllowRepeat || DateTime.Now.Subtract(@class.LastTime).TotalMilliseconds > 1000.0;

            @class.LastTime = DateTime.Now;
            if (flag2)
            {
                EventArgs18 e2 = new EventArgs18(@class);
                if (this.eventHandler_0 != null)
                {
                    this.eventHandler_0(this, e2);
                }
                if (@class.Callback != null)
                {
                    @class.Callback(this, e2);
                }
            }
        }