Exemplo n.º 1
0
        public void SetSector3Time(double sector3Time, CarBaseMessage.TimeType type, Color color)
        {
            if (type == CarBaseMessage.TimeType.NoData)
            {
                //when color is the same NoData is used to clear time value
                //else it has no meaning - only color is changed
                if (_sector3TimeColor == color)
                {
                    _sector3Type = type;
                    NotifyPropertyChanged("Sector3Time");
                }
            }
            else
            {
                if (_carNumberColor == Colors.Red)
                {
                    _sector1Start = _sector2Start = _sector3Start = DateTime.MinValue;
                }

                _sector1Start = _sector3End = DateTime.Now;
                _sector3Time  = sector3Time;
                _sector3Type  = type;
                NotifyPropertyChanged("Sector3Time");
            }

            Sector3TimeColor = color;
        }
Exemplo n.º 2
0
        public void SetQ2Time(double q2Time, CarBaseMessage.TimeType type, Color color)
        {
            if (type == CarBaseMessage.TimeType.NoData)
            {
                //when color is the same NoData is used to clear time value
                //else it has no meaning - only color is changed
                if (_q2TimeColor == color)
                {
                    _q2Type = type;
                    NotifyPropertyChanged("Q2Time");
                }
            }
            else
            {
                _q2Time = q2Time;
                _q2Type = type;
                NotifyPropertyChanged("Q2Time");
            }

            Q2TimeColor = color;
        }
Exemplo n.º 3
0
        public void SetBestPracticeLapTime(double lapTime, CarBaseMessage.TimeType type, Color color)
        {
            if (type == CarBaseMessage.TimeType.NoData)
            {
                //when color is the same NoData is used to clear time value
                //else it has no meaning - only color is changed
                if (_bestPracticeLapTimeColor == color)
                {
                    _bestPracticeLapTimeType = type;
                    NotifyPropertyChanged("BestPracticeLapTime");
                }
            }
            else
            {
                _bestPracticeLapTime     = lapTime;
                _bestPracticeLapTimeType = type;
                NotifyPropertyChanged("BestPracticeLapTime");
            }

            BestPracticeLapTimeColor = color;
        }
Exemplo n.º 4
0
        public void SetInterval(double interval, CarBaseMessage.TimeType type, Color color)
        {
            if (type == CarBaseMessage.TimeType.NoData)
            {
                //when color is the same NoData is used to clear time value
                //else it has no meaning - only color is changed
                if (_intervalColor == color)
                {
                    _intervalType = type;
                    NotifyPropertyChanged("Interval");
                }
            }
            else
            {
                _interval     = interval;
                _intervalType = type;
                NotifyPropertyChanged("Interval");
            }

            IntervalColor = color;
        }
Exemplo n.º 5
0
 public void SetGap(double gap, CarBaseMessage.TimeType type)
 {
     _gap     = gap;
     _gapType = type;
     NotifyPropertyChanged("Gap");
 }