Exemple #1
0
        private void CreateButton_Click(object sender, EventArgs e)
        {
            Button   buttonPressed = sender as Button;
            SendMenu sendMenu      = new SendMenu();

            sendMenu.Action = buttonPressed.Text;
            sendMenu.socket = socket;
            sendMenu.Show();
        }
Exemple #2
0
        private void CreateButton_Click(object sender, EventArgs e)
        {
            Button buttonPressed = sender as Button;// создаем обьект типа кнопки и преобразуем его обьектос события

            SendMenu sendMenu = new SendMenu();

            sendMenu.Action = buttonPressed.Text; // присвоиваем в переменную сстроки из формы SendMenu
            sendMenu.socket = socket;
            sendMenu.Show();
        }