Пример #1
0
        public void LoadData()
        {
            MainGameView        = new GameView();
            SearchView          = new GameView();
            AddGameManuallyView = new GameView();

            OpticalReaderTask_MainPage = new OpticalReaderLib.OpticalReaderTask();

            Client_Global         = new HttpClient();
            Client_Global.Timeout = TimeSpan.FromSeconds(1D);

            CachedSearches_SearchResults  = new Dictionary <string, HttpResponseMessage>();
            CachedSearchResults           = CachedSearches_SearchResults.Keys.ToList();
            CachedImageURLs_SearchResults = new Dictionary <int, HttpResponseMessage>();
            Boards_SearchResults          = new Dictionary <TextBlock, Storyboard>();
            GameTitles_SearchResults      = new List <TextBlock>();

            MainPageListOrGridView = true;

            MultiAdd <string>
            (

                AddGameManuallyView.StringList,
                "Sony Playstation 4",
                "Sony Playstation 3",
                "Sony Playstation 2",
                "Sony Playstation 1",
                "Sony PSP",
                "Sony Playstation Vita",
                "Nintendo Wii",
                "Nintendo Wii U",
                "Nintendo GameCube",
                "Nintendo 64",
                "Nintendo Game Boy Advance",
                "Nintendo Game Boy Color",
                "Nintendo Game Boy",
                "Nintendo Super Game Boy",
                "Xbox",
                "Xbox 360",
                "Xbox One",
                "PC",
                "Android",
                "iOS",
                "Nintendo 3DS",
                "Nintendo DS",
                "Auto"
            );

            IsDataLoaded = true;
        }
Пример #2
0
        private void ReadCodeButton_Click(object sender, EventArgs e)
        {
            TypeTextBlock.Text        = "";
            DescriptionTextBlock.Text = "";
            ThumbnailImage.Source     = null;

            if (_task != null)
            {
                _task.Completed -= OpticalReaderTask_Completed;
                _task.Dispose();
                _task = null;
            }

            var showDebugInformation = DebugCheckBox.IsChecked != null && (bool)DebugCheckBox.IsChecked;
            var useCustomProcessor   = ProcessorCheckBox.IsChecked != null && (bool)ProcessorCheckBox.IsChecked;
            var focusInterval        = new TimeSpan(0, 0, 0, 0, 2500);
            var objectSize           = _size <= 10 ? new Windows.Foundation.Size(_size * 10, _size * 10) : new Windows.Foundation.Size(0, 0);
            var requireConfirmation  = ConfirmationCheckBox.IsChecked != null && (bool)ConfirmationCheckBox.IsChecked;

            if (useCustomProcessor)
            {
                _processor = new CustomProcessor();

                focusInterval = new TimeSpan(0, 0, 0, 0, 4000);
            }
            else
            {
                _processor = new OpticalReaderLib.ZxingProcessor();
            }

            _task = new OpticalReaderLib.OpticalReaderTask()
            {
                Processor            = _processor,
                ShowDebugInformation = showDebugInformation,
                FocusInterval        = focusInterval,
                ObjectSize           = objectSize,
                RequireConfirmation  = requireConfirmation
            };

            _task.Completed += OpticalReaderTask_Completed;
            _task.Show();
        }
Пример #3
0
        private void ReadCodeButton_Click()
        {
            if (_task != null)
            {
                _task.Completed -= OpticalReaderTask_Completed;
                _task.Dispose();
                _task = null;
            }

            var showDebugInformation = false;
            var useCustomProcessor   = false;
            var focusInterval        = new TimeSpan(0, 0, 0, 0, 2500);
            var objectSize           = _size <= 10 ? new Windows.Foundation.Size(_size * 10, _size * 10) : new Windows.Foundation.Size(0, 0);
            var requireConfirmation  = true;

            if (useCustomProcessor)
            {
                _processor = new CustomProcessor();

                focusInterval = new TimeSpan(0, 0, 0, 0, 4000);
            }
            else
            {
                _processor = new OpticalReaderLib.ZxingProcessor();
            }

            _task = new OpticalReaderLib.OpticalReaderTask()
            {
                Processor            = _processor,
                ShowDebugInformation = showDebugInformation,
                FocusInterval        = focusInterval,
                ObjectSize           = objectSize,
                RequireConfirmation  = false,
            };

            _task.Completed += OpticalReaderTask_Completed;
            _task.Show();
        }
Пример #4
0
        private void Button_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (_task != null)
            {
                _task.Completed -= _task_Completed;
                _task.Dispose();
                _task = null;
            }

            _processor = new Helpers.CustomProcessor();

            _task = new OpticalReaderLib.OpticalReaderTask()
            {
                Processor            = _processor,
                ShowDebugInformation = false,
                FocusInterval        = new TimeSpan(0, 0, 0, 0, 1000),
                ObjectSize           = new Windows.Foundation.Size(90, 90),
                RequireConfirmation  = false
            };

            _task.Completed += _task_Completed;
            _task.Show();
        }
Пример #5
0
        private void ReadCodeButton_Click(object sender, EventArgs e)
        {
            TypeTextBlock.Text = "";
            DescriptionTextBlock.Text = "";
            ThumbnailImage.Source = null;

            if (_task != null)
            {
                _task.Completed -= OpticalReaderTask_Completed;
                _task.Dispose();
                _task = null;
            }

            var showDebugInformation = DebugCheckBox.IsChecked != null && (bool)DebugCheckBox.IsChecked;
            var useCustomProcessor = ProcessorCheckBox.IsChecked != null && (bool)ProcessorCheckBox.IsChecked;
            var focusInterval = new TimeSpan(0, 0, 0, 0, 2500);
            var objectSize = _size <= 10 ? new Windows.Foundation.Size(_size * 10, _size * 10) : new Windows.Foundation.Size(0, 0);
            var requireConfirmation = ConfirmationCheckBox.IsChecked != null && (bool)ConfirmationCheckBox.IsChecked;

            if (useCustomProcessor)
            {
                _processor = new CustomProcessor();

                focusInterval = new TimeSpan(0, 0, 0, 0, 4000);
            }
            else
            {
                _processor = new OpticalReaderLib.ZxingProcessor();
            }

            _task = new OpticalReaderLib.OpticalReaderTask()
            {
                Processor = _processor,
                ShowDebugInformation = showDebugInformation,
                FocusInterval = focusInterval,
                ObjectSize = objectSize,
                RequireConfirmation = requireConfirmation
            };

            _task.Completed += OpticalReaderTask_Completed;
            _task.Show();
        }
Пример #6
0
 private void CreateOpticalReaderTask_Singleton()
 {
     _opReadTask = App.ViewModel.OpticalReaderTask_MainPage as OpticalReaderLib.OpticalReaderTask;
 }