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;
14 namespace SeciControls
23 public event EventHandler
OnOK;
30 InitializeComponent();
36 txtInstrument.Text = _holder.InstName;
42 comName.ItemsSource = _holder.GetExperimenters();
49 comDate.ItemsSource = null;
52 if (comName.SelectedIndex != -1)
54 getDates(comName.SelectedItem.ToString());
60 comDate.ItemsSource = _holder.GetDates(Exptr);
62 if (comDate.Items.Count == 1)
64 comDate.SelectedIndex = 0;
72 if (comDate.SelectedIndex != -1)
74 getRB(comDate.SelectedItem.ToString());
77 var date = _holder.Dates[comDate.SelectedIndex];
80 txtWarning.Visibility = System.Windows.Visibility.Hidden;
84 txtWarning.Visibility = System.Windows.Visibility.Visible;
91 String rbNum = date.Substring(date.IndexOf(
"[RB = ") + 6);
92 rbNum = rbNum.Substring(0, rbNum.Length - 1);
99 if (txtRbNo.Text !=
"")
110 DialogResult =
false;
118 String[,] values =
new String[users.Count, 3];
120 for (
int i = 0; i < users.Count; ++i)
122 PI pi = users[i] as
PI;
127 values[i, 0] = users[i].Name;
128 values[i, 1] = users[i].Institute;
131 else if (contact != null)
133 values[i, 0] = users[i].Name;
134 values[i, 1] = users[i].Institute;
135 values[i, 2] =
"Contact";
139 values[i, 0] = users[i].Name;
140 values[i, 1] = users[i].Institute;
void comDate_SelectionChanged(object sender, SelectionChangedEventArgs e)
void setUsers(List< User > users)
Interaction logic for RBFinder.xaml
void btnCancel_Click(object sender, RoutedEventArgs e)
void Window_Loaded(object sender, RoutedEventArgs e)
void getDates(String Exptr)
void comName_SelectionChanged(object sender, SelectionChangedEventArgs e)
void btnUseRb_Click(object sender, RoutedEventArgs e)
bool DateOK(Tuple< DateTime, DateTime > daterange)
List< User > RetrieveUsersByRb(String rbnumber)