Ejemplo n.º 1
0
 void SetDsCollection(TimeSeriesCollection value, bool force)
 {
     if (dsCol != null && !force)
     {
         return;
     }
     dsCol = value;
     dsCol.GetBackColorRequest += DsCol_GetBackColorRequest;
     dsCol.InvalidateRequest   += DsCol_InvalidateRequest;
     for (int i = 0; i < value.Count; i++)
     {
         ChannelEditors[i].Adapt(value[i]);
         // these two events are called by the context menu strip, whether on the plot or the channel editor.
         value[i].OnVisualsChanged += CompleteLogControl_OnVisualsChanged;
     }
     // this will automatically look for disabled series and hide the respective panels.
     resetChannelEditorTops();
     if (dsCollection.TimeStamps.Count > 0)
     {
         dsCol.TimeStampsMax(value.TimeStamps.Max());
         OnSessionLifeUpdated?.Invoke(value.TimeStampsMax());
     }
     else
     {
         value.TimeStampsMax(0);
         OnSessionLifeUpdated?.Invoke(0);
     }
     logControl.dsCollectionUpdated(dsCol);
     logControl.Invalidate();
 }
Ejemplo n.º 2
0
 protected override bool TimeUndershootInDisplay()
 {
     if (dsCollection_ == null)
     {
         return(false);
     }
     return(dsCollection_.TimeStampsMax() * XPPU + xOffsetG > DrawPlotArea.Width + 5 ||
            dsCollection_.TimeStampsMax() * XPPU + xOffsetG < 0);
 }
Ejemplo n.º 3
0
 public void ClearAll()
 {
     dsCollection.ClearAll();
     logControl.ClearAll();
     OnSessionLifeUpdated?.Invoke(0);
     dsCol.TimeStampsMax(0);
 }