예제 #1
0
 public void Toggle()
 {
     Enabled = !Enabled;
     if (Enabled)
     {
         _input.Visible = true;
         _input.OnFocus();
         _input.Clear();
     }
     else
     {
         _input.Visible = false;
         _input.OnLostFocus();
         _input.Clear();
     }
 }
예제 #2
0
        public HelloPage SubmitForm(string name)
        {
            InputField.Clear();
            InputField.SendKeys(name);
            SubmitButton.Click();

            return(new HelloPage(driver));
        }
 private void InputField_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (InputField.Text == "Написать сообщение")
     {
         InputField.Opacity = 1;
         InputField.Clear();
     }
 }
 private void SubmitButton_Click(object sender, RoutedEventArgs e)
 {
     if (InputField.Text.Length > 0 && !string.IsNullOrWhiteSpace(InputField.Text))//check if text box has anything in it or just whitespace
     {
         _client.TCPSendMessage(InputField.Text);
         InputField.Clear();
     }
 }
        //
        //Button control
        //
        private void SubmitButton_Click(object sender, EventArgs e)
        {
            ChatMessagePacket chatPacket = new ChatMessagePacket(m_client.Name + ": " + InputField.Text + "\n", m_client.ID);

            m_client.SendMessage(chatPacket);
            //MessageWindow.AppendText(chatPacket.m_message+"\n");
            InputField.Clear();
            Console.WriteLine("Message " + chatPacket.m_message + " Submitted");
        }
예제 #6
0
 private void InputField_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter && InputField.Text != "")
     {
         string pattern = actual_pattern();
         send_pattern(pattern);
         InputField.Clear();
     }
 }
예제 #7
0
        private void SubmitButton_Click(object sender, RoutedEventArgs e)
        {
            if (_client.SendSecure(InputField.Text))
            {
                InputField.Clear();
                InputField.Focus();
            }

            GetUserList();
        }
예제 #8
0
        private void PlayAnimation(string name)
        {
            if (Player.IsPlaying())
            {
                return;
            }

            InputField.Clear();
            Player.Play(name);
        }
예제 #9
0
        private void SubmitButton_Click(object sender, EventArgs e)
        {
            //if (_client.TcpSendPacket(new ChatMessagePacket(InputField.Text))) {
            //if (_client.UdpSendPacket(new ChatMessagePacket(InputField.Text))) {
            if (_client.SendSecure(InputField.Text))
            {
                InputField.Clear();
                InputField.Focus();
            }

            GetUserList();
        }
예제 #10
0
        /*   SEND MESSAGES   */
        private void SendMessage()
        {
            string message = InputField.Text;

            if (message != "")
            {
                if (!privateMessage)
                {
                    if (!mutedClientsGlobal.Contains(ClientNameField.Text))
                    {
                        string gameString = "/game ";
                        if (message.StartsWith(gameString))
                        {
                            int    index      = message.IndexOf(gameString);
                            string userAnswer = (index < 0) ? message : message.Remove(index, gameString.Length);
                            client.TcpSendMessage(new EncryptedGamePacket(client.EncryptString(userAnswer)));
                        }
                        else
                        {
                            if (tcpMessages)
                            {
                                client.TcpSendMessage(new EncryptedMessagePacket(client.EncryptString(message)));
                            }
                            else
                            {
                                client.UdpSendMessage(new ChatMessagePacket("[" + ClientNameField.Text + "]: " + message));
                            }
                        }
                    }
                    UpdateChatWindow("To [Local]: " + InputField.Text, "right", Color.Black, Color.LightSteelBlue);
                }
                else
                {
                    if (!mutedClientsGlobal.Contains(ClientNameField.Text))
                    {
                        if (tcpMessages)
                        {
                            client.TcpSendMessage(new EncryptedPrivateMessagePacket(client.EncryptString("[" + ClientNameField.Text + "]: " + message),
                                                                                    client.EncryptString(FriendsListBox.SelectedItem.ToString())));
                        }
                        else
                        {
                            client.UdpSendMessage(new PrivateMessagePacket("[" + ClientNameField.Text + "]: " + message,
                                                                           FriendsListBox.SelectedItem.ToString()));
                        }
                    }
                    UpdateChatWindow("To [" + FriendsListBox.SelectedItem.ToString() + "]: " + InputField.Text, "right", Color.Black, Color.LightPink);
                }
                InputField.Clear();
            }
        }
예제 #11
0
 public Console(SpriteFont font, int height = 120)
 {
     _height = height;
     _input  = new InputField("", font, "console", 99,
                              new Vector2(0, _height),
                              new Vector2((int)Util.Resolution.VirtualViewport.Length(), font.MeasureString("A").Y));
     _input.Visible = false;
     _input.AddKeyHandler(delegate(object o, KeyEventArgs args) {
         if (args.KeyCode == Keys.Enter)
         {
             string val = _input.Clear();
         }
     });
     InputSystem.KeyDown += HandleKeys;
 }
예제 #12
0
        protected void OnTextInput([NotNull] string line)
        {
            if (string.IsNullOrWhiteSpace(line))
            {
                return;
            }

            this.Highlight(line).NewLine().NewLine();

            InputField.Clear();

            var segments = line.Split().Select(w => w.Trim()).Where(w => !w.Empty()).ToList();

            Execute(segments.First(), segments.Skip(1).ToArray());
        }
예제 #13
0
        public void FillData(List <string> names)
        {
            foreach (var item in names)
            {
                InputField.Clear();
                InputField.SendKeys(item);
                GenerateButton.Click();

                Thread.Sleep(5000);

                string text = Driver.FindElement(By.XPath("/html/body")).Text;


                File.WriteAllText($"..\\..\\..\\IPs\\{item}.txt", text);

                // Console.WriteLine(text);
                Driver.Navigate().Back();
            }
        }
예제 #14
0
        //submit button clicked
        private void SubmitButtonClick(object sender, EventArgs e)
        {
            //if message is set to send to all then send username and message to all clients
            if (privateMessageBox.SelectedIndex == 0)
            {
                mClient.SendChatMessage(InputField.Text, UsernameInput.Text);
            }
            //send message and username to the user ID selected
            else
            {
                mClient.SendPrivateMessage(InputField.Text, UsernameInput.Text, privateMessageBox.SelectedIndex - 1);
            }

            //clear input text
            InputField.Clear();

            //reset activity timer
            ActivityTimer.Stop();
            ActivityTimer.Start();
        }
예제 #15
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "Task")
            {
                InboxClass inboxClass = new InboxClass(InputField.Text);
                AddInfoInboxGrid(InputField.Text);
                ReadyInbox.Add(item: inboxClass);
            }

            if (comboBox1.Text == "Today")
            {
                EventClass eventClass = new EventClass(InputField.Text, DateTime.Now.ToShortDateString(), "--");
                AddInfoTodayGrid(InputField.Text, DateTime.Now.ToShortDateString(), "--");
                ReadyEvent.Add(item: eventClass);
            }

            if (comboBox1.Text == "Event")
            {
                dateBx.Mask = "99-99-9999";
                EventClass eventClass = new EventClass(InputField.Text, "--", "--");
                AddInfoTodayGrid(InputField.Text, dateBx.Text.ToString(), timeBx.Text.ToString());
                ReadyEvent.Add(item: eventClass);
            }

            if (comboBox1.Text == "Project")
            {
                TaskCL taskCL = new TaskCL("none", "--", "--", "--");
                ProjCl projCl = new ProjCl(InputField.Text, 0, taskCL);
                AddInfoProject(InputField.Text);
                ReadyProject.Add(item: projCl);
            }
            if (comboBox1.Text == "Sub Task")
            {
                InboxClass inboxClass = new InboxClass(InputField.Text);
                SubProj    subProj    = new SubProj(projBox.Text, inboxClass);
                ReadySub.Add(item: subProj);
                AddSubTask(InputField.Text);
            }
            InputField.Clear();
            projBox.Items.Clear();
        }
예제 #16
0
 public void Clear()
 {
     InputField.Clear();
     Content.Clear();
 }
예제 #17
0
 // Send a message to the current room
 public void SendMsg()
 {
     Debug.Log(msgInput.text);
     Client.PublishMessage(PhotonNetwork.CurrentRoom.Name, msgInput.text);
     msgInput.Clear();
 }