示例#1
0
 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;
 }
示例#2
0
        //--------------------------------------------------------------------------
        // 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;
                });
            }
        }
示例#3
0
        //--------------------------------------------------------------------------
        // 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;
                });
            }
        }
示例#4
0
        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;
            }
        }
示例#5
0
        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();
            }
        }
示例#6
0
        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);
            }
        }
示例#7
0
 public void InventoryTagSubsequentFinds(UgiTag tag, int count, UgiDetailedPerReadData[] detailedPerReadData)
 {
     Console.WriteLine("Inventory subsequent finds");
 }
示例#8
0
 public void InventoryTagChanged(UgiTag tag, bool firstFind)
 {
 }
示例#9
0
 public void InventoryTagSubsequentFinds(UgiTag tag, int count,
                                         UgiDetailedPerReadData[] detailedPerReadData)
 {
 }
示例#10
0
 public void InventoryTagFound(UgiTag tag, UgiDetailedPerReadData[] detailedPerReadData)
 {
 }
示例#11
0
 public void InventoryTagChanged(UgiTag tag, bool firstFind)
 {
     tableView.ReloadData();
 }
示例#12
0
 public void InventoryTagChanged(UgiTag tag, bool firstFind)
 {
     UpdateTable();
 }