コード例 #1
0
ファイル: Calulations.cs プロジェクト: 3141592/vs
 public Calulations(FunctionGrapher _mainForm, List<PointPair> _points)
 {
     InitializeComponent();
     mainForm = _mainForm;
     pointlist = _points;
 }
コード例 #2
0
ファイル: GraphSettingsDialog.cs プロジェクト: 3141592/vs
        public GraphSettingsDialog(GraphSettings _settings, FunctionGrapher _mainForm)
        {
            InitializeComponent();

            this.checkBoxGrid.Checked = _settings.Grid;
            this.textBoxGridWidth.Text = _settings.GridWidth.ToString();

            this.checkBoxSmoothGraph.Checked = _settings.SmoothGraph;

            this.comboBoxGraphType.Items.Add(GraphTypes.Function);
            this.comboBoxGraphType.Items.Add(GraphTypes.Derivative);
            this.comboBoxGraphType.Items.Add(GraphTypes.Slope);
            this.comboBoxGraphType.Items.Add(GraphTypes.VectorField);
            this.comboBoxGraphType.Items.Add(GraphTypes.LevelCurves);
            this.comboBoxGraphType.Items.Add(GraphTypes.LevelCurves2);
            this.comboBoxGraphType.Items.Add(GraphTypes.ParametricFamily);
            this.comboBoxGraphType.Items.Add(GraphTypes.ParametricFunction);
            this.comboBoxGraphType.Items.Add(GraphTypes.Iteration);
            this.comboBoxGraphType.Items.Add(GraphTypes.Cobweb);
            this.comboBoxGraphType.Items.Add(GraphTypes.TwoDIteration);
            this.comboBoxGraphType.SelectedIndex = 0;

            settings = new GraphSettings();
            settings = _settings;

            mainForm = _mainForm;

            this.textBoxSlopeColorLimit.Text = settings.SlopeColorLimit.ToString();
            this.textBoxBaseB.Text = settings.BaseB.ToString();
            this.textBoxBaseG.Text = settings.BaseG.ToString();
            this.textBoxBaseR.Text = settings.BaseR.ToString();

            this.textBoxFunctionA.Text = settings.FunctionA.ToString();
            this.textBoxFunctionB.Text = settings.FunctionB.ToString();

            //Family constants
            this.textBoxC1Incr.Text = settings.C1Incr.ToString();
            this.textBoxC1Max.Text = settings.C1Max.ToString();
            this.textBoxC1Min.Text = settings.C1Min.ToString();

            this.textBoxC2Incr.Text = settings.C2Incr.ToString();
            this.textBoxC2Max.Text = settings.C2Max.ToString();
            this.textBoxC2Min.Text = settings.C2Min.ToString();

            //Funxction constants
            this.textBoxTraceLen.Text = settings.TraceLen.ToString();
            this.textBoxxIncr.Text = settings.XIncr.ToString();
            this.textBoxxMax.Text = settings.XMax.ToString();
            this.textBoxxMin.Text = settings.XMin.ToString();

            this.textBoxyIncr.Text = settings.YIncr.ToString();
            this.textBoxyMax.Text = settings.YMax.ToString();
            this.textBoxyMin.Text = settings.YMin.ToString();

            this.textBoxStartingX.Text = settings.StartingX.ToString();
            this.textBoxN.Text = settings.N.ToString();

            this.pictureBoxBackground.BackColor = settings.Background;
            this.colorDialog1.Color = settings.Background;

            if (settings.GraphType.Equals(GraphTypes.Derivative))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.Derivative;
            }
            else if (settings.GraphType.Equals(GraphTypes.Function))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.Function;
            }
            else if (settings.GraphType.Equals(GraphTypes.VectorField))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.VectorField;
            }
            else if (settings.GraphType.Equals(GraphTypes.Slope))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.Slope;
            }
            else if (settings.GraphType.Equals(GraphTypes.ParametricFamily))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.ParametricFamily;
            }
            else if (settings.GraphType.Equals(GraphTypes.ParametricFunction))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.ParametricFunction;
            }
            else if (settings.GraphType.Equals(GraphTypes.Iteration))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.Iteration;
            }
            else if (settings.GraphType.Equals(GraphTypes.Cobweb))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.Cobweb;
            }
            else if (settings.GraphType.Equals(GraphTypes.TwoDIteration))
            {
                this.comboBoxGraphType.SelectedItem = GraphTypes.TwoDIteration;
            }
        }
コード例 #3
0
ファイル: FunctionGrapher.cs プロジェクト: 3141592/vs
 private void newGraphToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form newgraph = new FunctionGrapher();
     newgraph.Show();
 }