/// <summary> /// 载入仿真训练图标 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simulatioWrapPanel_Loaded(object sender, RoutedEventArgs e) { ArrayList tList = tdb.GetSimulatioTrainIsOpen(); for (int i = 0; i < tList.Count; i++) { Hashtable tmp = (Hashtable)tList[i]; TrainList tl = new TrainList(mainWindow, tmp, this); tl.Margin = new Thickness(30, 30, 0, 0); this.simulatioTrainButtonGrid.Children.Add(tl); } }
/// <summary> /// 显示或是隐藏是发生 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TrainButtonGrid_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (e.NewValue != e.OldValue) { if (this.TrainButtonGrid.Children.Count != 0) { for (int i = 0; i < this.TrainButtonGrid.Children.Count; i++) { TrainList tl = this.TrainButtonGrid.Children[i] as TrainList; } } } }
/// <summary> /// 载入认知训练图标 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void WrapPanel_Loaded(object sender, RoutedEventArgs e) { ArrayList tList = tdb.GetTrainIsOpen(); ArrayList tNumList = tdb.GetTrainHistoryNum(); if (tNumList.Count > 0) { int tNumIndex = 0; Hashtable tNumTmp = (Hashtable)tNumList[tNumIndex]; for (int i = 0; i < tList.Count; i++) { Hashtable tmp = (Hashtable)tList[i]; TrainList tl = new TrainList(mainWindow, tmp, this); tl.Margin = new Thickness(30, 30, 0, 0); if (tmp["tid"].ToString() == tNumTmp["tid"].ToString()) { tNumIndex += 1; tmp["historyNum"] = tNumTmp["num"]; if (tNumIndex < tNumList.Count) { tNumTmp = (Hashtable)tNumList[tNumIndex]; } } this.TrainButtonGrid.Children.Add(tl); } } else { for (int i = 0; i < tList.Count; i++) { Hashtable tmp = (Hashtable)tList[i]; TrainList tl = new TrainList(mainWindow, tmp, this); tl.Margin = new Thickness(30, 30, 0, 0); this.TrainButtonGrid.Children.Add(tl); } } }