Beispiel #1
0
        private void btnAddTextBox_Click(object sender, EventArgs e)
        {
            int currentPage = GetCurrentPageNumber();

            if (currentPage >= 0)
            {
                Program.UndoManager.Update();
                var text = new TextBox(Program.Test.GetFreeName("Textbox"), Program.Test.Pages[currentPage]);
                text.HasFocus = true;
            }
            else
            {
                MessageBox.Show("You need at least one page.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void menuAddTextBox(object sender, EventArgs e)
        {
            var text = new TextBox(ParentTest.GetFreeName("Textbox"), this, mousePositionOnRightClick);

            text.HasFocus = true;
        }