private void addButton_Click(object sender, System.Windows.RoutedEventArgs e) { addPoint ap = new addPoint(); ap.Owner = this; ap.ShowDialog();// 在此处添加事件处理程序实现。 updata(); }
private void editButton_Click(object sender, RoutedEventArgs e) { int index = pointCutComboBox.SelectedIndex; if (index == -1) return; addPoint ap = new addPoint(); ap.Owner = this; Pointcut pointcut = new Pointcut(); pointcut = Pointcuts.pointcuts[index]; ap.pointCutTextBox.Text = pointcut.pointcutName; switch (pointcut.returnValue) { case "public": ap.returnValueCombox.SelectedIndex = 0; break; case "private": ap.returnValueCombox.SelectedIndex = 1; break; } switch (pointcut.pointcutKind) { case "Call": ap.pointCutKindCombox.SelectedIndex = 0; break; case "Execution": ap.pointCutKindCombox.SelectedIndex = 1; break; case "Target": ap.pointCutKindCombox.SelectedIndex = 2; break; case "Args": ap.pointCutKindCombox.SelectedIndex = 3; break; case "Within": ap.pointCutKindCombox.SelectedIndex = 4; break; case "Cflow": ap.pointCutKindCombox.SelectedIndex = 5; break; } ap.regexBox.Text = pointcut.regex; ap.Label.Content = "编辑 pointCut"; ap.index = index; ap.ShowDialog(); updata(); }