コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="communicationInterface">Reference to the communication interface that is to be used to communicate with the VCU.</param>
        public FormShowSystemInformation(ICommunicationParent communicationInterface) : this()
        {
            if (communicationInterface is CommunicationParent)
            {
                CommunicationInterface = new CommunicationApplication(communicationInterface);
            }
            else
            {
                CommunicationInterface = new CommunicationApplicationOffline(communicationInterface);
            }

            Debug.Assert(CommunicationInterface != null);

            #region - [Display Timer] -
            m_TimerDisplayUpdate          = new System.Windows.Forms.Timer();
            m_TimerDisplayUpdate.Tick    += new EventHandler(DisplayUpdate);
            m_TimerDisplayUpdate.Interval = IntervalDisplayUpdate;
            m_TimerDisplayUpdate.Enabled  = true;
            m_TimerDisplayUpdate.Stop();
            #endregion - [Display Timer] -
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="communicationInterface">Reference to the communication interface that is to be used to communicate with the VCU.</param>
        public FormRealTimeClock(ICommunicationParent communicationInterface) : this()
        {
            if (communicationInterface is CommunicationParent)
            {
                CommunicationInterface = new CommunicationApplication(communicationInterface);
            }
            else
            {
                CommunicationInterface = new CommunicationApplicationOffline(communicationInterface);
            }

            Debug.Assert(CommunicationInterface != null);

            // Initialize the DateTime picker controls.
            m_DateTimePickerDate.Value = DateTime.Now;
            m_DateTimePickerTime.Value = DateTime.Now;

            // If the VCU uses a 4 digit year code, change the MaxDate and MinDate values of the DateTimePicker from the current default values. The default values
            // are MinDate = 1st Jan 1970 and MaxDate = 31st Dec 2069.
            if (Parameter.Use4DigitYearCode == true)
            {
                m_DateTimePickerDate.MaxDate = new DateTime(MaxYear4DigitYearCode, MaxMonth, MaxDay);
                m_DateTimePickerDate.MinDate = new DateTime(MinYear4DigitYearCode, MinMonth, MinDay);
            }
            else
            {
                m_DateTimePickerDate.MaxDate = new DateTime(MaxYear2DigitYearCode, MaxMonth, MaxDay);
                m_DateTimePickerDate.MinDate = new DateTime(MinYear2DigitYearCode, MinMonth, MinDay);
            }

            m_TableLayoutPanelDateTimePicker.Enabled = false;

            #region - [Display Timer] -
            m_TimerDisplayUpdate          = new System.Windows.Forms.Timer();
            m_TimerDisplayUpdate.Tick    += new EventHandler(DisplayUpdate);
            m_TimerDisplayUpdate.Interval = IntervalDisplayUpdate;
            m_TimerDisplayUpdate.Enabled  = true;
            m_TimerDisplayUpdate.Stop();
            #endregion - [Display Timer] -
        }