Esempio n. 1
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. 2
0
 public void Hovered()
 {
     CurrencyPickupCancellationSource.Cancel();
     OnCoinHover?.Invoke(this, null);
 }