diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs deleted file mode 100644 index 3c608a518..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using Tango.PPC.Browser.Attributes; -using Tango.PPC.Browser.Views; -using Tango.PPC.Common.Helpers; -using Tango.Touch.Keyboard; - -namespace Tango.PPC.Browser.BoundsObjects -{ - [BoundObject("keyboard", "keyboard.js")] - public class KeyboardHandler - { - private DateTime _lastTime; - - public KeyboardHandler() - { - _lastTime = DateTime.Now; - } - - public void openKeyboard(String inputType) - { - if (DateTime.Now > _lastTime.AddMilliseconds(1000)) - { - _lastTime = DateTime.Now; - - Application.Current.Dispatcher.BeginInvoke(new Action(async () => - { - switch (inputType) - { - case "search": - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Go); - break; - default: - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Next); - break; - } - - - await Task.Delay(50); - BrowserView.Instance.btnGo.Focus(); - await Task.Delay(50); - BrowserView.Instance.Browser.Focus(); - Debug.WriteLine("Focus"); - })); - } - } - - public void closeKeyboard() - { - if (DateTime.Now > _lastTime.AddMilliseconds(1000)) - { - _lastTime = DateTime.Now; - - Application.Current.Dispatcher.BeginInvoke(new Action(() => - { - KeyboardHelper.CloseKeyboard(); - })); - } - } - } -} |
