Example #1
0
        private void ConfigureGraph()
        {
            m_simpleGraph.XCordTimeDiv = 1000;
            string[] X_rangeLabels = new string[2];
            Helpers.GetXCordRangeLabels(X_rangeLabels, 10, 0, TimeUnit.Second);
            label_XCoordinateMax.Text = X_rangeLabels[0];
            label_XCoordinateMin.Text = X_rangeLabels[1];

            ValueUnit unit = (ValueUnit)(-1); // Don't show unit in the label.

            string[] Y_CordLables = new string[3];
            Helpers.GetYCordRangeLabels(Y_CordLables, 10, -10, unit);
            label_YCoordinateMax.Text    = Y_CordLables[0];
            label_YCoordinateMin.Text    = Y_CordLables[1];
            label_YCoordinateMiddle.Text = Y_CordLables[2];

            m_simpleGraph.YCordRangeMax = 10;
            m_simpleGraph.YCordRangeMin = -10;
            m_simpleGraph.Clear();
        }
Example #2
0
        private void ConfigureGraph()
        {
            m_simpleGraph.XCordTimeDiv = 1000;
            string[] X_rangeLabels = new string[2];
            Helpers.GetXCordRangeLabels(X_rangeLabels, trackBar1.Value, 0, TimeUnit.Second);
            label_XCoordinateMax.Text = X_rangeLabels[0];
            label_XCoordinateMin.Text = X_rangeLabels[1];

            ValueUnit unit = (ValueUnit)(1); // Don't show unit in the label.

            string[] Y_CordLables = new string[3];
            Helpers.GetYCordRangeLabels(Y_CordLables, trackBar2.Value, -trackBar2.Value, unit);
            label_YCoordinateMax.Text    = Y_CordLables[0];
            label_YCoordinateMin.Text    = Y_CordLables[1];
            label_YCoordinateMiddle.Text = Y_CordLables[2];

            m_simpleGraph.AmplificationFactor = 1;
            m_simpleGraph.XcordChangeRate     = (float)(10.0 / trackBar1.Value);
            m_simpleGraph.YCordRangeMax       = trackBar2.Value;
            m_simpleGraph.YCordRangeMin       = -trackBar2.Value;

            m_simpleGraph.Clear();
        }