コード例 #1
0
        private void AddWorkButton_Click(object sender, RoutedEventArgs e)
        {
            var window = new WorkWindow(null);

            if (window.ShowDialog() ?? false)
            {
                UpdateWorks();
            }
        }
コード例 #2
0
        private void WorksListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var selectedWork = worksListBox.SelectedItem as Work;

            if (selectedWork != null)
            {
                var window = new WorkWindow(selectedWork);
                if (window.ShowDialog() ?? false)
                {
                    UpdateWorks();
                }

                worksListBox.UnselectAll();
            }
        }