protected override void OnResize(EventArgs e) { if (DesignMode || History == null) { return; } if (Width == 0 || Height == 0) { base.OnResize(e); return; } DataHistory newHistory = new DataHistory(Width); newHistory.FullMin = ValueMin; newHistory.FullMax = ValueMax; foreach (double value in History) { newHistory.UpdateValue(value); } History = newHistory; Refresh(); base.OnResize(e); }
private void CreateThrustGraph(DataHistory data) { data.Clear(); float scale = 1000.0f / (data.MaxLength - 1); for (float x = 0; x <= 1000.0f; x += scale) { data.UpdateValue(InputManager.ThrustMax * InputManager.MapThrust(x / 1000.0f)); } }
private void CreateInputGraph(DataHistory data, float exp) { data.Clear(); float scale = 1000.0f / (data.MaxLength - 1); for (float x = -500; x <= 500.0f; x += scale) { data.UpdateValue(500 * InputManager.MapInputOneToOne(x / 500.0f, 0.5, exp)); } }