Esempio n. 1
0
        private void MatchingQueueCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var matchingQueueVM = new MatchingQueueViewModel();

            var matchingQueueWindow = new MatchingQueueWindow(matchingQueueVM);

            matchingQueueWindow.Owner = this;
            matchingQueueWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            matchingQueueWindow.Show();
        }
Esempio n. 2
0
        public MatchingQueueWindow(MatchingQueueViewModel vm)
        {
            InitializeComponent();

            _matchingWorker.WorkerReportsProgress      = true;
            _matchingWorker.WorkerSupportsCancellation = true;
            //_matchingWorker.ProgressChanged += ProgressChanged;
            _matchingWorker.DoWork             += MatchWork;
            _matchingWorker.RunWorkerCompleted += MatchWorker_RunWorkerCompleted;

            _vm = vm;
            this.DataContext = vm;
        }