Example #1
0
 public void AddHolderProc()
 {
     Navigator.Holder currHolder = new Navigator.Holder();
       currHolder.DeviceTP = 0;
       currHolder.DeviceID = Navigator.GetNewID();
       currHolder.DeviceImg = (Image) Navigator.Hold;
       currHolder.LabelName = Navigator.GetNewName(0);
       currHolder.PS_Avail = 150;
       currHolder.ID = currHolder.DeviceID;
       int num = 0;
       if (Navigator.HolderArray != null)
     num = Navigator.HolderArray.Length;
       currHolder.LabelName = Navigator.AskString(this.Strx[19].ToString(), this.Strx[21].ToString() + " #" + (object) num, 10, false);
       if (currHolder.LabelName.Equals("<no>"))
     return;
       string s = Navigator.AskString(this.Strx[20].ToString(), "", 3, true);
       if (s.Equals("<no>"))
     return;
       int.TryParse(s, out currHolder.PS_Avail);
       if (currHolder.PS_Avail < 1)
     return;
       Navigator.EditHolder(currHolder);
       this.RefreshHolderList();
 }
Example #2
0
 public void InitUSBDevices()
 {
     int num = USBLibrary.InitUSBCDLibrary();
       int deviceNumber = USBLibrary.GetDeviceNumber();
       Navigator.Holder[] holderArray = new Navigator.Holder[deviceNumber];
       for (int index = 0; index < deviceNumber; ++index)
       {
     holderArray[index].DeviceID = USBLibrary.EnumDevice(index);
     holderArray[index].ID = holderArray[index].DeviceID;
     holderArray[index].DeviceTP = 1;
     holderArray[index].DeviceImg = (Image) Navigator.Libr;
     holderArray[index].LabelName = this.Strx[15].ToString() + " #" + (object) index;
     holderArray[index].PS_Avail = 150;
     Navigator.EditHolder(holderArray[index]);
     num = USBLibrary.USBCDLEDON(holderArray[index].DeviceID);
     Navigator.GoDevicePos(index, 1);
       }
 }