Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 3
0
        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));
            }
        }