Exemple #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;
            }
        }
Exemple #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;
            }
        }
Exemple #3
0
        private void buttonNewMatr_M_Click(object sender, EventArgs e)
        {
            if (savedVariables == null)
            {
                savedVariables = new Dictionary <string, string>();
            }
            char i;

            for (i = 'A'; i <= 'N'; i++)
            {
                if (!savedVariables.ContainsKey(i.ToString()))
                {
                    break;
                }
            }
            EditMatrix em = new EditMatrix(i);

            string[] tmp;
            if (DialogResult.OK == em.ShowDialog(this))
            {
                tmp = em.result.Split('#');
                savedVariables.Add(tmp[0], tmp[1]);

                if (HistoryBox1.Text == "")
                {
                    HistoryBox1.Text += tmp[0] + "=" + tmp[1];
                }
                else
                {
                    HistoryBox1.Text += "\r\n" + tmp[0] + "=" + tmp[1];
                }

                Button tbtn = new Button();
                tbtn.Text = tmp[0];
                buttonDigit_Click(tbtn, e);
            }
            ScreenBox.Focus();
        }