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.Navigation;
13 using System.Windows.Shapes;
15 using System.Globalization;
16 using System.Reflection;
17 using System.ComponentModel;
18 using System.Diagnostics;
20 namespace SeciControls
27 private DataTable
_dt;
34 InitializeComponent();
41 _dt =
new DataTable(
"UserData");
42 _dt.Columns.Add(
"Name", typeof(
string));
43 _dt.Columns.Add(
"Institute", typeof(
string));
52 txtRbNumber.Text = Seci.Standard.UserDetails.GetRbNumber();
53 String[,] users = Seci.Standard.UserDetails.GetUsers();
57 for (
int i = 0; i < users.GetLength(0); ++i)
59 _dt.Rows.Add(users[i, 0], users[i, 1]);
62 dgUsers.ItemsSource = _dt.DefaultView;
65 for (
int i = 0; i < dgUsers.Columns.Count; ++i)
67 dgUsers.Columns[i].Width = 0;
68 dgUsers.Columns[i].Width = DataGridLength.SizeToCells;
89 finder.WindowStartupLocation = WindowStartupLocation.CenterScreen;
90 if (finder.ShowDialog() ==
true)
92 txtRbNumber.Text =
"Updating...";
96 Seci.Standard.UserDetails.SetRbNumber(finder.RB);
97 System.Threading.Thread.Sleep(1000);
98 Seci.Standard.UserDetails.SetUsers(finder.Users);
105 System.Threading.Thread.Sleep(500);
109 catch (Exception err)
119 _webpageLauncher.RunWorkerAsync();
128 System.Diagnostics.Process.Start(Seci.Definitions.Status.SampleSheetWebpage);
140 System.Diagnostics.Process.Start(Seci.Definitions.Status.EraSheetWebpage);
Interaction logic for RBFinder.xaml