Esempio n. 1
0
        public void Start()
        {
            string providerId = Settings.Default.CurrentProvider;

            Console.WriteLine("Input provider in settings - " + providerId);

            if (!string.IsNullOrEmpty(providerId) && InputProviders != null)
            {
                Export <IProvider, IAddInView> currentProvider = (from provider in InputProviders
                                                                  where provider.MetadataView.Id == providerId
                                                                  select provider).FirstOrDefault();
                if (currentProvider == null)
                {
                    throw new MultitouchException(string.Format("Input provider '{0}' could not be found", providerId));
                }

                string text = "Found:" + Environment.NewLine +
                              "Name: " + currentProvider.MetadataView.Id + Environment.NewLine +
                              "Description: " + currentProvider.MetadataView.Description + Environment.NewLine +
                              "Publisher: " + currentProvider.MetadataView.Publisher + Environment.NewLine +
                              "Version: " + currentProvider.MetadataView.Version;
                Console.WriteLine(text);

                ProviderManager = new InputProviderManager(currentProvider.GetExportedObject());
            }
        }
Esempio n. 2
0
		public InputProviderManager(IProvider inputProvider)
		{
			instance = this;

			StartService();

			this.inputProvider = inputProvider;
			this.inputProvider.NewFrame += inputProvider_NewFrame;
			this.inputProvider.Start();
			Console.WriteLine("Started input provider");
		}
Esempio n. 3
0
        public InputProviderManager(IProvider inputProvider)
        {
            instance = this;

            StartService();

            this.inputProvider           = inputProvider;
            this.inputProvider.NewFrame += inputProvider_NewFrame;
            this.inputProvider.Start();
            Console.WriteLine("Started input provider");
        }
Esempio n. 4
0
		public void Start()
		{
			string providerId = Settings.Default.CurrentProvider;

			Console.WriteLine("Input provider in settings - " + providerId);

			if (!string.IsNullOrEmpty(providerId) && InputProviders != null)
			{
				Export<IProvider, IAddInView> currentProvider = (from provider in InputProviders
																 where provider.MetadataView.Id == providerId
																 select provider).FirstOrDefault();
				if (currentProvider == null)
					throw new MultitouchException(string.Format("Input provider '{0}' could not be found", providerId));

				string text = "Found:" + Environment.NewLine +
							  "Name: " + currentProvider.MetadataView.Id + Environment.NewLine +
							  "Description: " + currentProvider.MetadataView.Description + Environment.NewLine +
							  "Publisher: " + currentProvider.MetadataView.Publisher + Environment.NewLine +
							  "Version: " + currentProvider.MetadataView.Version;
				Console.WriteLine(text);

				ProviderManager = new InputProviderManager(currentProvider.GetExportedObject());
			}
		}