示例#1
0
        private void BtnViewQueue_Click(object sender, RoutedEventArgs e)
        {
            // view the queue
            var queue = new JobQueueWindow(this);

            queue.Show();
        }
示例#2
0
        public JobQueueWindow(Window ownerWindow)
        {
            this.Owner = ownerWindow;
            InitializeComponent();

            if (ActiveWindow != null)
            {
                ActiveWindow.Close();
            }
            ActiveWindow = this;

            MainWindow.ActiveViewModel.JobsCollectionChanged += ActiveViewModel_JobsCollectionChanged;
            Closing += (a, b) => MainWindow.ActiveViewModel.JobsCollectionChanged -= ActiveViewModel_JobsCollectionChanged;
        }