Example #1
0
 public void ChangePlotMode(int mode)
 {
     if (mode == 0)
     {
         _plotTitle.text = "Rabbit population in time";
         _currentMode    = PlotMode.Population;
         _maxYData       = _maxPopulation;
         YAxisPrecision  = 10f;
     }
     else if (mode == 1)
     {
         _plotTitle.text = "Average rabbit speed in time";
         _currentMode    = PlotMode.Speed;
         _maxYData       = _maxSpeed;
         YAxisPrecision  = 2f;
     }
     else if (mode == 2)
     {
         _plotTitle.text = "Average rabbit sense radius in time";
         _currentMode    = PlotMode.SenseRadius;
         _maxYData       = _maxSenseRadius;
         YAxisPrecision  = 5f;
     }
     UpdateYTicks();
     UpdateAllPoints();
 }
 /// <summary>
 /// Initializes a new instance of the Explicit2DParameters class on the specified
 /// code, code language, plot mode, min and max value, step and number of points.
 /// </summary>
 /// <param name="codeExpression">Code</param>
 /// <param name="codeLanguage">Code language</param>
 public Explicit2DParameters(string codeExpression, CodeLanguage codeLanguage, PlotMode plotMode, double min, double max, double step, int numPoints)
 {
     _code         = codeExpression;
     _codeLanguage = codeLanguage;
     _plotMode     = plotMode;
     _min          = min;
     _max          = max;
     _step         = step;
     _numPoints    = numPoints;
 }
 /// <summary>
 /// Initializes a new instance of the Explicit2DParameters class on the specified
 /// formula, plot mode, min and max value, step and number of points.
 /// </summary>
 public Explicit2DParameters(string formula, PlotMode plotMode, double min, double max, double step, int numPoints)
 {
     _formula   = formula;
     _plotMode  = plotMode;
     _min       = min;
     _max       = max;
     _step      = step;
     _numPoints = numPoints;
     InitCode();
 }
Example #4
0
 public vnaconfig(BinaryReader src)
 {
     displayDual     = src.ReadBoolean();
     displayFMin     = src.ReadDouble();
     displayFMax     = src.ReadDouble();
     displayLogF     = src.ReadBoolean();
     displayPlotY1   = (PlotMode)src.ReadInt32();
     displayPlotY2   = (PlotMode)src.ReadInt32();
     displayY1Min    = src.ReadDouble();
     displayY1Max    = src.ReadDouble();
     displayY2Min    = src.ReadDouble();
     displayY2Max    = src.ReadDouble();
     sweepLogF       = src.ReadBoolean();
     sweepFMin       = src.ReadDouble();
     sweepFMax       = src.ReadDouble();
     sweepPoints     = src.ReadInt32();
     sweepLoopDelay  = src.ReadDouble();
     sweepMPeriods   = src.ReadInt32();
     compPhaseBlocks = src.ReadInt32();
 }
Example #5
0
 public vnaconfig()
 {
     displayDual     = false;
     displayFMin     = 100;
     displayFMax     = 10000;
     displayLogF     = true;
     displayPlotY1   = PlotMode.logBA;
     displayPlotY2   = PlotMode.phiBA;
     displayY1Min    = -120;
     displayY1Max    = 20;
     displayY2Min    = -180;
     displayY2Max    = 180;
     sweepLogF       = true;
     sweepFMin       = 100;
     sweepFMax       = 10000;
     sweepPoints     = 61;
     sweepLoopDelay  = 0.7;
     sweepMPeriods   = 20;
     compPhaseBlocks = 0;
 }
Example #6
0
        void _graph_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
                case "plotMode": _plotMode = _graph.plotMode; break;
                case "viewPortStride": _viewPortStride = _graph.viewPortStride; break;
                case "xMin": _xMin = _graph.xMin; break;
                case "xMax": _xMax = _graph.xMax; break;
                case "yMin": _yMin = _graph.yMin; break;
                case "yMax": _yMax = _graph.yMax; break;
                case "plotColor": _plotColor = _graph.plotColor; break;
                case "topEdge": _topEdge = _graph.topEdge; break;
                case "bottomEdge": _bottomEdge = _graph.bottomEdge; break;
                case "leftEdge": _leftEdge = _graph.leftEdge; break;
                case "rightEdge": _rightEdge = _graph.rightEdge; break;
                case "topTitle": _topTitle = _graph.topTitle; break;
                case "bottomTitle": _bottomTitle = _graph.bottomTitle; break;
                case "leftTitle": _leftTitle = _graph.leftTitle; break;
                case "rightTitle": _rightTitle = _graph.rightTitle; break;
                case "toggleTitle": _toggleTitle = _graph.toggleTitle; break;
                case "isToggleable": _isToggleable = _graph.isToggleable; break;
                case "toggle":
                    {
                        _toggle = _graph.toggle;
                        this.NotifyPropertyChanged("toggle");
                    }
                    break;

                default: break;

            }
        }