当前位置: 首页>>代码示例>>C#>>正文


C# XPCollection.Load方法代码示例

本文整理汇总了C#中XPCollection.Load方法的典型用法代码示例。如果您正苦于以下问题:C# XPCollection.Load方法的具体用法?C# XPCollection.Load怎么用?C# XPCollection.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XPCollection的用法示例。


在下文中一共展示了XPCollection.Load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnActivated

        protected override void OnActivated()
        {
            base.OnActivated();

            subjectAreaCollection = ObjectSpace.CreateObject<XPCollection<SubjectArea>>();
            subjectAreaCollection.Load();

            PopulateSubjectAreaList();
        }
开发者ID:eugene-goldberg,项目名称:DataExplorer,代码行数:9,代码来源:ViewController_Entity_ListView.cs

示例2: LoadPersonOfInterests

 private TargetPerson[] LoadPersonOfInterests()
 {
     using (var session = new Session())
     {
         var xpc = new XPCollection<TargetPerson>();
         xpc.Load();
         return xpc.ToArray();
     }
 }
开发者ID:dalinhuang,项目名称:appcollection,代码行数:9,代码来源:FaceComparer.cs

示例3: UpdateFaceStatus

        private void UpdateFaceStatus()
        {
            if (_videos.Count > 0)
            {
                var min = _videos.Min(v => v.CapturedAt);
                var max = _videos.Max(v => v.CapturedAt);

                _portraits = new XPCollection<Portrait>();
                var cretia = CriteriaOperator.Parse("CaptureTime >= ? and CaptureTime < ?",
                                                    min, max);
                _portraits.Criteria = cretia;
                _portraits.Load();

                var gq = from Portrait item in _portraits
                         group item by item.CaptureTime.Date.AddHours(item.CaptureTime.Hour).AddMinutes(item.CaptureTime.Minute)
                             into g
                             orderby g.Key ascending
                             select g;

                foreach (var v in _videos)
                {
                    var video = v;
                    _cts.Token.ThrowIfCancellationRequested();
                    var hasFace = gq.Where(g => g.Key == video.CapturedAt).Count() != 0;
                    Action ac = () => video.HasFaceCaptured = hasFace;
                    this.BeginInvoke(ac);
                }
            }
        }
开发者ID:dalinhuang,项目名称:appcollection,代码行数:29,代码来源:VideoQueryForm.cs

示例4: DoSearch

        private void DoSearch()
        {
            var videos =
            new FileSystemStorage(
                Properties.Settings.Default.OutputPath).
                VideoFilesBetween(_selectedCamera.Id,
                                  _currentRange.From, _currentRange.To).ToList();

            var watch = System.Diagnostics.Stopwatch.StartNew();
            var range = new DateTimeRange(_currentRange.From, _currentRange.To.AddMinutes(1));

            watch.Stop();
            System.Diagnostics.Debug.WriteLine("frames search took " + watch.Elapsed);

            watch.Start();

            _portraits = new XPCollection<Portrait>();
            var cretia = CriteriaOperator.Parse("CaptureTime >= ? and CaptureTime < ?",
                                                            range.From, range.To);
            _portraits.Criteria = cretia;
            _portraits.Load();

            var gq = from  item in _portraits
                     group item by item.CaptureTime.Date.AddHours(item.CaptureTime.Hour).AddMinutes(item.CaptureTime.Minute) into g
                     orderby g.Key ascending
                     select g;

            watch.Stop();
            System.Diagnostics.Debug.WriteLine("portraits search took " + watch.Elapsed);

            this._screen.ClearAll();

            foreach (var v in videos)
            {
                if (v.CapturedAt.Ticks < _currentRange.From.Ticks || v.CapturedAt.Ticks > _currentRange.To.Ticks)
                {
                    continue;
                }

                v.HasFaceCaptured = gq.Where(g => g.Key == v.CapturedAt).Count() != 0;

                if ((_scope & SearchScope.FaceCapturedVideo)
                    == SearchScope.FaceCapturedVideo)
                {
                    if (v.HasFaceCaptured)
                    {
                        _screen.AddVideo(v);
                    }
                }

                if ((_scope & SearchScope.MotionWithoutFaceVideo)
                    == SearchScope.MotionWithoutFaceVideo)
                {
                    if (v.HasMotionDetected && !v.HasFaceCaptured)
                    {
                        _screen.AddVideo(v);
                    }
                }

                if ((_scope & SearchScope.MotionLessVideo)
                    == SearchScope.MotionLessVideo)
                {
                    if (!v.HasFaceCaptured &&
                        !v.HasMotionDetected)
                    {
                        _screen.AddVideo(v);
                    }
                }

            }
        }
开发者ID:dalinhuang,项目名称:appcollection,代码行数:71,代码来源:VideoQueryPresenter.cs

示例5: LoadPersonOfInterests

 private PortraitCapturer.DAL.DTO.TargetPerson[] LoadPersonOfInterests()
 {
     using (var session = new Session())
     {
         var xpc = new XPCollection<PortraitCapturer.DAL.DTO.TargetPerson>();
         xpc.Load();
         return xpc.ToArray();
     }
 }
开发者ID:dalinhuang,项目名称:appcollection,代码行数:9,代码来源:FaceComparer.cs


注:本文中的XPCollection.Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。