DialogResult ICyParamEditHook_v1.EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery,
                                                    ICyExpressMgr_v1 mgr)
        {
            const string         PAPAM_TAB_NAME_BUILTIN      = "Built-in";
            const string         PAPAM_TAB_NAME_INTERCONNECT = "Interconnect";
            CyParameters         prms            = new CyParameters(edit);
            CyGeneralPage        generalPage     = new CyGeneralPage(prms);
            ICyTabbedParamEditor editor          = edit.CreateTabbedParamEditor();
            CyTerminalControl_v1 interconnectTab = null;

            CyParamExprDelegate exprDelegate = delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
                prms.m_globalEditMode = false;
                if (param.TabName == generalPage.TabName)
                {
                    generalPage.InitFields();
                }
                prms.m_globalEditMode = true;
            };

            editor.AddCustomPage(Properties.Resources.PageTitleGeneral, generalPage, exprDelegate, generalPage.TabName);

            // System Builder support
            if (prms.InstQuery.DeviceQuery.IsPSoC4 && edit.IsInSystemBuilder)
            {
                interconnectTab = new CyTerminalControl_v1(edit);
                editor.AddCustomPage(Resources.InterconnectTabDisplayName, interconnectTab, exprDelegate,
                                     PAPAM_TAB_NAME_INTERCONNECT);
            }
            editor.AddDefaultPage(Properties.Resources.PageTitleBuiltIn, PAPAM_TAB_NAME_BUILTIN);

            prms.m_globalEditMode = true;

            return(editor.ShowDialog());
        }
        System.Windows.Forms.DialogResult ICyParamEditHook_v1.EditParams(ICyInstEdit_v1 edit,
                                                                         ICyTerminalQuery_v1 termQuery,
                                                                         ICyExpressMgr_v1 mgr)
        {
            ICyTabbedParamEditor editor = edit.CreateTabbedParamEditor();

            m_control        = new CyADC_DelSigControl(edit);
            m_editingControl = new CyADC_EditingControl(edit, m_control, BasicTabName);
            CyParamExprDelegate ExprDelegate = delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
                m_control.UpdateFormFromParams(edit);
            };

            editor.AddCustomPage(ConfigureTabName, m_editingControl, ExprDelegate, BasicTabName);
            editor.AddDefaultPage(BuiltinTabName, BuiltinTabName);
            editor.UseBigEditor = true;
            DialogResult result = editor.ShowDialog();

            // Place calculations here *****************************************************************************



            edit.CommitParamExprs();

            return(result);
        }
        DialogResult ICyParamEditHook_v1.EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery, ICyExpressMgr_v1 mgr)
        {
            parameters = new ErikaOSParameters(edit);
            CyParamExprDelegate paramChange = delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
                parameters.GetParams();
            };

            ICyTabbedParamEditor editor = edit.CreateTabbedParamEditor();

            editor.AddCustomPage("OS Config", new ErikaOSEditingControl(parameters), paramChange, "Properties");

            editor.AddCustomPage("Alarms & Counters", new ErikaOSEditingAlarms(parameters), paramChange, "Alarm Properties");

            editor.AddCustomPage("Events & Resources", new ErikaOSEditingEvents(parameters), paramChange, "Event Properties");

            editor.AddCustomPage("Tasks", new ErikaOSEditingTasks(parameters), paramChange, "Task Properties");

            editor.AddCustomPage("ISRs", new ErikaOSEditingISRs(parameters), paramChange, "ISR Properties");

            //editor.AddDefaultPage("Built-in", "Built-in");

            editor.AddAllDefaultPages();

            parameters.GetParams();

            return(editor.ShowDialog());
        }
Exemplo n.º 4
0
        DialogResult ICyParamEditHook_v1.EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery, ICyExpressMgr_v1 mgr)
        {
            parameters = new MultAccParameters(edit);
            CyParamExprDelegate paramChange = delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
                parameters.GetParams();
            };

            ICyTabbedParamEditor editor = edit.CreateTabbedParamEditor();

            editor.AddCustomPage("Properties", new MultAccEditingControl(parameters), paramChange, "Properties");

            editor.AddDefaultPage("Built-in", "Built-in");

            parameters.GetParams();

            return(editor.ShowDialog());
        }
Exemplo n.º 5
0
        public DialogResult EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery, ICyExpressMgr_v1 mgr)
        {
            CySPIMParameters     parameters = new CySPIMParameters(edit);
            ICyTabbedParamEditor editor     = edit.CreateTabbedParamEditor();

            CyParamExprDelegate configureExpressionViewDataChanged =
                delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
                parameters.LoadParameters(edit);
            };

            editor.AddCustomPage(Properties.Resources.BasicTabTitle, new CySPIMControl(parameters),
                                 configureExpressionViewDataChanged, BASIC_TABNAME);
            editor.AddCustomPage(Properties.Resources.AdvancedTabTitle, new CySPIMControlAdv(parameters),
                                 configureExpressionViewDataChanged, ADVANCED_TABNAME);
            editor.AddDefaultPage(Properties.Resources.BuiltInTabTitle, "Built-in");
            parameters.LoadParameters(edit);
            parameters.m_bGlobalEditMode = true;
            return(editor.ShowDialog());
        }
Exemplo n.º 6
0
        DialogResult ICyParamEditHook_v1.EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery, ICyExpressMgr_v1 mgr)
        {
            this.m_Component = edit;

            Parameters = new CyRTX51Parameters(edit);
            CyParamExprDelegate ParamCommitted = delegate(ICyParamEditor custEditor, CyCompDevParam param)
            {
            };
            ICyTabbedParamEditor editor = edit.CreateTabbedParamEditor();

            editor.AddCustomPage("Basic Configuration", new CyBasicConfigurationControl(Parameters), ParamCommitted, "");

            editor.AddDefaultPage("Built-in", "Built-in");

            DialogResult result = editor.ShowDialog();

            editor.InterceptHelpRequest = new CyHelpDelegate(InterceptHelp);

            return(result);
        }