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());
        }
Ejemplo n.º 2
0
        public CyGeneralPage(CyParameters parameters)
            : base(parameters)
        {
            InitializeComponent();

            numUpDownWaitTime.TextChanged += numUpDownWaitTime_TextChanged;

            InitFields();
        }
        public IEnumerable <CyDRCInfo_v1> GetDRCs(ICyDRCProviderArgs_v1 args)
        {
            CyParameters parameters = new CyParameters(args.InstQueryV1);

            if (parameters.CompareAppType() == false)
            {
                yield return(new CyDRCInfo_v1(CyDRCInfo_v1.CyDRCType_v1.Error,
                                              Properties.Resources.AppTypeCompareError));
            }
        }
        public CyCustErr GetBootloaderData(ICyBootloaderProviderArgs_v1 args, out CyBootloaderData_v1 data)
        {
            CyParameters prms = new CyParameters(args.InstQuery);

            CyBootloaderChecksumType_v1 checksum = CyBootloaderChecksumType_v1.BasicChecksum;

            if (prms.PacketChecksumType == true)
            {
                checksum = CyBootloaderChecksumType_v1.CRC16;
            }

            data = new CyBootloaderData_v1(prms.Version, checksum, prms.IOComponent);

            return(CyCustErr.OK);
        }
 public CyEditingWrapperControl(CyParameters parameters)
 {
     m_parameters = parameters;
     this.Load   += new EventHandler(CyEditingWrapperControl_Load);
 }