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); }
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); }
public DeviceLeft() { InitializeComponent(); tag = ObjectManage.GetDeviceInstance(DeviceType.ITAGSingleUse); this.InitEvents(); }