예제 #1
0
        /// <summary>
        /// 分割字符
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SplitComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            var select = SplitComboBox.SelectedValue;

            if (select.GetType().Name == "Int32" && (int)select == 2)
            {
                SplitBox.Show();
            }
            else
            {
                SplitBox.Hide();
                SplitBox.Text = "";
            }
        }
예제 #2
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();
        }