Beispiel #1
0
        // Бекспейс
        private void buttonBack_Click(object sender, EventArgs e)
        {
            int csel = ScreenBox.SelectionStart;

            if (ScreenBox.Text.Length != 0 && csel != 0)
            {
                ScreenBox.Text = ScreenBox.Text.Substring(0, csel - 1) + ScreenBox.Text.Substring(csel, ScreenBox.Text.Length - csel);
                csel          -= 1;
            }
            ScreenBox.Focus();
            ScreenBox.Select(csel, 0);
            if (Properties.Settings.Default.AutoALT && checkBoxMode.Checked)
            {
                checkBoxMode.Checked = false;
            }
        }
Beispiel #2
0
        private void buttonFunct_Click(object sender, EventArgs e)
        {
            int csel = ScreenBox.SelectionStart;

            if (ScreenBox.Text.Length != 0 && csel != 0)
            {
                ScreenBox.Text = ScreenBox.Text.Substring(0, csel) + ((Button)sender).Text + "(" + ScreenBox.Text.Substring(csel, ScreenBox.Text.Length - csel);
            }
            else
            {
                ScreenBox.Text = ((Button)sender).Text + "(" + ScreenBox.Text.Substring(csel, ScreenBox.Text.Length - csel);
            }
            csel += ((Button)sender).Text.Length + 1;
            ScreenBox.Focus();
            ScreenBox.Select(csel, 0);
            if (Properties.Settings.Default.AutoALT && checkBoxMode.Checked)
            {
                checkBoxMode.Checked = false;
            }
        }