2 using System.Collections.Generic;
6 using System.Windows.Controls;
7 using System.Windows.Data;
8 using System.Windows.Documents;
9 using System.Windows.Input;
10 using System.Windows.Media;
11 using System.Windows.Media.Imaging;
12 using System.Windows.Shapes;
15 namespace SeciUserInterface.Dialogs.Tabs
25 public HideTabs(Seci.SerialisableList<Seci.Definitions.Tab> tabs)
27 InitializeComponent();
33 _dt =
new DataTable();
34 _dt.Columns.Add(
"Tab", typeof(
string));
35 _dt.Columns.Add(
"Visible", typeof(Boolean));
39 foreach (Seci.Definitions.Tab tab in _tabs)
41 _dt.Rows.Add(tab.Name, tab.VisibleForUser);
44 dgTabs.ItemsSource = _dt.DefaultView;
55 foreach (DataRow row
in _dt.Rows)
57 foreach (Seci.Definitions.Tab tab in _tabs)
59 if (row.ItemArray[0].ToString() == tab.Name)
61 tab.VisibleForUser = (bool)row.ItemArray[1];
void btnCancel_Click(object sender, RoutedEventArgs e)
void Window_Loaded(object sender, RoutedEventArgs e)
HideTabs(Seci.SerialisableList< Seci.Definitions.Tab > tabs)
Seci.SerialisableList< Seci.Definitions.Tab > _tabs
void btnOk_Click(object sender, RoutedEventArgs e)
Interaction logic for HideTabs.xaml