public ItemEditor(ProjSelect parent, string[] headers, List <TaskSet> ts) { InitializeComponent(); ParentWindow = parent; Col1.Visibility = Visibility.Hidden; Col2.Visibility = Visibility.Hidden; Col3.Visibility = Visibility.Hidden; Col4.Visibility = Visibility.Hidden; if (headers.Count() > 0) { Col1.Visibility = Visibility.Visible; Col1.Header = headers[0]; if (headers.Count() > 1) { Col2.Visibility = Visibility.Visible; Col2.Header = headers[1]; if (headers.Count() > 2) { Col3.Visibility = Visibility.Visible; Col3.Header = headers[2]; if (headers.Count() > 3) { Col4.Visibility = Visibility.Visible; Col4.Header = headers[3]; } } } } tasks = ts; grid.ItemsSource = ts; }
private void btnList_MouseUp(object sender, MouseButtonEventArgs e) { if (CheckFile()) { ProjSelect a = new ProjSelect(this); Hide(); a.Show(); a.Focus(); } }
public FinalList(ProjSelect parent, string projName, ProjectInfo projInfo, string[] items, List <TaskSet> tasks, PlateStyle plateStyle, string invalid, string[] lots, string firstVial) { Parent = parent; InitializeComponent(); this.projInfo = projInfo; this.items = items; this.tasks = tasks; this.projName = projName; FullList1 = new ObservableCollection <ListItem>(); FullList2 = new ObservableCollection <ListItem>(); std1StartVials = new Dictionary <int, int>(); std1StartVialsSuffix = new Dictionary <int, string>(); this.plateStyle = plateStyle; currentVial = ParseInvalid(firstVial); STDenum = 0; // change lots abbr. to normal style this.Lots = new string[lots.Length]; Regex reg = new Regex(@" ([L|A|T])([0-9]{1,2})(\b)"); for (int i = 0; i < lots.Length; i++) { Match match = reg.Match(lots[i]); if (match.Success) { Lots[i] = lots[i].Replace(" A", @"(40*75,") .Replace(" L", @"(25*60,") .Replace(" T", @"(30*65,") + "M)"; } else { Lots[i] = lots[i]; } } this.invalid = invalid; this.first = firstVial; conditionList = new VialCondition[2][]; for (int i = 0; i < conditionList.Length; i++) { conditionList[i] = new VialCondition[300]; for (int j = 0; j < conditionList[i].Length; j++) { if (j < currentVial) { conditionList[i][j] = VialCondition.Used; } else { conditionList[i][j] = VialCondition.Available; } } } preservedSTD1 = new ListItem(); Gen(); for (int i = 0; i < FullList1.Count; i++) { if (!SysCheck(FullList1[i])) { sampleStartIndex = i; break; } } finalList.ItemsSource = FullList1; }