/// <summary> /// 期限切れ判定タイマのタイムアウト処理完了時処理 /// </summary> private void ActionTermOutTimerEventOnCompleted() { UiContext.Post(() => { this.UpdateCurrentDateTime(); this.DgvAllTasksOnUpdateEvent(null, null); }); }
/// <summary> /// 現在時刻更新タイマイベント /// </summary> /// <param name="state">イベント引数</param> private void NowTimerCallBack(object state) { UiContext.Post(() => { var now = DateTime.Now; this.LabelDateTime.Text = "現在日時:" + now.ToString("yyyy/MM/dd HH:mm"); this.DgvAllTasksOnUpdateEvent(null, null); }); }
public virtual void RunOnUiThread(Action fn) { if (UiContext == null) { fn(); } else { UiContext.Post(_ => fn(), null); } }