Esempio n. 1
0
        // ВРЕМЯ ВЫШЛО
        private void TimeOver()
        {
            StopTimer();

            notifyIcon1.BalloonTipText = textBox1.Text;
            notifyIcon1.ShowBalloonTip(1000);


            if (SoundOn)
            {
                // ГУДИМ
                //System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"D:\Visual Studio 2010\!Projects\SimpleTimer\SimpleTimer\res\18.wav");
                System.Media.SoundPlayer player = new System.Media.SoundPlayer(Properties.Resources.zvonok_2_sec);
                player.Play();
            }

            if (blink)
            {
                // МОРГАЕМ
                BlinkTimer.Start();
            }
            else
            {
                // ВЫСКАКИВАЕМ
                //DisableControlls(false);
                SignalForm SF = new SignalForm(textBox1.Text);
                SF.ShowDialog();

                // Отбразить форму
                this.Show();

                // развернуть окно
                this.WindowState = FormWindowState.Normal;
            }
        }
Esempio n. 2
0
 void timer_Tick(object sender, EventArgs e)
 {
     Visible = !Visible;
     BlinkCounter++;
     if (BlinkCounter > 7)
     {
         BlinkTimer.Stop();
     }
 }
Esempio n. 3
0
 private void SetImage(Image img, bool blink = false)
 {
     BlinkTimer.Stop();
     Visible      = true;
     BlinkCounter = 0;
     Image        = img;
     if (blink)
     {
         BlinkTimer.Start();
     }
 }
Esempio n. 4
0
 // СТОП
 private void StopTimer()
 {
     MainTimer.Stop();
     BlinkTimer.Stop();
     DisableControlls(false);
     IsRunning = false;
     //numHours.Value = TimeStart.H;
     //numMinutes.Value = TimeStart.M;
     //numSecond.Value = TimeStart.S;
     //dTPicker.Value.Second
     dTPicker.Value = new DateTime(2015, 04, 24, TimeStart.H, TimeStart.M, TimeStart.S);
 }
Esempio n. 5
0
        public frmMonitor()
        {
            InitializeComponent();
            // timer config
            DataTimer.Interval = int.Parse(ConfigurationManager.AppSettings["RefreshTimer"]) * 1000;

            dataManager = new DataManager(_ConnectionString);
            //dataManager.RepairDataLogger();

            arrObj.Clear();
            BlinkTimer.Stop();
        }
Esempio n. 6
0
        public void OnPulse(bool isBlinkOn)
        {
            multiRenderer.Enabled = isBlinkOn;
            if (isBlinkOn)
            {
                blinkCount++;

                if (maxBlinks > 0 && blinkCount >= maxBlinks)
                {
                    blinkTimer = null;
                }
            }
        }
Esempio n. 7
0
        // КЛИК ПО ИКОНКЕ В ТРЕЕ
        private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
        {
            // остановить моргание
            BlinkTimer.Stop();

            // скрыть иконку
            notifyIcon1.Visible = false;

            // Отбразить форму
            this.Show();

            // развернуть окно
            this.WindowState = FormWindowState.Normal;
        }
Esempio n. 8
0
 // ТАЙМЕР МОРГАНИЯ
 private void BlinkTimer_Tick(object sender, EventArgs e)
 {
     BlinkTimer.Stop();
     if (IconRed)
     {
         notifyIcon1.Icon = SimpleTimer.Properties.Resources.clockgreen;
     }
     else
     {
         notifyIcon1.Icon = SimpleTimer.Properties.Resources.clockred;
     }
     IconRed = !IconRed;
     BlinkTimer.Start();
 }
Esempio n. 9
0
 private void BlinkTimer_Tick(object sender, EventArgs e)
 {
     if (i++ >= 16)// || obj=="")
     {
         //if (idx < arrObj.Count)
         //{
         //    obj = arrObj[idx++].ToString();
         //}
         //else
         //{
         BlinkTimer.Stop();
         //obj = "";
         //idx = 0;
         arrObj.Clear();
         //}
         i = 0;
     }
     //obj = arrObj[idx++].ToString();
     foreach (string obj in  arrObj)
     {
         this.select_blink(obj);
     }
 }
Esempio n. 10
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            LoadData();
            if (arrObj.Count > 0)
            {
                BlinkTimer.Start();
            }

            foreach (Form a in Application.OpenForms)
            {
                if (a.Name == "frmGraph1" && frmCurve.cbAuto.Checked)
                {
                    frmCurve.btRefresh_Click(sender, e);
                }
                if (a.Name == "frmGraph2" && frmBar.cbAuto.Checked)
                {
                    frmBar.btRefresh_Click(sender, e);
                }
                if (a.Name == "frmDataText" && frmView.cbAuto.Checked)
                {
                    frmView.ReloadData();
                }
            }
        }
Esempio n. 11
0
        protected override void Awake()
        {
            base.Awake();

            blinkTimer = new BlinkTimer(this);
        }