//Changes the graph on to the next display mode, or changes back to the first display mode type if already in the last type public void ChangeToNextDisplayMode(Window ApplicationWindow) { //Cast the current display mode enum to integer value int DisplayModeValue = (int)GraphDisplayMode; //Change to the next value, wrapping back to the first value if we go past the end DisplayModeValue = (DisplayModeValue + 1) > 2 ? 0 : (DisplayModeValue + 1); //Cast this back to the enum type and apply that to the performance graph GraphDisplayMode = (TimingDisplayMode)DisplayModeValue; //Finally change the graph to the new timing mode UpdateGraphTimingMode(GraphDisplayMode, ApplicationWindow); }
private void UpdateTimingGraphForMode(TimingDisplayMode newDisplayMode) { timingDisplayMode = newDisplayMode; ref var description = ref timingGraph.Description;
//Changes the display mode for the performance monitor public void UpdateGraphTimingMode(TimingDisplayMode NewDisplayMode, Window ApplicationWindow) { //Store the new timing mode GraphDisplayMode = NewDisplayMode; //Fetch the current graph settings ref var Description = ref DisplayGraph.Description;