Ejemplo n.º 1
0
        private static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(WDS_MainProg.OnUnhandledException);
            Application.ThreadException += new ThreadExceptionEventHandler(WDS_MainProg.Application_ThreadException);

            XmlConfigurator.Configure();
            GlobalServices.ChangeLogFileName();
            Thread.CurrentThread.Name = "MAIN thread";
            _log.Info("WDS is started...");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(_frameWin = new WDSFrameWindow());
        }
Ejemplo n.º 2
0
        private void SPI_Form_Load(object sender, EventArgs e)
        {
            tsrMainToolStrip.initVoltageRange(1.8, 3.6, _currentVoltage);
            tsrMainToolStrip.setLogo(RadioLogo.Transceiver);
            tsrMainToolStrip.SwitchEnabled = false;
            _baseChipType = _chipType = _adtRec.DeviceInfo.EBID.ChipType;
            _chipRev = _adtRec.DeviceInfo.EBID.ChipRevision;
            try
            {
                determinateBaseChipType();
                if ((_myDev != null) && (_myDev.Type == null))
                {
                    MessageBox.Show("The " + _adtRec.DeviceInfo.ShowChipName + " Rev.:" + _adtRec.DeviceInfo.ShowChipRevision + " is not supported in this application!\n", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                sbChipRevPane.Text = "Chip Revision: " + _myDev.Revision;
                SetControlsBasedOnFWType();
                cbbMasterDB_SelectedIndexChanged(this, null);
                statusBarPanel1.Text = " Device: " + _adtRec.DeviceInfo.ShowChipName + " " + _adtRec.PortAddress.objectInfo();
                Text = _adtRec.DeviceInfo.ShowChipName + " Register Setting Panel";
                _appId.Substring(_appId.Length - 3);
                if (_adtRec.PortAddress.Nickname != null)
                {
                    tsrMainToolStrip.Nickname = _adtRec.PortAddress.Nickname;
                }
                else
                {
                    tsrMainToolStrip.Nickname = "Device [" + _adtRec.UniqId + "]";
                }
                switch (_chipType)
                {
                    case "Si4030":
                    case "Si4031":
                    case "Si4032":
                    case "Si4033":
                        pnlRXFIFO.Visible = false;
                        pnlBerPer.Visible = false;
                        goto Label_02FF;

                    case "Si4313":
                    case "Si4330":
                    {
                        pnlTXFIFO.Visible = false;
                        Point location = pnlTXFIFO.Location;
                        pnlRXFIFO.Location = location;
                        location.X += 220;
                        pnlBerPer.Location = location;
                        goto Label_02FF;
                    }
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show("Error at Form Load!\n" + exception.Message);
            }
            Label_02FF:
            _frameWin = WDS_MainProg.frameWin();
            base.Location = WDS_MainProg.frameWin().getNextChildPosition();
            resetAppDataChanged();
        }
Ejemplo n.º 3
0
        private void SPI_Form_Load(object sender, EventArgs e)
        {
            this.tsrMainToolStrip.initVoltageRange(2.2, 3.6, this._currentVoltage);
            this.tsrMainToolStrip_SetVoltageRequested(null, new VoltageEventArgs(this._currentVoltage));
            this._baseChipType = this._chipType = this._adtRec.DeviceInfo.EBID.ChipType;
            this._chipRev = this._adtRec.DeviceInfo.EBID.ChipRevision;
            try
            {
                this.determinateBaseChipType();
                if ((this._myDev != null) && (this._myDev.Type == null))
                {
                    MessageBox.Show("The " + this._adtRec.DeviceInfo.ShowChipName + " Rev.:" + this._adtRec.DeviceInfo.ShowChipRevision + " is not supported in this application!\n", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                this.sbChipRevPane.Text = "Chip Revision: " + this._myDev.Revision;
                this.SetControlsBasedOnFWType();
                this.ButtonLock(true);
                this.cbbMasterDB_SelectedIndexChanged(this, null);
                this.statusBarPanel1.Text = " Device: " + this._adtRec.DeviceInfo.ShowChipName + this._adtRec.PortAddress.objectInfo();
                this.Text = this._adtRec.DeviceInfo.ShowChipName + " Register Setting Panel";
                this._appId.Substring(this._appId.Length - 3);
                if (this._adtRec.PortAddress.Nickname != null)
                {
                    this.tsrMainToolStrip.Nickname = this._adtRec.PortAddress.Nickname;
                }
                else
                {
                    this.tsrMainToolStrip.Nickname = "Device [" + this._adtRec.UniqId + "]";
                }
                switch (this._chipType)
                {
                    case "Si4030":
                    case "Si4031":
                    case "Si4032":
                    case "Si4033":
                        this.pnlRXFIFO.Visible = false;
                        this.pnlBerPer.Visible = false;
                        goto Label_02FB;

                    case "Si4313":
                    case "Si4330":
                    {
                        this.pnlTXFIFO.Visible = false;
                        Point location = this.pnlTXFIFO.Location;
                        this.pnlRXFIFO.Location = location;
                        location.X += 220;
                        this.pnlBerPer.Location = location;
                        goto Label_02FB;
                    }
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show("Error at Form Load!\n" + exception.Message);
            }
            Label_02FB:
            this._frameWin = WDS_MainProg.frameWin();
            base.Location = WDS_MainProg.frameWin().getNextChildPosition();
            this.send_SetLoadboardLed(LBLEDMode.Mode0);
            this._commonTimerRole = TmrRole.FindOutAppsNum;
            this.tmrCommon.Interval = 100;
            this.tmrCommon.Enabled = true;
            this.resetAppDataChanged();
        }
Ejemplo n.º 4
0
 private void SPI_Form_Load(object sender, EventArgs e)
 {
     this.tsrMainToolStrip.initVoltageRange(1.8, 3.6, this._currentVoltage);
     this._chipType = this._adtRec.DeviceInfo.EBID.ChipType;
     this._chipRev = this._adtRec.DeviceInfo.EBID.ChipRevision;
     try
     {
         if ((this._myDev == null) || (this._myDev.Type == null))
         {
             MessageBox.Show("The " + this._adtRec.DeviceInfo.ShowChipName + " Rev.:" + this._adtRec.DeviceInfo.ShowChipRevision + " is not supported in this application!\n", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         this.sbChipRevPane.Text = "Chip Revision: " + this._myDev.Revision;
         this.SetControlsBasedOnFWType();
         this.reloadRegisterGrid();
         this.statusBarPanel1.Text = " Device: " + this._adtRec.DeviceInfo.ShowChipName + this._adtRec.PortAddress.objectInfo();
         this.Text = this._adtRec.DeviceInfo.ShowChipName + " Register Setting Panel";
         this._appId.Substring(this._appId.Length - 3);
         if (this._adtRec.PortAddress.Nickname != null)
         {
             this.tsrMainToolStrip.Nickname = this._adtRec.PortAddress.Nickname;
         }
         else
         {
             this.tsrMainToolStrip.Nickname = "Device [" + this._adtRec.UniqId + "]";
         }
         this.chbDisableLogging2.Checked = !this.chbDisableLogging2.Checked;
         this.initExtendedTabs();
         this.initTclScriptTab();
         this.initFifo();
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Form Load!\n" + exception.Message);
     }
     this._frameWin = WDS_MainProg.frameWin();
     base.Location = WDS_MainProg.frameWin().getNextChildPosition();
     this.resetAppDataChanged();
     this.initToolStrip();
 }