Esempio n. 1
0
 public void RemoveHoverEvents()
 {
     foreach (Delegate d in OnCoinHover.GetInvocationList())
     {
         OnCoinHover -= (EventHandler)d;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Sets the autoremove with specified timeframe.
        /// </summary>
        /// <param name="v"></param>
        public async void SetAutoRemove(int v)
        {
            try
            {
                await Task.Delay(v, CurrencyPickupCancellationSource.Token);

                OnCoinHover?.Invoke(this, null);
            }
            catch (TaskCanceledException)
            {
                CurrencyPickupCancellationSource = new CancellationTokenSource();
            }
            catch (Exception)
            {
                //ok, dikke error
                throw;                 // smijt weg dat ding
            }
        }
Esempio n. 3
0
 public void Hovered()
 {
     CurrencyPickupCancellationSource.Cancel();
     OnCoinHover?.Invoke(this, null);
 }