Пример #1
0
        private void Start()
        {
            this.Cursor = Cursors.Wait;
            this.checkClusterLayer.IsEnabled = true;
            this.checkHandLayer.IsEnabled = true;
            

            this.factory = new SDKDataSourceFactory();

            this.clusterDataSource = this.factory.CreateClusterDataSource(new ClusterDataSourceSettings { MaximumDepthThreshold = 1000 });
            this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));
            //this.rgbImageDataSource = this.factory.CreateRGBImageDataSource();
            //this.rgbImageDataSource.Start();

            var depthImageSource = this.factory.CreateDepthImageDataSource();
            depthImageSource.NewDataAvailable += new NewDataHandler<ImageSource>(MainWindow_NewDataAvailable);
            depthImageSource.Start();
            handDataSource.Start();

            //this.mouseController = new MouseController(handDataSource,true);

            this.Cursor = Cursors.Arrow;

            handDataSource.NewDataAvailable += new NewDataHandler<HandCollection>(handDataSource_NewDataAvailable);
        }
Пример #2
0
        private void Start()
        {
            this.Cursor = Cursors.Wait;
            this.checkClusterLayer.IsEnabled = true;
            this.checkHandLayer.IsEnabled    = true;


            this.factory = new SDKDataSourceFactory();

            this.clusterDataSource = this.factory.CreateClusterDataSource(new ClusterDataSourceSettings {
                MaximumDepthThreshold = 1000
            });
            this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));
            //this.rgbImageDataSource = this.factory.CreateRGBImageDataSource();
            //this.rgbImageDataSource.Start();

            var depthImageSource = this.factory.CreateDepthImageDataSource();

            depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable);
            depthImageSource.Start();
            handDataSource.Start();

            //this.mouseController = new MouseController(handDataSource,true);

            this.Cursor = Cursors.Arrow;

            handDataSource.NewDataAvailable += new NewDataHandler <HandCollection>(handDataSource_NewDataAvailable);
        }
Пример #3
0
        private void Start()
        {
            this.Cursor = Cursors.Wait;
            this.buttonHandInterface.IsEnabled = true;
            this.buttonManipulation.IsEnabled = true;
            this.buttonRectangleVideo.IsEnabled = true;
            this.buttonTouch.IsEnabled = true;
            this.checkClusterLayer.IsEnabled = true;
            this.checkHandLayer.IsEnabled = true;
            this.radioKinectSDK.IsEnabled = false;
            this.radioOpenNI.IsEnabled = false;

            if (this.radioKinectSDK.IsChecked.GetValueOrDefault())
            {
                this.factory = new SDKDataSourceFactory();
            }
            else
            {
                this.factory = new OpenNIDataSourceFactory("config.xml");
            }
            this.clusterDataSource = this.factory.CreateClusterDataSource(new Core.Clustering.ClusterDataSourceSettings { MaximumDepthThreshold = 900 });
            this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));
            this.rgbImageDataSource = this.factory.CreateRGBImageDataSource();
            this.rgbImageDataSource.Start();

            var depthImageSource = this.factory.CreateDepthImageDataSource();
            depthImageSource.NewDataAvailable += new NewDataHandler<ImageSource>(MainWindow_NewDataAvailable);
            depthImageSource.Start();
            handDataSource.Start();
            this.Cursor = Cursors.Arrow;
        }
Пример #4
0
        // Activity lifecycle

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            shouldAutoPlay = true;
            ClearResumePosition();
            mediaDataSourceFactory = BuildDataSourceFactory(true);
            mainHandler            = new Handler();
            if (CookieHandler.Default != DEFAULT_COOKIE_MANAGER)
            {
                CookieHandler.Default = DEFAULT_COOKIE_MANAGER;
            }

            SetContentView(Resource.Layout.player_activity);
            var rootView = FindViewById(Resource.Id.root);

            rootView.SetOnClickListener(this);
            debugRootView = FindViewById <LinearLayout>(Resource.Id.controls_root);
            debugTextView = FindViewById <TextView>(Resource.Id.debug_text_view);
            retryButton   = FindViewById <Button>(Resource.Id.retry_button);
            retryButton.SetOnClickListener(this);

            simpleExoPlayerView = FindViewById <SimpleExoPlayerView>(Resource.Id.player_view);
            simpleExoPlayerView.SetControllerVisibilityListener(this);
            simpleExoPlayerView.RequestFocus();
        }
Пример #5
0
 public ContentRepository(LyniconSystem sys, IDataSourceFactory dataSourceFactory)
 {
     BypassChangeProblems = false;
     DataSourceFactory    = dataSourceFactory;
     System = sys;
     System.Repository.Register(typeof(ContentItem), this);
 }
Пример #6
0
        /// <summary>
        /// Create a new BasicRepository
        /// </summary>
        /// <param name="dataSourceFactory">The data source factory for the repository to use</param>
        public BasicRepository(IDataSourceFactory dataSourceFactory)
        {
            IdName = null;

            QueryTimeoutSecs       = null;
            this.DataSourceFactory = dataSourceFactory;
        }
Пример #7
0
 public DataSourceModelBinder(
     IDataSourceFactory dataSourceFactory,
     IModelBinderFactory modelBinderFactory)
 {
     this.dataSourceFactory  = dataSourceFactory;
     this.modelBinderFactory = modelBinderFactory;
 }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BulkPropertyUpdateManager"/> class.
 /// </summary>
 /// <param name="dataSourceFactory">
 /// The data source factory.
 /// </param>
 /// <param name="itemService">
 /// The item service.
 /// </param>
 /// <param name="categoryService"></param>
 /// <param name="catalogService"></param>
 public BulkPropertyUpdateManager(IDataSourceFactory dataSourceFactory, IItemService itemService, ICategoryService categoryService, ICatalogService catalogService)
 {
     _dataSourceFactory = dataSourceFactory;
     _itemService       = itemService;
     _categoryService   = categoryService;
     _catalogService    = catalogService;
 }
Пример #9
0
 protected AbstractDevice(string id, ILog logger, IDataSourceFactory dataSourceFactory)
 {
     Id                 = id;
     _logger            = logger;
     _dataSourceFactory = dataSourceFactory;
     _dataSources       = new List <IDataSource>();
 }
Пример #10
0
        public void SetUp()
        {
            var xmlDataStore = new XmlDataStore();
            myPrimaryDsFactory = new XmlDataSourceFactory( xmlDataStore );

            mySecondaryDsFactory = new TomDataSourceFactory();
        }
Пример #11
0
        private void Start()
        {
            this.Cursor = Cursors.Wait;
            this.buttonHandInterface.IsEnabled  = true;
            this.buttonManipulation.IsEnabled   = true;
            this.buttonRectangleVideo.IsEnabled = true;
            this.buttonTouch.IsEnabled          = true;
            this.checkClusterLayer.IsEnabled    = true;
            this.checkHandLayer.IsEnabled       = true;
            this.radioKinectSDK.IsEnabled       = false;
            this.radioOpenNI.IsEnabled          = false;

            if (this.radioKinectSDK.IsChecked.GetValueOrDefault())
            {
                this.factory = new SDKDataSourceFactory();
            }
            else
            {
                this.factory = new OpenNIDataSourceFactory("config.xml");
            }
            this.clusterDataSource = this.factory.CreateClusterDataSource(new Core.Clustering.ClusterDataSourceSettings {
                MaximumDepthThreshold = 900
            });
            this.handDataSource     = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));
            this.rgbImageDataSource = this.factory.CreateRGBImageDataSource();
            this.rgbImageDataSource.Start();

            var depthImageSource = this.factory.CreateDepthImageDataSource();

            depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable);
            depthImageSource.Start();
            handDataSource.Start();
            this.Cursor = Cursors.Arrow;
        }
Пример #12
0
 /// <summary>
 /// Create a new BasicRepository
 /// </summary>
 public BasicRepository(LyniconSystem sys, IDataSourceFactory dataSourceFactory)
 {
     IdName = null;
     this.DataSourceFactory = dataSourceFactory;
     QueryTimeoutSecs       = null;
     System = sys;
 }
Пример #13
0
        private void Start()
        {
            // initialize sensor Microsoft Kinect SDK
            sensor = Microsoft.Kinect.KinectSensor.KinectSensors.FirstOrDefault();
            sensor.Start();
            sensor.ElevationAngle = 13;

            // initialize some element

            this.Cursor  = Cursors.Wait;
            this.factory = new SDKDataSourceFactory();

            this.clusterDataSource = this.factory.CreateClusterDataSource(new Core.Clustering.ClusterDataSourceSettings {
                MaximumDepthThreshold = 900
            });
            this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));

            var depthImageSource = this.factory.CreateDepthImageDataSource();

            depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable);
            handDataSource.NewDataAvailable   += new NewDataHandler <HandCollection>(handDataSource_NewDataAvailable);
            HandInterfaceWindow(this.handDataSource, depthImageSource);
            //new HandInterfaceWindow(this.handDataSource, this.rgbImageDataSource).Show();
            depthImageSource.Start();
            handDataSource.Start();
            this.Cursor = Cursors.Arrow;
        }
Пример #14
0
        private void Start()
        {
            _checkClusterLayer.IsEnabled = true;
            _checkClusterLayer.IsChecked = true;
            _checkHandLayer.IsEnabled    = true;
            _checkHandLayer.IsChecked    = true;

            _factory = new SDKDataSourceFactory();

            _depthImageSource = _factory.CreateDepthImageDataSource();
            _depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable);
            _depthImageSource.Start();

            _clusterDataSource = _factory.CreateClusterDataSource(new ClusterDataSourceSettings {
                MaximumDepthThreshold = 900
            });
            _clusterDataSource.NewDataAvailable += new NewDataHandler <ClusterCollection>(ClusterDataSource_NewDataAvailable);
            _clusterDataSource.Start();

            _handDataSource = new HandDataSource(_factory.CreateShapeDataSource(_clusterDataSource, new ShapeDataSourceSettings()));
            _handDataSource.NewDataAvailable += new NewDataHandler <HandCollection>(HandDataSource_NewDataAvailable);
            _handDataSource.Start();

            UpdateLayers();
        }
Пример #15
0
        //This function starts the communcation between the Candescent NUI library with the Kinect device.
        private void Start()
        {
            //Specifies that the Kinect device is in not in Near Mode
            this.factory = new SDKDataSourceFactory(useNearMode: false);

            //This specifies the minimum and maximum depth threshold that the Kinect will use to find hands.
            this.clusterDataSource = this.factory.CreateClusterDataSource(new Core.Clustering.ClusterDataSourceSettings {
                MaximumDepthThreshold = 1000
            });
            this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(this.clusterDataSource, new Core.Shape.ShapeDataSourceSettings()));

            //This will output the display of the video feed in depth mode
            var depthImageSource = this.factory.CreateDepthImageDataSource();

            depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable);
            depthImageSource.Start();
            handDataSource.Start();
            handDataSource.NewDataAvailable += new NewDataHandler <HandCollection>(handDataSource_NewDataAvailable);

            //This add a layer and paint any detected hands in the colour green with a white dot for detected palms and purple dots for each finger tip detected.
            var layers = new List <IWpfLayer>();

            layers.Add(new WpfHandLayer(this.handDataSource));
            this.videoControl.Layers = layers;
        }
Пример #16
0
 public AreaGrab(string _UserName, char _CurrentLetter)
 {
     UserName = _UserName;
     CurrentLetter = _CurrentLetter;
     dataSourceFactory = new SDKDataSourceFactory();
     handDataSource = new HandDataSource(dataSourceFactory.CreateShapeDataSource(), new HandDataSourceSettings());
 }
Пример #17
0
        public void TestFolderDataSourceFactory()
        {
            IDataSourceFactory factory = this.Factories.Single(x => x.GetType() == typeof(FolderDataSourceFactory));
            Dictionary <IConfigurationRequirement, object> inputs =
                factory
                .Requirements
                .Select(
                    requirement =>
            {
                Console.Write(requirement.Name + " - (" + requirement.Description + "): ");
                string input = Console.ReadLine();
                if (input == "null")
                {
                    input = null;
                }

                return(new KeyValuePair <IConfigurationRequirement, object>(requirement, input));
            })
                .ToDictionary(x => x.Key, x => x.Value);

            IConfigurationRequirement rootRequirement = factory.Requirements.Single(x => x.Name == "Root Path");

            inputs[rootRequirement] = new FilePath((string)inputs[rootRequirement]);
            IConfigurationRequirement tickRequirement =
                factory.Requirements.Single(x => x.Name == "Change Filter Ticks");

            inputs[tickRequirement] = inputs[tickRequirement] ==
                                      null ? 0L : long.Parse((string)inputs[tickRequirement]);

            IDataSource dataSource = factory.MakeDataSource(inputs);

            dataSource.OnChange +=
                (obj, e) =>
            {
                DataSourceChangeEventType type        = e.EventType;
                IDataInformation          information = e.GetImageInformation();
                if (type == DataSourceChangeEventType.Added)
                {
                    Console.WriteLine("Added: " + information.Name);
                }
                else if (type == DataSourceChangeEventType.Changed)
                {
                    Console.WriteLine("Changed: " + information.Name);
                }
                else if (type == DataSourceChangeEventType.Removed)
                {
                    Console.WriteLine("Removed: " + information.Name);
                }
                else
                {
                    throw new InvalidOperationException("Unexpected DataSourceChangeEventType value.");
                }
            };

            Console.WriteLine("Monitoring folder '" + dataSource.Name + "'. Press enter to stop.");
            Console.ReadLine();

            dataSource.Dispose();
        }
Пример #18
0
        public void SetUp()
        {
            var xmlDataStore = new XmlDataStore();

            myPrimaryDsFactory = new XmlDataSourceFactory(xmlDataStore);

            mySecondaryDsFactory = new TomDataSourceFactory();
        }
Пример #19
0
        /// <summary>
        /// 通过连接获取DataSource
        /// </summary>
        /// <param name="ci"></param>
        /// <returns></returns>
        private IDataSource GetDataSource(IConnectionInfo ci)
        {
            if (dsFactory == null)
            {
                dsFactory = new DataSourceFactory();
            }
            IDataSource ds = dsFactory.OpenDataSource(ci);

            return(ds);
        }
Пример #20
0
        public PriceSeriesDataSourceFactory(IDataSourceFactory realFactory)
        {
            if (realFactory == null)
            {
                throw new ArgumentNullException("realFactory");
            }

            RealFactory = realFactory;

            myOperators = new Map <string, IList <IPriceSeriesOperator> >();
        }
Пример #21
0
        public PriceSeriesDataSourceFactory( IDataSourceFactory realFactory )
        {
            if ( realFactory == null )
            {
                throw new ArgumentNullException( "realFactory" );
            }

            RealFactory = realFactory;

            myOperators = new Map<string, IList<IPriceSeriesOperator>>();
        }
Пример #22
0
        public CachingDataSourceFactory(IDataSourceFactory realFactory)
        {
            if (realFactory == null)
            {
                throw new ArgumentNullException("realFactory");
            }

            RealFactory = realFactory;

            myDataSourceCache = new Dictionary <string, object>();
        }
Пример #23
0
        public CachingDataSourceFactory( IDataSourceFactory realFactory )
        {
            if ( realFactory == null )
            {
                throw new ArgumentNullException( "realFactory" );
            }

            RealFactory = realFactory;

            myDataSourceCache = new Dictionary<string, object>();
        }
Пример #24
0
        private void FeatureDataSetMapToFeatureClassMap()
        {
            try
            {
                if (_ci == null)
                {
                    return;
                }
                dsFactory = new DataSourceFactory();
                IDataSource ds = dsFactory.OpenDataSource(_ci);

                string[] setnames = (string[])ds.GetFeatureDatasetNames();
                if (setnames == null || setnames.Length == 0)
                {
                    return;
                }

                foreach (string name in setnames)
                {
                    IFeatureDataSet dataSet = ds.OpenFeatureDataset(name);
                    string[]        fcnames = (string[])dataSet.GetNamesByType(i3dDataSetType.i3dDataSetFeatureClassTable);
                    if (fcnames == null || fcnames.Length == 0)
                    {
                        continue;
                    }
                    foreach (string fcname in fcnames)
                    {
                        IFeatureClass fc = dataSet.OpenFeatureClass(fcname);
                        if (fc != null)
                        {
                            List <string>        geoNames   = new List <string>();
                            IFieldInfoCollection fieldinfos = fc.GetFields();
                            if (fieldinfos != null && fieldinfos.Count > 0)
                            {
                                for (int i = 0; i < fieldinfos.Count; i++)
                                {
                                    IFieldInfo field = fieldinfos.Get(i);
                                    if (field != null && field.GeometryDef != null)
                                    {
                                        geoNames.Add(field.Name);
                                    }
                                }
                                _featureClassMapping.Add(fc, geoNames);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LoggerHelper.Logger.Error(ex, "执行FeatureDataSetMapToFeatureClassMap错误");
            }
        }
Пример #25
0
 internal ConfigurationBuilder(Configuration copyFrom)
 {
     _dataSourceFactory           = copyFrom.DataSourceFactory;
     _dataStoreFactory            = copyFrom.DataStoreFactory;
     _diagnosticOptOut            = copyFrom.DiagnosticOptOut;
     _eventProcessorFactory       = copyFrom.EventProcessorFactory;
     _httpConfigurationFactory    = copyFrom.HttpConfigurationFactory;
     _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory;
     _offline       = copyFrom.Offline;
     _sdkKey        = copyFrom.SdkKey;
     _startWaitTime = copyFrom.StartWaitTime;
 }
 private void InitializeOpenNI()
 {
     try
     {
         this.dataSourceFactory = new OpenNIDataSourceFactory("Config.xml");
     }
     catch (Exception exc)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
 }
Пример #27
0
 public MappingRuleSet(
     string name,
     bool rootHasPopulatedTarget,
     IEnumerablePopulationStrategy enumerablePopulationStrategy,
     IDataSourceFactory initialDataSourceFactory,
     IDataSourceFactory fallbackDataSourceFactory)
 {
     Name = name;
     RootHasPopulatedTarget       = rootHasPopulatedTarget;
     EnumerablePopulationStrategy = enumerablePopulationStrategy;
     InitialDataSourceFactory     = initialDataSourceFactory;
     FallbackDataSourceFactory    = fallbackDataSourceFactory;
 }
 public TransactionalModelProcessor(
     IServerWrapperFactory serverFactory,
     IConnectionStringFactory connectionStringFactory,
     IRefreshFactory refreshFactory,
     IDataSourceFactory dataSourceFactory,
     ILogger logger) : base(
         serverFactory,
         connectionStringFactory,
         refreshFactory,
         logger)
 {
     _dataSourceFactory = dataSourceFactory;
 }
        public void WhenThePropertyIsConfigurationIndependent_ThenNoDimensionsAreProduced()
        {
            var properties = PropertiesAvailableStatusFactory.CreateConfigurationDimensionAvailableStatus(includeAllProperties: true);

            var parentEntity  = IEntityWithIdFactory.Create("ParentKey", "ParentKeyValue");
            var configuration = ProjectConfigurationFactory.Create("Alpha|Beta|Gamma", "A|B|C");
            var property      = IPropertyFactory.Create(
                dataSource: IDataSourceFactory.Create(hasConfigurationCondition: false));

            var results = ConfigurationDimensionDataProducer.CreateProjectConfigurationDimensions(parentEntity, configuration, property, properties);

            Assert.Empty(results);
        }
Пример #30
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            mediaDataSourceFactory = BuildDataSourceFactory(true);

            SetContentView(Resource.Layout.Player);

            // Create your application here

            url = Intent.GetStringExtra("MyData") ?? "Data not available";


            Init(this, FindViewById <PlayerView> (Resource.Id.player_view));
        }
Пример #31
0
 internal ConfigurationBuilder(Configuration copyFrom)
 {
     _bigSegmentsConfigurationFactory = copyFrom.BigSegmentsConfigurationFactory;
     _dataSourceFactory           = copyFrom.DataSourceFactory;
     _dataStoreFactory            = copyFrom.DataStoreFactory;
     _diagnosticOptOut            = copyFrom.DiagnosticOptOut;
     _eventProcessorFactory       = copyFrom.EventProcessorFactory;
     _httpConfigurationFactory    = copyFrom.HttpConfigurationFactory;
     _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory;
     _offline = copyFrom.Offline;
     _sdkKey  = copyFrom.SdkKey;
     _serviceEndpointsBuilder = new ServiceEndpointsBuilder(copyFrom.ServiceEndpoints);
     _startWaitTime           = copyFrom.StartWaitTime;
 }
Пример #32
0
        private void CreatePipeLib()
        {
            IDataSource        ds             = null;
            IDataSourceFactory factory        = null;
            IConnectionInfo    connectionInfo = null;

            try
            {
                if (DF3DPipeCreateApp.App.PipeLib != null)
                {
                    DF3DPipeCreateApp.App.PipeLib.Close();
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(DF3DPipeCreateApp.App.PipeLib);
                    DF3DPipeCreateApp.App.PipeLib = null;
                }
                string fdbPath = this.buttonEditFilePath.Text.ToString().Trim();
                string pwd     = this.tePwd.Text;
                if (System.IO.File.Exists(fdbPath))
                {
                    System.IO.File.Delete(fdbPath);
                }
                factory        = new DataSourceFactoryClass();
                connectionInfo = new ConnectionInfoClass
                {
                    ConnectionType = gviConnectionType.gviConnectionFireBird2x,
                    Database       = fdbPath
                };
                ds = factory.CreateDataSource(connectionInfo, pwd);
                if (ds == null)
                {
                    XtraMessageBox.Show("创建管线库数据库失败!", "提示");
                    return;
                }

                if (InitPipeLib(ds))
                {
                    DF3DPipeCreateApp.App.PipeLib = ds;
                    XtraMessageBox.Show("创建管线库数据库成功!", "提示");
                    Config.SetConfigValue("3DPipeDataConnStr", connectionInfo.ToConnectionString());
                }
                else
                {
                    DF3DPipeCreateApp.App.PipeLib = null;
                    XtraMessageBox.Show("创建管线库数据库失败!", "提示");
                }
            }
            catch (Exception ex)
            {
            }
        }
Пример #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BulkActionProvider"/> class.
 /// </summary>
 /// <param name="name">
 /// The name.
 /// </param>
 /// <param name="contextTypeName">
 /// The context type name.
 /// </param>
 /// <param name="applicableTypes">
 /// The applicable types.
 /// </param>
 /// <param name="dataSourceFactory">
 /// The data source factory.
 /// </param>
 /// <param name="bulkActionFactory">
 /// The bulk action factory.
 /// </param>
 /// <param name="permissions">
 /// The required Permissions.
 /// </param>
 public BulkActionProvider(
     string name,
     string contextTypeName,
     string[] applicableTypes,
     IDataSourceFactory dataSourceFactory,
     IBulkActionFactory bulkActionFactory,
     string[] permissions)
 {
     Name              = name;
     ContextTypeName   = contextTypeName;
     ApplicableTypes   = applicableTypes;
     DataSourceFactory = dataSourceFactory;
     BulkActionFactory = bulkActionFactory;
     Permissions       = permissions;
 }
Пример #34
0
 public ET_Engine(IDataSourceFactory dataSourceFactory,
                  IDataResolver dataResolver,
                  IDataSinkFactory dataSinkFactory,
                  IEtLogger logger,
                  IDiskIOHandler diskIOHandler,
                  RuntimeArgs runtimeSettings)
 {
     this._dataSourceFactory      = dataSourceFactory;
     this._dataMapHandler         = dataResolver;
     this._dataSinkFactory        = dataSinkFactory;
     this._logger                 = logger;
     this._diskIOHandler          = diskIOHandler;
     this._runtimeSettings        = runtimeSettings;
     this._toSinkDataChainBuilder = new SourceToSinkDataChainBuilder(logger);
 }
        public void WhenThePropertyIsConfigurationDependent_OneEntityIsCreatedPerDimension()
        {
            var properties = PropertiesAvailableStatusFactory.CreateConfigurationDimensionAvailableStatus(includeAllProperties: true);

            var parentEntity  = IEntityWithIdFactory.Create("ParentKey", "ParentKeyValue");
            var configuration = ProjectConfigurationFactory.Create("Alpha|Beta|Gamma", "A|B|C");
            var property      = IPropertyFactory.Create(
                dataSource: IDataSourceFactory.Create(hasConfigurationCondition: true));

            var results = ConfigurationDimensionDataProducer.CreateProjectConfigurationDimensions(parentEntity, configuration, property, properties);

            // We can't guarantee an order for the dimensions, so just check that all the expected values are present.
            Assert.Contains(results, entity => entity is ConfigurationDimensionValue {
                Name: "Alpha", Value: "A"
            });
 internal ConfigurationBuilder(Configuration copyFrom)
 {
     _autoAliasingOptOut          = copyFrom.AutoAliasingOptOut;
     _dataSourceFactory           = copyFrom.DataSourceFactory;
     _diagnosticOptOut            = copyFrom.DiagnosticOptOut;
     _enableBackgroundUpdating    = copyFrom.EnableBackgroundUpdating;
     _evaluationReasons           = copyFrom.EvaluationReasons;
     _eventProcessorFactory       = copyFrom.EventProcessorFactory;
     _httpConfigurationBuilder    = copyFrom.HttpConfigurationBuilder;
     _loggingConfigurationBuilder = copyFrom.LoggingConfigurationBuilder;
     _mobileKey = copyFrom.MobileKey;
     _offline   = copyFrom.Offline;
     _persistenceConfigurationBuilder = copyFrom.PersistenceConfigurationBuilder;
     _serviceEndpointsBuilder         = new ServiceEndpointsBuilder(copyFrom.ServiceEndpoints);
 }
Пример #37
0
        private void Start()
        {
            _checkClusterLayer.IsEnabled = true;
            _checkClusterLayer.IsChecked = true;
            _checkHandLayer.IsEnabled = true;
            _checkHandLayer.IsChecked = true;

            _factory = new SDKDataSourceFactory();

            _depthImageSource = _factory.CreateDepthImageDataSource();
            _depthImageSource.NewDataAvailable += new NewDataHandler<ImageSource>(MainWindow_NewDataAvailable);
            _depthImageSource.Start();

            _clusterDataSource = _factory.CreateClusterDataSource(new ClusterDataSourceSettings { MaximumDepthThreshold = 900 });
            _clusterDataSource.NewDataAvailable += new NewDataHandler<ClusterCollection>(ClusterDataSource_NewDataAvailable);
            _clusterDataSource.Start();

            _handDataSource = new HandDataSource(_factory.CreateShapeDataSource(_clusterDataSource, new ShapeDataSourceSettings()));
            _handDataSource.NewDataAvailable += new NewDataHandler<HandCollection>(HandDataSource_NewDataAvailable);
            _handDataSource.Start();

            UpdateLayers();
        }
 public JellyBeanListPageModel(IDataSourceFactory dataSourceFactory)
 {
     _dataSourceFactory = dataSourceFactory;
 }
Пример #39
0
 public GraphPageModel(IDataSourceFactory dataSourceFactory)
 {
     _dataSourceFactory = dataSourceFactory;
 }
Пример #40
0
 public void TearDown()
 {
     myPrimaryDsFactory = null;
     mySecondaryDsFactory = null;
 }
Пример #41
0
 private void radioButtonSDK_CheckedChanged(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     try
     {
         this.dataSourceFactory = new SDKDataSourceFactory();
     }
     catch (Exception exc)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     this.ToggleButtons();
     Cursor.Current = Cursors.Default;
 }
 public MyJellyBeansListModel(IDataSourceFactory dataSourceFactory)
 {
     _dataSourceFactory = dataSourceFactory;
 }
Пример #43
0
 private void InitializeOpenNI()
 {
     try
     {
         this.dataSourceFactory = new OpenNIDataSourceFactory("Config.xml");
     }
     catch (Exception exc)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
 }
Пример #44
0
 public BindingContainer( IDataSourceFactory dataSourceFactory )
 {
     DataSourceFactory = dataSourceFactory;
 }
Пример #45
0
 public UserRepository(IDataSourceFactory dataSourceFactory)
     : base(dataSourceFactory)
 {
 }