コード例 #1
0
 public void ClearAll()
 {
     dsCollection.ClearAll();
     logControl.ClearAll();
     OnSessionLifeUpdated?.Invoke(0);
     dsCol.TimeStampsMax(0);
 }
コード例 #2
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();
 }
コード例 #3
0
 private void HW_NewPointReceived(float x, float[] values, PlotLabel [] units)
 {
     logControl.AppendLog(x, values, HW.Signature == PhysLoggerHWSignature.PhysLogger1_0 ? true : false);
     if (dsCollection.TimeStamps.Count > 0)
     {
         OnSessionLifeUpdated?.Invoke(dsCollection.TimeStampsMax());
     }
     for (int i = 0; i < values.Length; i++)
     {
         ChannelEditors[i].minMaxLabel1Value  = values[i];
         ChannelEditors[i].minMaxLabel1Suffix = units[i].Unit.ToString();
         dsCollection[i].YUnits        = units[i];
         ChannelEditors[i].NeedsUpdate = true;
     }
 }