//플러스 타이머 private void TimerPlus_Tick(object sender, EventArgs e) { TimerPlus.Stop(); if (currentType == TestType.Practice) { if (currentTrial == 2) { currentTrial = 0; } else if (currentTrial == 1) { currentTrial = 0; } else { currentTrial = 1; } } else { RandomTrial(); } panelPlus.Hide(); panelPlus.Dock = System.Windows.Forms.DockStyle.None; panelFraction.Show(); panelFraction.Dock = System.Windows.Forms.DockStyle.Fill; labelFrac1.Font = new Font(labelFrac1.Font, FontStyle.Regular); labelFrac2.Font = new Font(labelFrac2.Font, FontStyle.Regular); Prime(); }
public OutlookSearch(AccountConfig config) { EmailAddress = config.EmailAddress; SearchPhrase = config.SearchTag; SearchSize = config.SearchSize; SearchTime = config.SearchTime; TimerInterval = config.TimerInterval; MaxDisplayItems = config.DisplayItems; _searchTimer = new TimerPlus(TimerInterval * 1000) { AutoReset = true }; _outlookTimer = new TimerPlus(2000) { AutoReset = true }; _searchTimer.Start(); _outlookTimer.Start(); // register events _searchTimer.Elapsed += TimerElapsed; _outlookTimer.Elapsed += CheckOutlookStatus; OnSearchErrorOccurred += ErrorHandler; OnFindErrorOccurred += SearchError; OnFindComplete += SearchComplete; OnServiceStart += OnStart; // raise on start events OnServiceStart?.Invoke(this, EventArgs.Empty); }
public void Cancel() { if (this.Timer != null) { this.Timer.Stop(); this.Timer.Dispose(); } this.Timer = null; }
public SearchTracking() { Logger.Log("Starting search tracker"); OnServiceStart += ServiceStartup; _searchTimer = new TimerPlus(10 * 1000) { AutoReset = true }; _searchTimer.Elapsed += TrackTimerElapsed; _searchTimer.Start(); OnServiceStart?.Invoke(this, EventArgs.Empty); }
public Delay(int delay, bool auto, ThreadStart action) { this.Timer = new TimerPlus(delay); this.Timer.AutoReset = auto; this.Timer.Elapsed += new ElapsedEventHandler(delegate(object sender, ElapsedEventArgs e) { if (this.Timer != null) { //t.Stop(); action(); //t.Dispose(); } //t = null; }); }
private void ShowPlus() { panelFraction.Dock = System.Windows.Forms.DockStyle.None; panelFraction.Hide(); panelPlus.Show(); panelPlus.Dock = System.Windows.Forms.DockStyle.Fill; if (isStart) { TimerPlus.Interval = 500; isStart = false; } else { TimerPlus.Interval = 2000; } //화면에 플러스 띄우기 TimerPlus.Start(); }
public BirdyHelper(CrowControlSettings settings) { cawTimer = new TimerPlus(500); cawTimer.Elapsed += CawTimer_Elapsed; this.settings = settings; }