private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var window = new EditSessionTemplateWindow((SessionTemplate)TemplatesGrid.SelectedItem);

            window.ShowDialog();
            CollectionViewSource.GetDefaultView(TemplatesGrid.ItemsSource).Refresh();
        }
        private void ModifyBtn_Click(object sender, RoutedEventArgs e)
        {
            if (SymbolsGrid.SelectedItems.Count == 0) return;

            var window = new EditSessionTemplateWindow((SessionTemplate)SymbolsGrid.SelectedItem);
            window.ShowDialog();
            CollectionViewSource.GetDefaultView(SymbolsGrid.ItemsSource).Refresh();
        }
Exemple #3
0
        private void ModifyBtn_Click(object sender, RoutedEventArgs e)
        {
            if (SymbolsGrid.SelectedItems.Count == 0)
            {
                return;
            }

            var window = new EditSessionTemplateWindow((SessionTemplate)SymbolsGrid.SelectedItem);

            window.ShowDialog();
            CollectionViewSource.GetDefaultView(SymbolsGrid.ItemsSource).Refresh();
        }
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            var window = new EditSessionTemplateWindow(null);
            window.ShowDialog();

            if (window.TemplateAdded)
            {
                using (var entityContext = new MyDBContext())
                {
                    Templates.Add(entityContext.SessionTemplates.Include("Sessions").First(x => x.Name == window.TheTemplate.Name));
                }
            }
        }
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            var window = new EditSessionTemplateWindow(null);

            window.ShowDialog();

            if (window.TemplateAdded)
            {
                using (var entityContext = new MyDBContext())
                {
                    Templates.Add(entityContext.SessionTemplates.Include("Sessions").First(x => x.Name == window.TheTemplate.Name));
                }
            }
        }
 private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
 {
     var window = new EditSessionTemplateWindow((SessionTemplate)TemplatesGrid.SelectedItem);
     window.ShowDialog();
     CollectionViewSource.GetDefaultView(TemplatesGrid.ItemsSource).Refresh();
 }