Exemplo n.º 1
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     AddTestItemWindow addWindow = new AddTestItemWindow();
     addWindow.Owner = this;
     if (addWindow.ShowDialog() == true) {
         testList = testManagerBLL.GetModelList("");
         Binding b = new Binding() { Source = testList };
         cbTestItems.SetBinding(ComboBox.ItemsSourceProperty, b);
         cbTestItems.SelectedIndex = 0;
     }
 }
Exemplo n.º 2
0
        //添加
        private void imgAdd_MouseDown(object sender, MouseButtonEventArgs e)
        {
            AddTestItemWindow addWindow = new AddTestItemWindow();

            addWindow.Owner = Application.Current.MainWindow;
            if (addWindow.ShowDialog() == true)
            {
                selectedTestItemIndex = 0;
                RefrenshList();
            }
        }
Exemplo n.º 3
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            AddTestItemWindow addWindow = new AddTestItemWindow();

            addWindow.Owner = this;
            if (addWindow.ShowDialog() == true)
            {
                testList = testManagerBLL.GetModelList("");
                Binding b = new Binding()
                {
                    Source = testList
                };
                cbTestItems.SetBinding(ComboBox.ItemsSourceProperty, b);
                cbTestItems.SelectedIndex = 0;
            }
        }
Exemplo n.º 4
0
 //修改
 private void imgEdit_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (testItmesListBox.SelectedIndex >= 0)
     {
         AddTestItemWindow addWindow = new AddTestItemWindow();
         addWindow.Owner    = Application.Current.MainWindow;
         addWindow.TestItem = testList[testItmesListBox.SelectedIndex];
         if (addWindow.ShowDialog() == true)
         {
             RefrenshList();
         }
     }
     else
     {
         MessageBox.Show("请选择一项编辑!");
     }
 }
Exemplo n.º 5
0
 //修改
 private void imgEdit_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (testItmesListBox.SelectedIndex >= 0)
     {
         AddTestItemWindow addWindow = new AddTestItemWindow();
         addWindow.Owner = Application.Current.MainWindow;
         addWindow.TestItem = testList[testItmesListBox.SelectedIndex];
         if (addWindow.ShowDialog() == true)
         {
             RefrenshList();
         }
     }
     else
     {
         MessageBox.Show("请选择一项编辑!");
     }
 }
Exemplo n.º 6
0
 //添加
 private void imgAdd_MouseDown(object sender, MouseButtonEventArgs e)
 {
     AddTestItemWindow addWindow = new AddTestItemWindow();
     addWindow.Owner = Application.Current.MainWindow;
     if (addWindow.ShowDialog() == true) {
         selectedTestItemIndex = 0;
         RefrenshList();
     }
 }