Esempio n. 1
0
 public string GetWord(RegexTextBox textbox)
 {
     try
     {
         return(textbox.Text.Substring(WordPosition, WordLength));
     }
     catch
     {
         return(string.Empty);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 正则表达式
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void RegexCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     if (RegexCheckBox.Checked)
     {
         RegexTextBox.Show();
     }
     else
     {
         RegexTextBox.Hide();
         RegexTextBox.Text = "";
     }
 }
Esempio n. 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;    //最大化窗体
            SplitBox.Hide();
            var selectDic = new Dictionary <int, string>();

            selectDic.Add(0, "换行符");
            selectDic.Add(1, "空格");
            selectDic.Add(2, "输入字符");
            BindingSource bindingSource = new BindingSource();

            bindingSource.DataSource    = selectDic;
            SplitComboBox.DataSource    = bindingSource;
            SplitComboBox.ValueMember   = "Key";
            SplitComboBox.DisplayMember = "Value";
            BeforeTextBox.Hide();
            BackTextBox.Hide();
            DeleteTextBox.Hide();
            RegexTextBox.Hide();
        }
 private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     RegexTextBox.Paste();
 }
 private void copyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     RegexTextBox.Copy();
 }