private void CopyVisualiser(SensorVisualiser oldVisualiser, SensorVisualiser newVisualiser) { newVisualiser.ColorOfDiffGraph = oldVisualiser.ColorOfDiffGraph; newVisualiser.ColorOfMainGraph = oldVisualiser.ColorOfMainGraph; newVisualiser.ColorsForMinorGraphs.AddRange(oldVisualiser.ColorsForMinorGraphs); newVisualiser.BackGroundColor = oldVisualiser.BackGroundColor; }
private double EnvelopWinSize_sec => (double)nEnvelopWinSize.Value / 1000.0; //numbox is in ms private void CreateOrRefreshSensorVisualiser() { flowLayoutPanel.Controls.Clear(); var oldVisualiser = sensorVisualiser; sensorVisualiser = new SensorVisualiser(flowLayoutPanel, GraphWidth, GraphHeight, EnvelopWinSize_sec); //TODO add custom size if (oldVisualiser == null) { for (int i = 0; i < baseExperiments.Experiments.Count; i++) { sensorVisualiser.ColorsForMinorGraphs.Add(MultipleGraphsCanvas.DefaultMinorGraphPen.Color); } } else { CopyVisualiser(oldVisualiser, sensorVisualiser); } nWidth.Value = GraphWidth; nHeight.Value = GraphHeight; }