OcrConversionStateManager implements a singleton that provides access to the state of the last OCR conversion. It inherits from ModelBase which means that interested parties can subscribe to its PropertyChanged. It also means that references to the singleton instance of type OcrConversionStateManager can be used in data binding syntax in XAML files.
Inheritance: GPS.Utils.ModelBase
        private double photoAngle;          // Wrapped by this.PhotoAngle

        /// <summary>
        /// Initializes a new instance of the PhotoAreaViewModel class.
        /// </summary>
        /// <param name="ocrData">
        /// A reference to the OcrData instance that stores the 
        /// photo stream and the text obtained after the OCR conversion.
        /// </param>
        /// <param name="ocrConversionStateManager">
        /// A reference to the OcrConversionStateManager instance that stores the 
        /// status of the last OCR conversion.
        /// </param>
        public PhotoAreaViewModel(OcrData ocrData, OcrConversionStateManager ocrConversionStateManager)
            : base(ocrData, ocrConversionStateManager)
        {
            this.OcrData.PropertyChanged += new PropertyChangedEventHandler(this.OcrData_PropertyChanged);

            // If the photo stream is available when this instance is created we'll call OnPhotoStreamChanged
            // to update all properties related to the photo.
            if (this.OcrData.PhotoStream != null)
            {
                this.OnPhotoStreamChanged();
            }
        }
        /// <summary>
        /// Initializes a new instance of the OcrViewModelBase class.
        /// </summary>
        /// <param name="ocrData">
        /// A reference to the OcrData instance that stores the 
        /// photo stream and the text obtained after the OCR conversion.
        /// </param>
        /// <param name="ocrConversionStateManager">
        /// A reference to the OcrConversionStateManager instance that stores the 
        /// status of the last OCR conversion.
        /// </param>
        public OcrViewModelBase(OcrData ocrData, OcrConversionStateManager ocrConversionStateManager)
        {
            if (ocrData == null)
            {
                throw new ArgumentNullException("ocrData");
            }

            if (ocrConversionStateManager == null)
            {
                throw new ArgumentNullException("ocrConversionStateManager");
            }

            this.OcrData = ocrData;
            this.OcrConversionStateManager = ocrConversionStateManager;
        }
        /// <summary>
        /// Initializes a new instance of the MainPage class.
        /// </summary>
        public OcrMainPage()
        {
            InitializeComponent();

            if (this.VerifyHawaiiAppId())
            {
                this.ocrData = OcrData.Instance;
                this.ocrData.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.OcrData_PropertyChanged);

                this.ocrConversionStateManager = OcrConversionStateManager.Instance;
                this.ocrConversionStateManager.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.ConversionStateManager_PropertyChanged);

                this.mainPivot.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.MainPivot_SelectionChanged);
            }

            Debug.WriteLine("----------------------------\ntesting REST CLIENT\n------------------------------------");
            RestClient rc = new RestClient();
        }
        private TextViewMode textViewMode;    // Wrapped by this.TextViewMode

        /// <summary>
        /// Initializes a new instance of the TextAreaViewModel class.
        /// </summary>
        /// <param name="ocrData">
        /// A reference to the OcrData instance that stores the 
        /// photo stream and the text obtained after the OCR conversion.
        /// </param>
        /// <param name="ocrConversionStateManager">
        /// A reference to the OcrConversionStateManager instance that stores the 
        /// status of the last OCR conversion.
        /// </param>
        public TextAreaViewModel(OcrData ocrData, OcrConversionStateManager ocrConversionStateManager)
            : base(ocrData, ocrConversionStateManager)
        {
        }