Example #1
0
        private void UpdateIntervalSettings()
        {
            switch (cmbInterval.SelectedIndex)
            {
            case 0:
                _intervalSec = 1;
                break;

            case 0 + 1:
                _intervalSec = 5;
                break;

            case 1 + 1:
                _intervalSec = 10;
                break;

            case 2 + 1:
                _intervalSec = 30;
                break;

            case 3 + 1:
                _intervalSec = 60;
                break;

            case 4 + 1:
                _intervalSec = 60 * 2;
                break;

            case 5 + 1:
                _intervalSec = 60 * 5;
                break;

            case 6 + 1:
                _intervalSec = 60 * 10;
                break;

            case 7 + 1:
                _intervalSec = 60 * 30;
                break;

            case 8 + 1:
                _intervalSec = 60 * 60;
                break;

            default:
                return;
            }
            DateTime dtEnd = _graphLayer.GetEndTime();

            _graphLayer.UpdateAsis(dtEnd.AddSeconds(-_intervalSec), dtEnd, false);
        } //Дописать ОК
Example #2
0
 public void CopyData(GraphLayer g, int intervalSec)
 {
     _startTime = _DataArray[_firstIndex].Key.AddYears(-1);
     g.ClearData();
     for (int i = _firstIndex; i != _lastIndex; ++i)
     {
         i %= _sizeArray;
         g.UpdateData(_DataArray[i].Value, _DataArray[i].Key.AddTicks(-_startTime.Ticks));
     }
     g.UpdateAsis(_DataArray[_firstIndex].Key, _DataArray[_firstIndex].Key.AddSeconds(intervalSec));
 }
Example #3
0
 public void CopyData(GraphLayer g, int intervalSec)
 {
     _startTime = _DataArray[_firstIndex].Key.AddYears(-1);
     g.ClearData();
     for (int i = _firstIndex; i != _lastIndex; ++i)
     {
         i %= _sizeArray;
         g.UpdateData(_DataArray[i].Value, _DataArray[i].Key.AddTicks(-_startTime.Ticks));
     }
     g.UpdateAsis(_DataArray[_firstIndex].Key, _DataArray[_firstIndex].Key.AddSeconds(intervalSec));
 }