예제 #1
0
 private void _listener_OnKeyPressed(object sender, KeyPressedArgs e)
 {
     if (_listener.flagedit == 1)
     {
         this.textBox_DisplayKeyboardInput.Text = this.textBox_DisplayKeyboardInput.Text.Substring(0, this.textBox_DisplayKeyboardInput.Text.Length - 2);
         this.textBox_DisplayKeyboardInput.Text += e.KeyPressed;
         _listener.flagedit = 0;
         Console.WriteLine("dasdasdsa");
     }
     else
         this.textBox_DisplayKeyboardInput.Text += e.KeyPressed;
     Console.WriteLine("done");
 }
예제 #2
0
 private void _listener_OnKeyPressed(object sender, KeyPressedArgs e)
 {
     if (_listener.flagedit == 1)
     {
         this.textBox_DisplayKeyboardInput.Text = this.textBox_DisplayKeyboardInput.Text.Substring(0, this.textBox_DisplayKeyboardInput.Text.Length - _listener.delete_char);
         this.textBox_DisplayKeyboardInput.Text += e.KeyPressed;
         _listener.flagedit = 0;
     }
     else if (_listener.flagedit_word == 1)
     {
         //int tmp = _listener.sizeOfWaitingWord();
         //tmp = this.textBox_DisplayKeyboardInput.Text.Length - tmp;
         this.textBox_DisplayKeyboardInput.Text = this.textBox_DisplayKeyboardInput.Text.Substring(0, this.textBox_DisplayKeyboardInput.Text.Length - _listener.delete_char + 1);
         while (_listener.sizeOfWaitingWord() != 0) this.textBox_DisplayKeyboardInput.Text += _listener.get_word();
         _listener.flagedit_word = 0;
     }
     else this.textBox_DisplayKeyboardInput.Text += e.KeyPressed.ToString();
 }