예제 #1
0
 public CustomerProfileController(IUserService userService, IBlobService blobService, IContainerNameService containerNameService, IFaceRecognitionService faceRecognitionService)
 {
     this.userService            = userService;
     this.blobService            = blobService;
     this.containerNameService   = containerNameService;
     this.faceRecognitionService = faceRecognitionService;
 }
 public FaceRecognitionController(IFaceRecognitionService faceRecognitionService, IMapper mapper,
                                  ILogger <FaceRecognitionController> logger)
 {
     this.faceRecognitionService = faceRecognitionService;
     this.mapper = mapper;
     this.logger = logger;
 }
예제 #3
0
        /// <summary>
        /// متذ سازنده
        /// </summary>
        public MainViewModel()
        {
            if (IsInDesignMode)
            {
                //Logs = new ObservableCollection<Log>()
                //{
                //    new Log()
                //    {
                //        Employee=new Employee(){FirstName="Abbas",LastName="Allahyari"},
                //        EventTime=DateTime.Now,
                //        AttendanceMethod=AttendanceMethod.FaceDetection,
                //        AttendanceMethodResult=AttendanceMethodResult.Failure
                //    },
                //};
            }
            else
            {
                AutomatedAttendanceSystem = new AutomatedAttendanceSystemProxy();
                FaceRecognitionService    = new FaceRecognitionServiceProxy();
                QRService = new QRServiceProxy();

                this.FRSSettings = FaceRecognitionService.GetSettings(false);
                retrieveLogs();
            }
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa-IR");
            System.Threading.Thread.CurrentThread.CurrentCulture   = new CultureInfo("fa-IR");
        }
        private void initialize()
        {
            //Initalize services
            this.AutomatedAttendanceSystem = new AutomatedAttendanceSystemProxy();
            this.FaceRecognitionService    = new FaceRecognitionServiceProxy();
            this.QRService = new QRServiceProxy();

            //Register for messages
            Messenger.Default.Register <WorkSchedule>(this, (workScheduleMessage) =>
            {
                if (workScheduleMessage != WorkSchedule.MinValue)
                {
                    WorkSchedule = workScheduleMessage;
                }
            });
            Messenger.Default.Register <Messages>(this, (msg) =>
            {
                if (msg == Messages.ToggleEditMode)
                {
                    toggleEditMode();
                }
                if (msg == Messages.EnableEditMode)
                {
                    toggleEditMode(true);
                }
                if (msg == Messages.DisableEditMode)
                {
                    toggleEditMode(false);
                }
            });


            //  if (HasRecord)
            Messenger.Default.Send <Employee, EmployeeAttendanceTimesViewModel>(CurrentEmployee);
        }
예제 #5
0
 public CameraAnalyzeService(IFaceRecognitionService recognitionService, Camera camera)
 {
     _recognitionService = recognitionService;
     _camera             = camera;
     _stream             = new MJPEGStream(camera.IPAddress);
     _stream.NewFrame   += OnFrameReceived;
     _stream.Start();
 }
예제 #6
0
        public PictureRecognition()
        {
            InitializeComponent();
            _faceRecognitionService = new FaceRecognitionService();
            _imageResizerService    = DependencyService.Get <IImageResizerService>();

            pickPhoto.Clicked += OnSelectedPhotoAsync;
        }
예제 #7
0
 public MyEventsController(IServiceService serviceService, IEventServiceService eventServiceService, IServicePackageService servicePackageService, IBlobService blobService, IContainerNameService containerNameService, IFaceRecognitionService faceRecognitionService)
 {
     this.serviceService         = serviceService;
     this.eventServiceService    = eventServiceService;
     this.servicePackageService  = servicePackageService;
     this.blobService            = blobService;
     this.containerNameService   = containerNameService;
     this.faceRecognitionService = faceRecognitionService;
 }
예제 #8
0
 public RecognitionController(IFaceRecognitionService faceRecognitionService,
                              INeuralNetworkService neuralNetworkService, IMapper mapper,
                              ILogger <RecognitionController> logger)
 {
     this.faceRecognitionService = faceRecognitionService;
     this.neuralNetworkService   = neuralNetworkService;
     this.mapper = mapper;
     this.logger = logger;
 }
 public LicniPodaciService(IMapper mapper,
                           HealthCare020DbContext dbContext,
                           IPropertyMappingService propertyMappingService,
                           IPropertyCheckerService propertyCheckerService,
                           IHttpContextAccessor httpContextAccessor,
                           IAuthService authService, IFaceRecognitionService faceRecognitionService) : base(mapper, dbContext, propertyMappingService, propertyCheckerService, httpContextAccessor, authService)
 {
     _faceRecognitionService = faceRecognitionService;
 }
예제 #10
0
 private FaceRecognition()
 {
     _faceRecognitionService = new FaceRecognitionService(
         ConfigurationManager.AppSettings["azure-keys"],
         ConfigurationManager.AppSettings["azure-endpoint"],
         ConfigurationManager.AppSettings["azure-group-id"],
         new ConsoleLogger()
         );
     _camerasManager = new CamerasManager(_faceRecognitionService);
 }
        /// <summary>
        /// متد سازنده
        /// </summary>
        public MainViewModel()
        {
            if (!IsInDesignMode)
            {
                try
                {
                    //Proxies are created
                    QrService = new QRServiceProxy();
                    AutomatedAttendanceSystem = new AAS.Proxy.AutomatedAttendanceSystemProxy();
                    FaceRecognition           = new FaceRecognitionServiceProxy();

                    intitalizeAttendanceMethods();
                    EmguCVHelper.StartCapture();
                    EmguCVHelper.CaptureImageIsRefreshed += RefreshImage;
                    m_restTimer = new Timer(3000);

                    m_restTimer.Elapsed += restTimer_Elapsed;
                }
                catch (Exception ex)
                {
                    Exception exep = ex;
                    {
                        MessageBox.Show(exep.Message);
                    } while ((exep = exep.InnerException) != null)
                    {
                        ;
                    }
                }
                m_logs = new List <Log>();
            }
            else
            {
                Employee employee = new Employee()
                {
                    FirstName         = "احمد",
                    LastName          = "رحیمی",
                    Gender            = Gender.Male,
                    DateOfBirth       = new DateTime(1980, 01, 01),
                    DateOfEmployement = new DateTime(2000, 04, 12),
                    IdentityNumber    = "13654",
                    NationalID        = new IRNationalID("000-000004-3"),
                    EmployeeID        = new EmployeeID(0, 4, 1),
                    ProfilePicture    = new Bitmap(@"G:\_DATA\dummy.png"),
                };
                DetectedEmployee = employee;
                //DetectedEmployee = null;
                ErrorMessage             = (string)Application.Current.FindResource("FRSCouldNotDetect");
                AlternativeMethodMessage = (string)Application.Current.FindResource("FRSCouldNotDetectAlternativeMethod");
                EntryOrExit     = string.Format((string)Application.Current.FindResource("Entry"));
                EntryOrExitHour = DateTime.Now;
            }
        }
예제 #12
0
 public KorisnikService(IMapper mapper,
                        HealthCare020DbContext dbContext,
                        IPropertyMappingService propertyMappingService,
                        IPropertyCheckerService propertyCheckerService,
                        IHttpContextAccessor httpContextAccessor,
                        ISecurityService securityService,
                        IAuthService authService,
                        IFaceRecognitionService faceRecognitionService)
     : base(mapper, dbContext, propertyMappingService, propertyCheckerService, httpContextAccessor, authService)
 {
     _securityService        = securityService;
     _faceRecognitionService = faceRecognitionService;
 }
예제 #13
0
        public RateAppPage()
        {
            InitializeComponent();

            _faceRecognitionService = new FaceRecognitionService();
        }
예제 #14
0
 public DetectiveBot(ILoggerFactory loggerFactory, ICustomVisionService customVisionService, IFaceRecognitionService faceRecognitionService)
 {
     _logger = loggerFactory?.CreateLogger(GetType().Name);
     _faceRecognitionService = faceRecognitionService;
     _customVisionService    = customVisionService;
 }
 public TrainSuspectsTopic(IFaceRecognitionService faceRecognitionService)
 {
     this.faceRecognitionService = faceRecognitionService;
 }
 public PhotoService(IDocumentStore store, IFaceRecognitionService faceRecognitionService)
 {
     _store = store;
     _faceRecognitionService = faceRecognitionService;
 }
예제 #17
0
 public FaceRecognition()
 {
     InitializeComponent();
     faceRecognitionService = new FaceRecognitionService();
 }
 /// <summary>
 /// متد سازنده
 /// </summary>
 public FaceRecognitionMethod()
 {
     FaceRecognition = new FaceRecognitionServiceProxy();
 }
예제 #19
0
 public IdentifySuspectTopic(IFaceRecognitionService faceRecognitionService)
 {
     this.faceRecognitionService = faceRecognitionService;
 }
예제 #20
0
 public PictureController(IFaceRecognitionService faceRecognitionService)
 {
     _faceRecognitionService = faceRecognitionService;
 }
 public MatchSuspectTopic(IFaceRecognitionService faceRecognitionService)
 {
     this.faceRecognitionService = faceRecognitionService;
 }
예제 #22
0
 public FacesController(IUserService userService, IFaceRecognitionService <byte[], User> faceService) : base("/faces")
 {
     _faceService  = faceService;
     _usersService = userService;
     RegisterActions();
 }
예제 #23
0
 public DefaultTopic(ICustomVisionService customVisionService, IFaceRecognitionService faceRecognitionService)
 {
     _customVisionService    = customVisionService;
     _faceRecognitionService = faceRecognitionService;
 }
예제 #24
0
 public FaceRecognitionController(IFaceRecognitionService faceRecognitionService)
 {
     _faceRecognitionService = faceRecognitionService;
 }
 public DescribePersonTopic(IFaceRecognitionService faceRecognitionService)
 {
     this.faceRecognitionService = faceRecognitionService;
 }
예제 #26
0
 public DetectiveBotContext(IBotContext context, IFaceRecognitionService faceRecognitionService, ICustomVisionService customVisionService) : base(context)
 {
     _faceRecognitionService = faceRecognitionService;
     _customVisionService    = customVisionService;
 }
예제 #27
0
 public CamerasManager(IFaceRecognitionService recognitionService)
 {
     _recognitionService = recognitionService;
 }
        /// <summary>
        /// متن سازنده
        /// </summary>
        public MainViewModel()
        {
            if (IsInDesignMode)
            {
                FilteredEmployees = new ObservableCollection <Employee>()
                {
                    #region Abbas Allahyari
                    new Employee()
                    {
                        FirstName         = "عباس",
                        LastName          = "اللهیاری",
                        DateOfBirth       = new DateTime(1991, 02, 09),
                        DateOfEmployement = new DateTime(2014, 01, 01),
                        EmployeeID        = new EmployeeID(14, 01, 01),
                        NationalID        = new IRNationalID("000-000004-3"),
                        IdentityNumber    = "13654",
                        ProfilePicture    = new Bitmap(@"G:\_DATA\dummy.png")
                    },
                    #endregion
                    #region Behnam Sajadi
                    new Employee()
                    {
                        FirstName         = "بهنام",
                        LastName          = "سجادی",
                        DateOfBirth       = new DateTime(1994, 02, 09),
                        DateOfEmployement = new DateTime(2014, 01, 02),
                        EmployeeID        = new EmployeeID(14, 01, 01),
                        NationalID        = new IRNationalID("000-000004-3"),
                        IdentityNumber    = "13654",
                        ProfilePicture    = new Bitmap(@"G:\_DATA\dummy.png")
                    },
                    #endregion
                    #region Aryan Shams
                    new Employee()
                    {
                        FirstName         = "آرین",
                        LastName          = "شمس",
                        DateOfBirth       = new DateTime(1994, 02, 09),
                        DateOfEmployement = new DateTime(2014, 01, 03),
                        EmployeeID        = new EmployeeID(14, 01, 01),
                        NationalID        = new IRNationalID("000-000004-3"),
                        IdentityNumber    = "13654",
                        ProfilePicture    = new Bitmap(@"G:\_DATA\dummy.png")
                    },
                    #endregion
                    #region Ami Sama
                    new Employee()
                    {
                        FirstName         = "آمی",
                        LastName          = "سَما",
                        DateOfBirth       = new DateTime(1991, 02, 09),
                        DateOfEmployement = new DateTime(2014, 01, 04),
                        EmployeeID        = new EmployeeID(14, 01, 01),
                        NationalID        = new IRNationalID("000-000004-3"),
                        IdentityNumber    = "13654",
                        ProfilePicture    = new Bitmap(@"G:\_DATA\dummy.png")
                    },
                    #endregion
                };
                SelectedEmployeeFilter = (FilteredEmployees as ObservableCollection <Employee>)[0];
                RaisePropertyChanged(() => FilteredEmployees);
                Notification = new Notification()
                {
                    Message = "اعلان تست",
                    Type    = NotificationType.Error,
                };
                FilterMode = true;
            }
            else
            {
                AutomatedAttendanceSystem = new AutomatedAttendanceSystemProxy();
                FaceRecognitionService    = new FaceRecognitionServiceProxy();
                QRService = new QRServiceProxy();
                RetrieveEmployees();
                RetrieveAttendanceTimes();


                //CurrentAttendanceStatusFitler = AttendanceStatus.All;
                SearchQueryFilter = string.Empty;
                CurrentDateFilter = DateTime.Now;

                FilterMode = false;
                filterEmployees();
                Messenger.Default.Register <Notification>(this, (notification) =>
                {
                    //animation
                    Notification = notification;
                });
                fadeInStoryboard   = (Storyboard)Application.Current.FindResource("fadeIn");
                fadeeOutStoryboard = (Storyboard)Application.Current.FindResource("fadeOut");
                Content            = new ContentControl();
                Content.Visibility = Visibility.Collapsed;
                Content.Opacity    = 0;
                Messenger.Default.Register <Messages>(this, (message) =>
                {
                    switch (message)
                    {
                    case Messages.Update:
                        RetrieveEmployees();

                        break;

                    case Messages.HideEmployeeView:
                        //animation

                        hide();
                        break;
                    }
                });
            }
        }