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();
            }
        }
Exemple #2
0
		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();
        }
Exemple #4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 ///<param name="inputProvider"></param>
 public App1(InputProvider inputProvider)
 {
     this.inputProvider = inputProvider;
     graphics           = new GraphicsDeviceManager(this);
     oldContacts        = new List <Contact>();
 }