private void editButton1_Click(object sender, RoutedEventArgs e)
        {
            int index = adviceComboBox.SelectedIndex;
            if (index == -1) return;
            addAdvice aa = new addAdvice();
            aa.Owner = this;
            aa.index = index;

            Advice ad = new Advice();
            ad = Advices.getAdvices(index);
            int i;
            for (i = 0; i < Pointcuts.pointcuts.Count; i++)
            {
                if (Pointcuts.pointcuts[i].pointcutName == ad.advicePointcutName)
                {
                    break;
                }
            }
            if (i < Pointcuts.pointcuts.Count) aa.pointCutComboBox.SelectedIndex = i;
            if (ad.advicePointcutKind == "before") 
                aa.kindComboBox.SelectedIndex = 0;
            else
                aa.kindComboBox.SelectedIndex = 1;

            aa.textBox.Text = ad.adviceCode;

            aa.ShowDialog();
            updataAdvice();

        }
 private void addButton1_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     addAdvice aa = new addAdvice();
     aa.Owner = this;
     aa.ShowDialog();// 在此处添加事件处理程序实现。
     updataAdvice();
 }