Reply to thread

Here is the event code


[code]

public void OnTimer(Object sender, ElapsedEventArgs e)

        {

            if(sender == _AlarmClock)

            {

                GUISpinControl ctlHour = (GUISpinControl)GetControl((int)Controls.CONTROL_ALARMTIMEHOUR);

                GUISpinControl ctlMinute = (GUISpinControl)GetControl((int)Controls.CONTROL_ALARMTIMEMINUTE);

   

                DateTime dtNow = DateTime.Now;

           

                if( dtNow.Hour == ctlHour.Value && dtNow.Minute == ctlMinute.Value)

                {

                    _AlarmClock.Enabled = false;

                    Player.g_Player.Play(_SongPath);

                    GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LABELSONGPATH,g_Player.Playing.ToString());

                }

            }

           

        }

[/code]


Top Bottom