Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:20:51+00:00 2026-06-04T04:20:51+00:00

This is my first time working with an RFID motorola handheld device. The point

  • 0

This is my first time working with an RFID motorola handheld device. The point of this application is to be able to take pictures with the device and save each picture the “trigger” is pulled. For some reason, I can only get the StartCapture() method to fire once thus only saving one picture and the method will not fire again will application is running. Any advice from someone who has experience with the Symbol.Imaging2 class library would be great.

    using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Diagnostics;
using Symbol;
using Symbol.ResourceCoordination;
using Symbol.RFID3;
using Symbol.Imaging2;


namespace TagReaderMobile
{
    public partial class Form1 : Form
    {
       // private RFIDReader _reader = null;
        private Trigger _trigger = null;
        private Imaging2 Imager = new Imaging2(); //initializes available camera
        private int fileNumber = 0;
        //private TabPage _openTagPage = null;

        public Form1()
        {
            InitializeComponent();
        }

        public Trigger Trigger
        {
            get
            {
                if (_trigger == null)
                {
                    _trigger =
                        new Trigger(new TriggerDevice(TriggerID.ALL_TRIGGERS, new ArrayList()));
                }

                return _trigger;
            }
        }

        private void InitializeAllTriggers()
        {
            if (!Trigger.IsStage2InUse)
            {
                Trigger.Stage2Notify += (_trigger_Stage2Notify);
            }
        }

        private void DisconnectTriggers()
        {
            if (_trigger != null)
            {
                _trigger.Dispose();
                _trigger = null;
            }
        }

        private void _trigger_Stage2Notify(object sender, TriggerEventArgs e)
        {
            if (e.NewState == TriggerState.STAGE2)
            {
                UpdateTriggerState(true);
            }
            else
            {
                UpdateTriggerState(false);
            }
        }

        private void UpdateTriggerState(bool triggerPulled)
        {
            var workToDo = new Func<bool, bool>(x =>
            {
                if (x)
                {
                    picTrigger1.Image = Properties.Resources.go;
                    picTrigger2.Image = Properties.Resources.go;
                }
                else
                {
                    picTrigger1.Image = Properties.Resources.stop;
                    picTrigger2.Image = Properties.Resources.stop;
                }
                return true;
            });

            if (InvokeRequired)
            {
                Invoke(workToDo, new object[] { triggerPulled });
            }
            else
            {
                workToDo(triggerPulled);
            }
        }

        private void Form1_Activated(object sender, EventArgs e)
        {
            UpdateTriggerState(false);
            //InitializeAllTriggers();

            ConfigureImager();
        }

        private void Form1_Deactivate(object sender, EventArgs e)
        {
            DisconnectTriggers();

        }

        private void ConfigureImager() // Image Capture Method
        {
            if (Imager != null)
            {
                Imager.Enable();
                Imager.StartAcquisition(pictureBox1);
                Imager.OnStatus += new Imaging2.OnStatusHandler(Image_OnStatus);
                Imager.OnCapture += new Imaging2.OnCaptureHandler(Image_OnCapture);

                StartCapture();

            }
        }

        private void StartCapture()
        {
            Imager.Config.Activators.FreezeTimeout = 3000;
            Imager.Config.Activators.Triggers = new[] { Triggers.ALLTRIGGERS };
            IMGResults result = Imager.CaptureImage();
        }

        void Image_OnCapture(ImageData imageData)
        {
            Imager.Enable();
            Debug.WriteLine("Path=" + Program.AppPath);

            System.Drawing.Image bitmap = imageData.GetBitmap();
            bitmap.Save(@"\My Documents\My Pictures\Image" + fileNumber + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
            try
            {
                bitmap.Save(@"\My Documents\My Pictures\Image" + fileNumber + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
            }
            catch(Exception e)
            {
                Debug.WriteLine(e.Message); 
                Debug.WriteLine(e.StackTrace);
            }
            fileNumber++;
            Debug.WriteLine("OnCapture: " + imageData.Results.ToString());
        }

        private void Image_OnStatus(StatusData statusData)
        {
            Debug.WriteLine("Status: " + statusData.EventType);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:20:52+00:00Added an answer on June 4, 2026 at 4:20 am

    Because when your trigger is fired, ConfigureImager is called. On the first time, the Imager object is created and StartCapture called. On the second time, the Imager already exists, so it is not created, but StartCapture is also not called because of the if block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time working with file i/o in java, and it's not
I am currently working on an ASP.NET MVC2 project. This is the first time
This is my first time truly working with composite keys. I have a record
This is my first time working with a webservice and I tried looking up
This question arises out of a combination of this being my first time working
This is my first time working with python. I'm trying to create a dictionary
This is my first time working with windows service, and I am learning as
This is my first time working with the Google Maps API. I have a
this is my first time working with sessions, im working on a members area,
This is my first time working with Objective-C, and I keep trying to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.