Esempio n. 1
0
 public static void TryActionIgnoreException(DoAction action)
 {
     try
     {
         action.Invoke();
     }
     catch { }
 }
Esempio n. 2
0
 internal void ActiveMenu()
 {
     if (DoAction == null)
     {
         DoWhenChosen();
     }
     else
     {
         DoAction.Invoke();
     }
 }
Esempio n. 3
0
        void onTimedEvent(object source, ElapsedEventArgs e)
        {
            double difference = DateTime.Now.Subtract(_zeroHour).TotalMilliseconds;

            if ((difference <= _TIMERPERIODINSECOND) && (difference > 0))
            {
                lock (this)
                {
                    if (_actionTimer.Enabled)
                    {
                        _actionTimer.Enabled = false;
                        if (DoAction != null)
                        {
                            DoAction.Invoke(this, null);
                        }
                        _actionTimer.Enabled = true;
                    }
                }
            }
        }
Esempio n. 4
0
 public void DoClick(Encounter encounter)
 {
     action.Invoke(encounter);
 }
 public string ExecAction(string action) => DoAction?.Invoke(action) ?? null;
Esempio n. 6
0
 internal void OnAction(DbAnimationEventArgs e)
 {
     DoAction?.Invoke(this, e);
 }
Esempio n. 7
0
 private void DoConcreteWork(TSource currentWcfClient)
 {
     DoAction.Invoke(currentWcfClient, someObject);
 }
 protected override void OnClick(EventArgs e)
 {
     Action?.Invoke();         // null propogation, no need for if statements.
     base.OnClick(e);
 }
Esempio n. 9
0
 /// <summary>
 /// 현재 작업을 실행합니다.
 /// </summary>
 public virtual void Do()
 {
     moved++;
     DoAction?.Invoke();
 }