コード例 #1
0
 private void AcceptButton_Click(object sender, RoutedEventArgs e)
 {
     //合法性校验
     if (InputVarification() == false)
     {
         return;
     }
     //数据插入数据表
     newStep           = new StepStore(strName, strGroup, bIsFeedback, strDescription);
     this.DialogResult = true;
     this.Close();
 }
コード例 #2
0
 private void MoveDownButton_Click(object sender, RoutedEventArgs e)
 {
     if (StepsGird.SelectedIndex == -1 || StepsGird.SelectedIndex == newSteps.Count -1)
     {
         return;
     }
     int index = StepsGird.SelectedIndex;
     StepStore curStep = newSteps[index];
     newSteps.Remove(curStep);
     newSteps.Insert(index + 1, curStep);
     StepsGird.ItemsSource = null;
     StepsGird.ItemsSource = newSteps;
     StepsGird.SelectedIndex = index + 1;
 }