示例#1
0
 public int restore(XmlNode parentNode)
 {
     try
     {
         XMLReaderWriter writer = new XMLReaderWriter();
         writer.RestoreRegister(parentNode, _myDev);
         writer.RestoreFifoWrite(parentNode, myFifoReadWrite, _myDev.Type);
         writer.RestoreFifoRead(parentNode, myFifoReadWrite, _myDev.Type);
         writer.RestoreBatch(parentNode, myBatchCommandList, 1, _myDev.Type);
         writer.RestoreBatch(parentNode, myBatchCommandList, 2, _myDev.Type);
         writer.RestoreBatch(parentNode, myBatchCommandList, 3, _myDev.Type);
         writer.RestoreBatch(parentNode, myBatchCommandList, 4, _myDev.Type);
         writer.RestoreFormView(parentNode, myFormStatus);
         RegisterDGVACC = _myDev;
         FifoViewACC = myFifoReadWrite;
         BatchViewACC = myBatchCommandList;
         FormViewACC = myFormStatus;
         return 0;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at restoring Application status!\n" + exception.Message);
         return -1;
     }
 }
示例#2
0
 public int save(XmlNode parentNode)
 {
     try
     {
         XMLReaderWriter writer = new XMLReaderWriter();
         XmlNode newChild = parentNode.OwnerDocument.CreateElement("SPITools_PRO");
         parentNode.AppendChild(newChild);
         parentNode = newChild;
         writer.StoreAdtRecUniqId(parentNode, _adtRec.UniqId);
         writer.StoreRegister(parentNode, _myDev);
         if (myFifoReadWrite != null)
         {
             writer.StoreFifoWrite(parentNode, myFifoReadWrite, _myDev.Type);
             writer.StoreFifoRead(parentNode, myFifoReadWrite, _myDev.Type);
         }
         if (myBatchCommandList != null)
         {
             writer.StoreBatch(parentNode, myBatchCommandList, 1, _myDev.Type);
             writer.StoreBatch(parentNode, myBatchCommandList, 2, _myDev.Type);
             writer.StoreBatch(parentNode, myBatchCommandList, 3, _myDev.Type);
             writer.StoreBatch(parentNode, myBatchCommandList, 4, _myDev.Type);
         }
         if (myFormStatus != null)
         {
             writer.StoreFormView(parentNode, myFormStatus);
         }
         return 0;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at saving Application status!\n" + exception.Message);
         return -1;
     }
 }
示例#3
0
 public int save(XmlNode parentNode)
 {
     try
     {
         XMLReaderWriter writer = new XMLReaderWriter();
         XmlNode newChild = parentNode.OwnerDocument.CreateElement("SPITools_PRO");
         parentNode.AppendChild(newChild);
         parentNode = newChild;
         writer.StoreAdtRecUniqId(parentNode, this._adtRec.UniqId);
         return 0;
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error at saving Application status!\n" + exception.Message);
         return -1;
     }
 }