public EquationRepositoryView(NugenCCalcBase component) { _component = component; // This call is required by the Windows Form Designer. InitializeComponent(); }
public ExpressionRepositoryView(NugenCCalcBase component, bool is3DDesigner) { _component = component; _is3DDesigner = is3DDesigner; // This call is required by the Windows Form Designer. InitializeComponent(); }
private void EditExpression(FunctionParameters expression) { if (expression != null) { FunctionParameters newExpression = (FunctionParameters)expression.Clone(); NugenCCalcBase component = null; if (_is3DDesigner) { component = new NugenCCalc3D(); component.FunctionParameters = (Function3DParameters)newExpression; } else { component = new NugenCCalc2D(); component.FunctionParameters = (Function2DParameters)newExpression; } ExpressionForm frmExpression = new ExpressionForm(component); if (frmExpression.ShowDialog() == DialogResult.OK) { expression.Name = frmExpression.Component.FunctionParameters.Name; expression.CodeLanguage = frmExpression.Component.FunctionParameters.CodeLanguage; expression.Code = frmExpression.Component.FunctionParameters.Code; } } this.expressionExplorer.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(); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if ((context != null) && (provider != null)) { // Access the Property Browser's UI display service _editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (_editorService != null) { _listBox = new ListBox(); _listBox.Click += new EventHandler(_listBox_Click); _listBox.BorderStyle = BorderStyle.None; nugenCCalc = (NugenCCalcBase)context.Instance; if (nugenCCalc.Site.DesignMode) { foreach (Component component in context.Container.Components) { try { if (nugenCCalc.ValidateControl(component)) { _listBox.Items.Add(component); } } catch { } } } else { if (nugenCCalc.Owner != null) { IterateControls((nugenCCalc.Owner as Form).Controls); } } _editorService.DropDownControl(_listBox); if (_listBox.SelectedItem != null) { value = _listBox.SelectedItem; } } } return(value); }
public SourceView(NugenCCalcBase component) { // This call is required by the Windows Form Designer. InitializeComponent(); _component = component; }
public EquationForm(NugenCCalcBase component) : this() { _component = component; }
public ExpressionForm(NugenCCalcBase component) : this() { _component = component; }
/// <summary> /// Initializes a new instance of the PropertyView class. /// </summary> /// <param name="component">NugenCCalcComponent component</param> public PropertyView(NugenCCalcBase component) : this() { _component = component; }