Exemplo n.º 1
0
        public My_Application(TouchInputProvider provider)
        {
            InitializeComponent();

            GestureFramework.Initialize(provider, LayoutRoot, Assembly.GetExecutingAssembly());
            this.Loaded += new RoutedEventHandler(My_Application_Loaded);
        }
Exemplo n.º 2
0
        public TestControl(TouchInputProvider provider)
        {
            InitializeComponent();

            this.provider = provider;

            this.Loaded += new RoutedEventHandler(TestControl_Loaded);
            //AntiUnificator.board = board;
        }
Exemplo n.º 3
0
        // Private Constructor
        GisInterfaceMgr()
        {
            InitializeComponent();

            LayoutRoot.Height = System.Windows.SystemParameters.VirtualScreenHeight;
            LayoutRoot.Width = System.Windows.SystemParameters.VirtualScreenWidth;

            touchProvider = new Windows7TouchInputProvider();

            this.Loaded += new RoutedEventHandler(GisInterfaceMgr_Loaded);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Provide the user name & project name to identify the gesture storage unit.
        /// </summary>
        /// <param name="accountName"></param>
        /// <param name="projectName"></param>
        public static void Init(string accountName, string projectName)
        {
            _userName = accountName;
            _projectname = projectName;
            _layoutRoot = new Canvas();
            _touchProvider = new VirtualTouchInputProvider();
            _storage = new StorageManager();
            _storage.Login(accountName);

            _recorder = new TouchInputRecorder();

            GestureFramework.Initialize(_touchProvider, _layoutRoot, Assembly.GetExecutingAssembly());

            _isInitialized = true;
        }
Exemplo n.º 5
0
 public TestControl2(TouchInputProvider provider)
 {
     InitializeComponent();
     this.provider = provider;
     this.Loaded += new RoutedEventHandler(TestControl_Loaded);
 }
Exemplo n.º 6
0
 internal static void UpdateInputProvider(TouchInputProvider hl)
 {
     TouchInputManager.SetTouchInputHardware(hl);
 }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes necessary components in the framework (i.e. Rule validators, Touch input listeners, Gesture language processors, etc.)
        /// </summary>
        /// <param name="listenerType"></param>
        /// <param name="layoutRoot"></param>
        public static void Initialize(TouchInputProvider inputProvider, Panel layoutRoot, Assembly host)
        {
            _host = host;
            Contract.Requires(inputProvider != null, "You must specify the touch input provider that framework will use to get the raw touch data.");
            Contract.Requires(layoutRoot != null, "You must provide the panel where you want the framework to render UI (i.e. Touch/Gesture effects)");
            Contract.Requires(layoutRoot is Canvas, "Currently, the framework only supports \"Canvas\" as layout root");

            LayoutRoot = layoutRoot as Canvas;

            // Initialize input provider
            inputProvider.Init();
            UpdateInputProvider(inputProvider);

            // Load gesture definitions
            GestureLanguageProcessor.LoadGestureDefinitions();

            IsInitialized = true;
        }
Exemplo n.º 8
0
 internal static void SetTouchInputHardware(TouchInputProvider listener)
 {
     _listener = listener;
     GestureFramework.EventManager.SubscribeTouchEvents();
 }