示例#1
0
        // This initialization method tells the control if it is the first one in the container form
        public actionClockControl(string initStartTime, string initEndTime, string initName, bool isFirst = false)
            : this()
        {
            m_ErrorCount = 0;
            Match matchStart = Regex.Match(initStartTime, @"[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] s?([ap]m)?$", RegexOptions.IgnoreCase);
            Match matchLength = Regex.Match(initEndTime, @"[0-9][0-9]:[0-9][0-9]:[0-9][0-9]$", RegexOptions.IgnoreCase);

            if ((matchStart.Success == false) || (matchLength.Success == false) || (initName == ""))
            {
                m_Action = new TimerDatastore(System.DateTime.Now.ToString(), "00:00:01", "ERROR");
            }
            else
            {
                m_Action = new TimerDatastore(initStartTime, initEndTime, initName);
            }
            // Parse all the stuff used to initialize the timer.

            uxTimeOfAction.Text = m_Action.Start.ToString();
            uxEndOfAction.Text = m_Action.Length.ToString();
            uxNameLabel.Text = m_Action.Name;
            PushoverSender = new Pushover.Pushover("TOP SECRET");
            if (isFirst == true)
                m_isFirst = true;
            EventMessenger.SendMessage(this, m_Action, true, false);
        }
示例#2
0
 public actionClockControl(TimerDatastore actionObject)
     : this()
 {
     m_Action = actionObject;
     uxNameLabel.Text = m_Action.Name;
     uxTimeOfAction.Text = Convert.ToDateTime(m_Action.Start).ToString("MM/dd/yyyy hh:mm:ss tt");
     uxEndOfAction.Text = m_Action.Length.ToString();
     PushoverSender = new Pushover.Pushover("TOP SECRET");
 }
 public void delTimer(TimerDatastore timer)
 {
     try
     {
         m_timerList.Remove(timer);
     }
     catch
     {
         MessageBox.Show("error removing control");
     }
 }
示例#4
0
        public uxFullSingleTimer(TimerDatastore inAction)
            : this()
        {
            // Parse all the stuff used to initialize the timer.

            m_Action = inAction;

            uxTimeOfAction.Text = m_Action.Start.ToString();
            uxEndOfAction.Text = m_Action.Length.ToString();
            uxNameLabel.Text = m_Action.Name;
        }
 public void addTimer(TimerDatastore timer)
 {
     try
     {
         m_timerList.Add(timer);
     }
     catch
     {
         MessageBox.Show("Error adding control");
     }
 }