예제 #1
0
        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();
            }
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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)
        {
        }