// ВРЕМЯ ВЫШЛО 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; } }
private void SetImage(Image img, bool blink = false) { BlinkTimer.Stop(); Visible = true; BlinkCounter = 0; Image = img; if (blink) { BlinkTimer.Start(); } }
// ТАЙМЕР МОРГАНИЯ 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(); }
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(); } } }