Exemple #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (textBox5.Text == "")
            {
                MessageBox.Show("请打开或输入文档", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                TXTReturnMode mode;
                switch ((XMLReturnMode)Properties.Settings.Default.XMLReturn)
                {
                case XMLReturnMode.Auto:
                    if (textBox6.Text.Contains("jump"))
                    {
                        mode = TXTReturnMode.LinkWithSpace;
                    }
                    if (textBox6.Text.Contains("article"))
                    {
                        mode = TXTReturnMode.DoNotLink;
                        break;
                    }
                    if (textBox6.Text.Contains("phrase"))
                    {
                        mode = TXTReturnMode.DoNotLink;
                        break;
                    }
                    if (textBox6.Text.Contains("word"))
                    {
                        mode = TXTReturnMode.LinkWithSpace;
                        break;
                    }
                    if (textBox6.Text.Contains("nov"))
                    {
                        mode = TXTReturnMode.DoNotLink;
                        break;
                    }
                    mode = TXTReturnMode.DoNotLink;
                    break;

                case XMLReturnMode.DoNotLink:
                    mode = TXTReturnMode.DoNotLink;
                    break;

                case XMLReturnMode.LinkWithoutSpace:
                    mode = TXTReturnMode.LinkWithoutSpace;
                    break;

                case XMLReturnMode.LinkWithSpace:
                    mode = TXTReturnMode.LinkWithSpace;
                    break;

                default:
                    mode = TXTReturnMode.LinkWithSpace;
                    break;
                }
                TextExerciseForm ExerciseForm = new TextExerciseForm(textBox5.Lines, mode);
                ExerciseForm.ShowDialog();
            }
        }
Exemple #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (textBox3.Text == "")
     {
         MessageBox.Show("请打开或输入文档", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         TextExerciseForm ExerciseForm = new TextExerciseForm(textBox3.Lines, (TXTReturnMode)Properties.Settings.Default.TxtReturn);
         ExerciseForm.ShowDialog();
     }
 }