예제 #1
0
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            //BackgroundWorker worker = new BackgroundWorker();
            //worker.DoWork += new DoWorkEventHandler(worker_DoWork);
            //worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_runworkercompleted);
            //worker.RunWorkerAsync();

            //BackgroundWorker imageButtonsWorker = new BackgroundWorker();
            //imageButtonsWorker.DoWork += new DoWorkEventHandler(imageButtonsWorker_DoWork);
            //imageButtonsWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(imageButtonsWorker_runworkercompleted);
            //imageButtonsWorker.RunWorkerAsync();
            InitializeContextMenuItems();

            _POSWindowViewModel = this.DataContext as POSPageViewModel;
            psc = new ProductSearchComboBox();
            this.spProductSearch.Children.Add(psc);
            psc.InventoryProductClicked += OnInventoryProductClicked;

            CustomerTextBox tbCustomer = new CustomerTextBox();
            this.spCustomerSearch.Children.Add(tbCustomer);
            tbCustomer.CustomerTextEnteredEventHandler += tbCustomer_CustomerTextEntered;

            Dispatcher.BeginInvoke(DispatcherPriority.Input,
                new Action(delegate() { psc.Focus(); }));
        }
예제 #2
0
 private void Load_POSPage()
 {
     CurrentViewModel = new POSPageViewModel();
 }