Esempio n. 1
0
 public bool configureData(Form1 mForm)
 {
     fForm        = mForm;
     update       = new updateProess(fForm.updatePross);
     updateFormat = new updateLabel(fForm.updateFileFormatLabel);
     //
     //up(true);
     return(true);
 }
        private void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            DateTime currentTime = DateTime.Now;
            DateTime userTime    = dateTimePicker1.Value;

            if (currentTime.Hour == userTime.Hour && currentTime.Minute == userTime.Minute && currentTime.Second == userTime.Second)
            {
                timer.Stop();
                try
                {
                    updateLabel upd = UpdateDataLabele;
                    if (lblstatus.InvokeRequired)
                    {
                        Invoke(upd, lblstatus, "Stop");
                    }
                    SoundPlayer play = new SoundPlayer();
                    play.SoundLocation = (@"D:\MES PROJETS\Nuxt\Backup\Backup\bin\Debug\SMS Sifflement.wav");
                    play.PlayLooping();
                }catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }