Ejemplo n.º 1
0
        //플러스 타이머
        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();
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void Cancel()
        {
            if (this.Timer != null)
            {
                this.Timer.Stop();
                this.Timer.Dispose();
            }

            this.Timer = null;
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
        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;
            });
        }
Ejemplo n.º 6
0
        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();
        }
Ejemplo n.º 7
0
 public BirdyHelper(CrowControlSettings settings)
 {
     cawTimer          = new TimerPlus(500);
     cawTimer.Elapsed += CawTimer_Elapsed;
     this.settings     = settings;
 }