Exemple #1
0
/// <summary>
/// Call service to get CRC image
/// </summary>
/// <param name="parms"></param>
/// <returns></returns>

        public Bitmap GetImage(AssayGetImageParms parms)
        {
            GetImageException = null;
            GetImageBitmap    = null;

            if (UseSeparateThread)
            {
                Thread thread = new Thread(GetImageMethod);                 // run on separate thread to prevent the "big red X" issue
                thread.Name = "GetImage";
                thread.Start(parms);
                thread.Join();                 // wait for thread to exit while continuing to pump messages
            }

            else
            {
                GetImageMethod(parms);
            }

            if (GetImageException == null)
            {
                return(GetImageBitmap);
            }
            else
            {
                throw new Exception(GetImageException.Message, GetImageException);
            }
        }
Exemple #2
0
        /// <summary>
        /// GetImageMethod
        /// </summary>
        /// <param name="parmObj"></param>

        void GetImageMethod(object args)
        {
            int ci;

            AssayGetImageParms parms = args as AssayGetImageParms;

            if (parms == null)
            {
                throw new Exception("Null parameters");
            }

            throw new NotImplementedException();             // todo
        }