public static void Start(InputProvider inputProvider) { // Disable the WinForms unhandled exception dialog. // SurfaceShell will notify the user. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); // Apply Surface globalization settings GlobalizationSettings.ApplyToCurrentThread(); using (app = new App1(inputProvider)) { app.Run(); } }
public static void Start(InputProvider inputProvider) { // Disable the WinForms unhandled exception dialog. // SurfaceShell will notify the user. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); // Apply Surface globalization settings GlobalizationSettings.ApplyToCurrentThread(); using (app = new App1(inputProvider)) { app.Run(); } }
public InputContext(InputProvider provider) { inputProvider = provider; window = EventDispatchingNativeWindow.Instance; oldContacts = new List <Contact>(); SynchronizationContext.SetSynchronizationContext(new SynchronizationContext()); contactTarget = new ContactTarget(IntPtr.Zero, true); contactTarget.EnableInput(); timer = new System.Windows.Forms.Timer(); timer.Interval = 1000 / 60; timer.Tick += timer_Tick; timer.Start(); }
/// <summary> /// Default constructor. /// </summary> ///<param name="inputProvider"></param> public App1(InputProvider inputProvider) { this.inputProvider = inputProvider; graphics = new GraphicsDeviceManager(this); oldContacts = new List <Contact>(); }