Exemplo n.º 1
0
    public void onFormProcessed(SimulScanData processedForm)
    {
        TextView mtvTimestamp = (TextView)FindViewById(Resource.Id.tvTimestamp);
        string   timestamp    = processedForm.Timestamp;

        Log.Verbose(TAG, "onFormProcessed: timestamp-" + timestamp.ToString());
        mtvTimestamp.SetText(timestamp, TextView.BufferType.Normal);

        //get list of elements, extract regions from groups
        IList <SimulScanElement> processedElements    = processedForm.Elements;       //processedForm.Elements;
        List <SimulScanRegion>   copyProcessedRegions = new List <SimulScanRegion>(); //expanding elements into regions

        foreach (SimulScanElement curElement in processedElements)
        {
            if (curElement is SimulScanRegion)
            {
                copyProcessedRegions.Add((SimulScanRegion)curElement);
            }
            else if (curElement is SimulScanGroup)
            {
                IList <SimulScanRegion> regionsInGroup = ((SimulScanGroup)curElement).Regions;
                foreach (SimulScanRegion curRegion in regionsInGroup)
                {
                    copyProcessedRegions.Add(curRegion);
                }
            }
        }

        //ArrayAdapter obj = new ArrayAdapter(this, Resource.Layout.region_item, copyProcessedRegions);
        //RegionArrayAdapter adapter =(RegionArrayAdapter)obj;
        RegionArrayAdapter adapter             = new RegionArrayAdapter(this, Resource.Layout.region_item, Resource.Id.regionName, copyProcessedRegions);
        ListView           mlvProcessedRegions = (ListView)this.FindViewById(Resource.Id.regionLV);

        mlvProcessedRegions.Adapter = adapter;
    }
Exemplo n.º 2
0
 void selectedSimulScanReader_Data(object sender, SimulScanReader.DataEventArgs e)
 {
     // TODO Auto-generated method stub
     SimulScanData scanData = e.P0;
     Log.Verbose(TAG, "onData");
        Intent intent = new Intent(Activity, typeof(ResultsActivity));
     lock (simulscanDataList)
     {
         simulscanDataList.Add(scanData);
     }
     StartActivity(intent);
 }