Esempio n. 1
0
 /// <summary>
 /// 操作显示或是隐藏是发生
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void handleTrainButtonGrid_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (e.NewValue != e.OldValue)
     {
         if (this.handleTrainButtonGrid.Children.Count != 0)
         {
             for (int i = 0; i < this.handleTrainButtonGrid.Children.Count; i++)
             {
                 TrainHandleList tl = this.handleTrainButtonGrid.Children[i] as TrainHandleList;
             }
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 载入操作训练图标
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void handleWrapPanel_Loaded(object sender, RoutedEventArgs e)
        {
            ArrayList tList    = tdb.GetHandleTrainIsOpen();
            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];
                    TrainHandleList tl  = new TrainHandleList(mainWindow, tmp, this);
                    //                   tl = new TrainHandleList(mainWindow, tmp, this);
                    tl.Margin = new Thickness(30, 50, 0, 0);
                    if (tmp["tid"].ToString() == tNumTmp["tid"].ToString())
                    {
                        tNumIndex        += 1;
                        tmp["historyNum"] = tNumTmp["num"];
                        if (tNumIndex < tNumList.Count)
                        {
                            tNumTmp = (Hashtable)tNumList[tNumIndex];
                        }
                    }
                    this.handleTrainButtonGrid.Children.Add(tl);
                }
            }
            else
            {
                for (int i = 0; i < tList.Count; i++)
                {
                    Hashtable       tmp = (Hashtable)tList[i];
                    TrainHandleList tl  = new TrainHandleList(mainWindow, tmp, this);
                    //                   tl = new TrainHandleList(mainWindow, tmp, this);
                    tl.Margin = new Thickness(30, 50, 0, 0);
                    this.handleTrainButtonGrid.Children.Add(tl);
                }
            }
        }