/// <summary> /// Draws the graph to the screen /// </summary> /// <param name="tracesToShow">A list of GraphLine traces to show on the graph</param> /// <param name="showAllOnGraph">Represents whether all traces should be shown, or only the traces specified in the driver select panel</param> /// <param name="changeNormalised">Represents whether the graph should be re-normalised on the fastest trace</param> public void DrawGraph(List <GraphLine> tracesToShow, bool showAllOnGraph, bool changeNormalised) { GraphPanel.SetTraces(tracesToShow); int bestDriver; if (changeNormalised) { GraphPanel.NormaliseOnBestTrace(); bestDriver = GraphPanel.NormalisationIndex; Data.DriverIndex = bestDriver; DriverPanel.UpdateRadioButtons(bestDriver); DriverPanel.UpdateCheckBoxes(ShowTracesState.All); } else { bestDriver = Data.DriverIndex; } Invalidate(); }
/// <summary> /// Draws the graph to the screen /// </summary> /// <param name="tracesToShow">A list of StrategyLine traces to show on the graph</param> /// <param name="showAllOnGraph">Represents whether all traces should be shown, or only the traces specified in the driver select panel</param> /// <param name="changeNormalised">Represents whether the graph should be re-normalised on the fastest trace</param> public void DrawGraph(List <StrategyLine> tracesToShow, bool showAllOnGraph, bool changeNormalised) { int bestDriver; if (changeNormalised) { bestDriver = GetBestDriver(tracesToShow); Data.DriverIndex = bestDriver; DriverPanel.UpdateRadioButtons(bestDriver); DriverPanel.UpdateCheckBoxes(ShowTracesState.All); } else { bestDriver = Data.DriverIndex; } originalTraces = tracesToShow; UpdateGraph(bestDriver); }