示例#1
0
 public bool AutoConnect()
 {
     try
     {
         if (tag == null)
         {
             tag = ObjectManage.GetDeviceInstance(DeviceType.ITAGSingleUse);
         }
         //ProgressEvent(null, null);
         _IsConnected = this.cbSingleUse.Checked = tag.Auto((int)DeviceType.ITAGSingleUse);
     }
     catch { return(false); }
     return(this.cbSingleUse.Checked);
 }
示例#2
0
 public bool ConnectDevice()
 {
     try
     {
         if (cbSingleUse.Checked)
         {
             if (tag == null)
             {
                 tag = ObjectManage.GetDeviceInstance(DeviceType.ITAGSingleUse);
             }
             //ProgressEvent(null, null);
             return(_IsConnected = tag.Connect((int)DeviceType.ITAGSingleUse));
         }
         else
         {
             Utils.ShowMessageBox(Messages.ConnectWithNoDeviceSelected, Messages.TitleError);
         }
     }
     catch
     {
         return(false);
     }
     return(false);
 }
示例#3
0
 public DeviceLeft()
 {
     InitializeComponent();
     tag = ObjectManage.GetDeviceInstance(DeviceType.ITAGSingleUse);
     this.InitEvents();
 }