void tagListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { this.selectedTag = listAdapter [e.Position]; FindViewById <Button> (Resource.Id.commissionButton).Enabled = true; FindViewById <Button> (Resource.Id.readTagButton).Enabled = true; FindViewById <Button> (Resource.Id.writeTagButton).Enabled = true; }
//-------------------------------------------------------------------------- // Inventory //-------------------------------------------------------------------------- partial void inventorySwitch_ValueChanged(UISwitch sender) { if (inventorySwitch.On) { selectedTag = null; UgiRfidConfiguration config = UgiRfidConfiguration.ConfigWithInventoryType(inventoryType); Ugi.Singleton().StartInventory(this, config); batteryButton.Enabled = false; configureButton.Enabled = false; commissionButton.Hidden = false; readButton.Hidden = false; writeButton.Hidden = false; commissionButton.Enabled = false; readButton.Enabled = false; writeButton.Enabled = false; tableView.ReloadData(); } else { Ugi.Singleton().ActiveInventory.StopInventory(() => { batteryButton.Enabled = true; configureButton.Enabled = true; commissionButton.Hidden = true; readButton.Hidden = true; writeButton.Hidden = true; }); } }
//-------------------------------------------------------------------------- // Inventory //-------------------------------------------------------------------------- void doStartStopInventory(object sender, EventArgs e) { ToggleButton tb = FindViewById <ToggleButton> (Resource.Id.inventoryToggleButton); if (tb.Checked) { UgiRfidConfiguration config = UgiRfidConfiguration.ConfigWithInventoryType(inventoryType); Ugi.Singleton().StartInventory(this, config); this.selectedTag = null; FindViewById <Button> (Resource.Id.batteryButton).Enabled = false; FindViewById <Button> (Resource.Id.configureButton).Enabled = false; FindViewById <Button> (Resource.Id.audioReconfigureButton).Enabled = false; FindViewById <View>(Resource.Id.line4).Visibility = ViewStates.Visible; FindViewById <Button> (Resource.Id.commissionButton).Enabled = false; FindViewById <Button> (Resource.Id.readTagButton).Enabled = false; FindViewById <Button> (Resource.Id.writeTagButton).Enabled = false; UpdateTable(); } else { Ugi.Singleton().ActiveInventory.StopInventory(() => { FindViewById <View>(Resource.Id.line4).Visibility = ViewStates.Invisible; FindViewById <Button> (Resource.Id.batteryButton).Enabled = true; FindViewById <View>(Resource.Id.configureButton).Enabled = true; FindViewById <View>(Resource.Id.audioReconfigureButton).Enabled = true; }); } }
public void RowSelected(UITableView tableView, NSIndexPath indexPath) { List <UgiTag> tags = Ugi.Singleton().ActiveInventory.Tags; if (indexPath.Row < tags.Count) { selectedTag = tags [indexPath.Row]; commissionButton.Enabled = true; readButton.Enabled = true; writeButton.Enabled = true; } }
public void InventoryTagFound(UgiTag tag, UgiDetailedPerReadData[] detailedPerReadData) { var epcTag = tag.Epc.ToString(); if (!_isEditingTags) { var shouldAddNewLine = !string.IsNullOrEmpty(TagsTextView.Text); if (shouldAddNewLine) { TagsTextView.Text += "\n" + epcTag; } else { TagsTextView.Text += epcTag; } } else { CurrentTagEPCLabel.Text = epcTag.ToString(); } }
public UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { UgiInventory inventory = Ugi.Singleton().ActiveInventory; if (inventory == null) { UITableViewCell cell = tableView.DequeueReusableCell("InventoryCell"); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, "InventoryCell"); } return(cell); } else { UgiRfidConfiguration config = inventory.Configuration; string cellIdentifier = config.ReportSubsequentFinds ? "LocateCell" : "InventoryCell"; UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier); } List <UgiTag> tags = Ugi.Singleton().ActiveInventory.Tags; if (indexPath.Row < tags.Count) { UgiTag tag = tags [indexPath.Row]; cell.TextLabel.Text = tag.Epc.ToString(); if (config.ReportSubsequentFinds) { cell.DetailTextLabel.Text = tag.ReadState.ReadHistoryString; } } else { cell.TextLabel.Text = "Item #" + indexPath.Row; } return(cell); } }
public void InventoryTagSubsequentFinds(UgiTag tag, int count, UgiDetailedPerReadData[] detailedPerReadData) { Console.WriteLine("Inventory subsequent finds"); }
public void InventoryTagChanged(UgiTag tag, bool firstFind) { }
public void InventoryTagSubsequentFinds(UgiTag tag, int count, UgiDetailedPerReadData[] detailedPerReadData) { }
public void InventoryTagFound(UgiTag tag, UgiDetailedPerReadData[] detailedPerReadData) { }
public void InventoryTagChanged(UgiTag tag, bool firstFind) { tableView.ReloadData(); }
public void InventoryTagChanged(UgiTag tag, bool firstFind) { UpdateTable(); }