Beispiel #1
0
 private void nudLoopLimit_ValueChanged(object sender, EventArgs e)
 {
     myFormStatus = FormViewACC;
 }
Beispiel #2
0
 public int initialize()
 {
     _chipType = _baseChipType = _adtRec.DeviceInfo.EBID.ChipType;
     _chipRev = _adtRec.DeviceInfo.EBID.ChipRevision;
     determinateBaseChipType();
     myFormStatus = new FormStatus();
     myDevList = new List<DeviceRegisterSet>();
     myDevIndexer = new DeviceIndexTable();
     _myDev = SPI_tools.FromXml2DeviceRecordSet(_baseChipType, _chipRev, "SPI_tools_PRO.xml", "NewWDS.Applications.App_SPI_Tool_Pro");
     return _ioph.initialize();
 }
Beispiel #3
0
 private void chbLoopLimit_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (chbLoopLimit.Checked)
         {
             nudLoopLimit.ReadOnly = false;
             nudLoopLimit.Update();
             nudLoopLimit.Focus();
         }
         else
         {
             nudLoopLimit.ReadOnly = true;
             nudLoopLimit.Value = 1M;
         }
         myFormStatus = FormViewACC;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Loop Limit Selection!\n" + exception.Message);
     }
 }
Beispiel #4
0
 private void chbMarked_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         RegisterDGVACC = _myDev;
         myFormStatus = FormViewACC;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Marking register!\n" + exception.Message);
     }
 }
Beispiel #5
0
 private void cbbMasterDB_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         RegisterDGVACC = _myDev;
         if (dgvRegisterList.Rows.Count > 0)
         {
             dgvRegisterList.Rows[0].Selected = true;
             dgvRegisterList_SelectionChanged(null, null);
         }
         bool flag1 = _myDev.Notes == "";
         myFifoReadWrite = new FifoReadWrite(_myDev.TxPufferSize, _myDev.RxPufferSize);
         FifoViewACC = myFifoReadWrite;
         myBatchCommandList = new BatchCommandList();
         BatchViewACC = myBatchCommandList;
         myFormStatus = FormViewACC;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Database Selection!\n" + exception.Message);
     }
 }
Beispiel #6
0
 private void chbFilter_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         RegisterDGVACC = _myDev;
         myFormStatus = FormViewACC;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at filter condition setting!\n" + exception.Message);
     }
 }
Beispiel #7
0
 public int initialize()
 {
     this._chipType = this._adtRec.DeviceInfo.EBID.ChipType;
     this._chipRev = this._adtRec.DeviceInfo.EBID.ChipRevision;
     this.determinateBaseChipType();
     this.myFormStatus = new FormStatus();
     this.myDevIndexer = new DeviceIndexTable();
     this._myDev = SPI_tools.FromXml2DeviceRecordSet(this._baseChipType, this._chipRev, "SPI_tools.xml", "NewWDS.Applications.App_SPI_Tool");
     return this._ioph.initialize();
 }
Beispiel #8
0
 private void cbbMasterDB_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         this.RegisterDGVACC = this._myDev;
         if (this.dgvRegisterList.Rows.Count > 0)
         {
             this.dgvRegisterList.Rows[0].Selected = true;
             this.dgvRegisterList_SelectionChanged(null, null);
         }
         this.myFifoReadWrite = new FifoReadWrite(this._myDev.TxPufferSize, this._myDev.RxPufferSize);
         this.FifoViewACC = this.myFifoReadWrite;
         this.myBatchCommandList = new BatchCommandList();
         this.BatchViewACC = this.myBatchCommandList;
         this.myFormStatus = this.FormViewACC;
         if (!this._isDeviceBusy)
         {
             this.ButtonLock(false);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Database Selection!\n" + exception.Message);
     }
 }
Beispiel #9
0
 private void reloadRegisterGrid()
 {
     try
     {
         this.RegisterDGVACC = this._myDev;
         if (this.dgvRegisterList.Rows.Count > 0)
         {
             this.dgvRegisterList.Rows[0].Selected = true;
             this.dgvRegisterList_SelectionChanged(null, null);
         }
         bool flag1 = this._myDev.Notes == "";
         this.myFifoReadWrite = new FifoReadWrite(this._myDev.TxPufferSize, this._myDev.RxPufferSize);
         this.myBatchCommandList = new BatchCommandList();
         this.BatchViewACC = this.myBatchCommandList;
         this.myFormStatus = this.FormViewACC;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at Database Selection!\n" + exception.Message);
     }
 }
Beispiel #10
0
 public void StoreFormView(XmlNode root, FormStatus data)
 {
     XmlDocument ownerDocument = root.OwnerDocument;
     XmlElement newChild = ownerDocument.CreateElement("SPIView");
     XmlElement element2 = ownerDocument.CreateElement("Checks");
     element2.SetAttribute("isDigital", data.IsDigital ? "1" : "0");
     element2.SetAttribute("isRF", data.IsRF ? "1" : "0");
     element2.SetAttribute("isTest", data.IsTest ? "1" : "0");
     element2.SetAttribute("isMisc", data.IsMisc ? "1" : "0");
     element2.SetAttribute("isViewMarked", data.IsViewMarked ? "1" : "0");
     newChild.AppendChild(element2);
     element2 = ownerDocument.CreateElement("Batch");
     element2.SetAttribute("index", data.SelectedBatch.ToString());
     element2.SetAttribute("limit", data.Limit ? "1" : "0");
     if (data.Limit)
     {
         element2.SetAttribute("limitNum", data.LimitNum.ToString());
     }
     newChild.AppendChild(element2);
     root.AppendChild(newChild);
 }
Beispiel #11
0
 public void RestoreFormView(XmlNode root, FormStatus data)
 {
     XmlDocument ownerDocument = root.OwnerDocument;
     XmlNodeList list = root.SelectNodes("SPIView");
     if (list.Count > 0)
     {
         XmlNode node = list[0];
         XmlNode node2 = node.SelectSingleNode("Checks");
         data.IsDigital = node2.Attributes.GetNamedItem("isDigital").Value.ToString() == "1";
         data.IsRF = node2.Attributes.GetNamedItem("isRF").Value.ToString() == "1";
         data.IsMisc = node2.Attributes.GetNamedItem("isMisc").Value.ToString() == "1";
         data.IsTest = node2.Attributes.GetNamedItem("isTest").Value.ToString() == "1";
         data.IsViewMarked = node2.Attributes.GetNamedItem("isViewMarked").Value.ToString() == "1";
         XmlNode node3 = node.SelectSingleNode("Batch");
         data.SelectedBatch = Convert.ToInt32(node3.Attributes.GetNamedItem("index").Value);
         data.Limit = node3.Attributes.GetNamedItem("limit").Value.ToString() == "1";
         if (data.Limit)
         {
             data.LimitNum = Convert.ToInt32(node3.Attributes.GetNamedItem("limitNum").Value);
         }
     }
 }