Ejemplo n.º 1
0
        private void buttonHist_Click(object sender, EventArgs e)
        {
            if (m_histForm.IsDisposed)
            {
                m_histForm = new HistoryForm();
            }

            if (!m_histForm.Visible)
            {
                m_histForm.Show(this);
            }

            textBox.SelectionStart = textBox.Text.Length;
            textBox.ScrollToCaret();
            textBox.Focus();
        }
Ejemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            m_lastClickedButton     = Button.BUTTON_NONE;
            m_lastClickedOperator   = Button.BUTTON_NONE;
            m_lastClickedNumber     = Button.BUTTON_NONE;
            m_lastClickedButtonType = ButtonType.BUTTON_TYPE_NONE;
            m_numberOne             = 0;
            m_numberTwo             = 0;
            m_result               = "0";
            m_histForm             = new HistoryForm();
            textBox.SelectionStart = textBox.Text.Length;
            textBox.ScrollToCaret();

            //uncomment to enable unit tests
            //if (System.Diagnostics.Debugger.IsAttached)
            //{
            //    ExecUnitTests();
            //}
        }