Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            AddAllBug AddBug = new AddAllBug("-");

            AddBug.ShowDialog();
            bw           = new BackgroundWorker();
            wait.Opacity = 1;
            bw.DoWork   += (obj, ea) => {
                Update();
                UpdateClosed();
            };
            bw.RunWorkerAsync();
            bw.RunWorkerCompleted += (obj, ea) => {
                wait.Opacity               = 0;
                BugsList.ItemsSource       = BugList;
                ClosedBugsList.ItemsSource = BugClosedList;
            };
        }
Пример #2
0
        private void EditBug(object sender, RoutedEventArgs e)
        {
            string    link   = (sender as Button).Tag.ToString();
            AddAllBug AddBug = new AddAllBug(link);

            AddBug.ShowDialog();
            bw           = new BackgroundWorker();
            wait.Opacity = 1;
            bw.DoWork   += (obj, ea) => {
                Update();
                UpdateClosed();
            };
            bw.RunWorkerAsync();
            bw.RunWorkerCompleted += (obj, ea) => {
                wait.Opacity               = 0;
                BugsList.ItemsSource       = BugList;
                ClosedBugsList.ItemsSource = BugClosedList;
            };
        }