Exemplo n.º 1
0
        private void EditEquation(FunctionParameters equation)
        {
            if (equation != null)
            {
                FunctionParameters newEquation = (FunctionParameters)equation.Clone();

                NugenCCalcBase component = null;
                if (_is3DDesigner)
                {
                    component = new NugenCCalc3D();
                    component.FunctionParameters = (Function3DParameters)newEquation;
                }
                else
                {
                    component = new NugenCCalc2D();
                    component.FunctionParameters = (Function2DParameters)newEquation;
                }


                EquationForm frmEquation = new EquationForm(component);

                if (frmEquation.ShowDialog() == DialogResult.OK)
                {
                    equation.Name    = component.FunctionParameters.Name;
                    equation.Formula = component.FunctionParameters.Formula;
                    //equation.FunctionType = frmEquation.Equation.FunctionType;
                }
            }
            this.equationExplorer.Init();
        }
Exemplo n.º 2
0
        private void CreateEquation()
        {
            EquationForm frmEquation = new EquationForm();

            if (_is3DDesigner)
            {
                frmEquation.Component = new NugenCCalc3D();
            }
            else
            {
                frmEquation.Component = new NugenCCalc2D();
            }
            if (frmEquation.ShowDialog() == DialogResult.OK)
            {
                PredefinedSettings.Instance.Equations.Add(frmEquation.Component.FunctionParameters);
            }
            this.equationExplorer.Init();
        }
		private void EditEquation(FunctionParameters equation)
		{
			if (equation != null)
			{
				FunctionParameters newEquation = (FunctionParameters)equation.Clone();

				NugenCCalcBase component = null;
				if (_is3DDesigner)
				{
					component = new NugenCCalc3D();
					component.FunctionParameters = (Function3DParameters)newEquation;
				}
				else
				{
					component = new NugenCCalc2D();
					component.FunctionParameters = (Function2DParameters)newEquation;
				}


				EquationForm frmEquation = new EquationForm(component);

				if (frmEquation.ShowDialog() == DialogResult.OK)
				{
					equation.Name = component.FunctionParameters.Name;
					equation.Formula = component.FunctionParameters.Formula;
					//equation.FunctionType = frmEquation.Equation.FunctionType;
				}
			}
			this.equationExplorer.Init();
		}
		private void CreateEquation()
		{
			EquationForm frmEquation = new EquationForm();
			if (_is3DDesigner)
				frmEquation.Component = new NugenCCalc3D();
			else
				frmEquation.Component = new NugenCCalc2D();
			if (frmEquation.ShowDialog() == DialogResult.OK)
			{
				PredefinedSettings.Instance.Equations.Add(frmEquation.Component.FunctionParameters);
			}
			this.equationExplorer.Init();
		}