Example #1
0
        private static void cameraTask_Completed(object sender, PhotoResult e)
        {
            NetRequest pNetRequest = RhoClassFactory.createNetRequest();
            String     strFullUrl  = pNetRequest.resolveUrl(m_callback);

            switch (e.TaskResult)
            {
            case TaskResult.OK:
                pNetRequest.pushData(strFullUrl, "status=ok&image_uri=" + e.OriginalFileName + "&rho_callback=1", null);
                break;

            case TaskResult.None:
                pNetRequest.pushData(strFullUrl, "status=error&message=Error&rho_callback=1", null);
                break;

            case TaskResult.Cancel:
                pNetRequest.pushData(strFullUrl, "status=cancel&message=User cancelled operation&rho_callback=1", null);
                break;

            default:
                break;
            }

            //Code to display the photo on the page in an image control named myImage.
            //System.Windows.Media.Imaging.BitmapImage bmp = new System.Windows.Media.Imaging.BitmapImage();
            //bmp.SetSource(e.ChosenPhoto);
            //myImage.Source = bmp;
        }