public ConsoleApplication(CvContext ctx,
                           IConfiguration cfg,
                           cvParsers parsers,
                           cvConfig cvConfiguration)
 {
     this.ctx             = ctx;
     this.cfg             = cfg;
     this.parsers         = parsers;
     this.cvConfiguration = cvConfiguration;
 }
 public ScrapeRunsTest(CvContext ctx,
                       IConfiguration cfg,
                       cvParsers parsers,
                       cvConfig cvConfiguration)
 {
     this.ctx             = ctx;
     this.cfg             = cfg;
     this.parsers         = parsers;
     this.cvConfiguration = cvConfiguration;
 }
Пример #3
0
        protected CvContext GetSqlLiteContext()
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();
            var options = new DbContextOptionsBuilder <CvContext>().UseSqlite(connection).Options;
            var context = new CvContext(options);

            context.Database.EnsureCreated();
            return(context);
        }
Пример #4
0
 public FileWatcherConsole(CvContext ctx,
                           IConfiguration cfg,
                           ImportScrapeData importData,
                           cvParsers cvParsers,
                           cvConfig cvConfiguration)
 {
     this.ctx             = ctx;
     this.cfg             = cfg;
     this.importData      = importData;
     this.cvParsers       = cvParsers;
     this.cvConfiguration = cvConfiguration;
 }
Пример #5
0
        public ScrapeFileImport(CvContext ctx,
                                IConfiguration cfg,
                                cvParsers parsers,
                                ImportScrapeData importer,
                                cvConfig cvConfiguration)
        {
            this.ctx             = ctx;
            this.cfg             = cfg;
            this.parsers         = parsers;
            this.importer        = importer;
            this.cvConfiguration = cvConfiguration;

            runtest = new ScrapeRunsTest(ctx, cfg, parsers, cvConfiguration);
        }
Пример #6
0
        /// <summary>
        /// Get Cv included member,person from memberId
        /// </summary>
        /// <param name="ctx">Application ctx</param>
        /// <param name="memberId">filter for take cv</param>
        /// <returns>CvVO</returns>
        public CvVO FindCvByMemberId(CvContext ctx, int memberId)
        {
            CvVO model = new CvVO();

            try
            {
                var query = (from cv in ctx.Cv
                             join member in ctx.Member on cv.MemberId equals member.Id
                             join person in ctx.Person on member.PersonId equals person.Id
                             where member.Id == memberId
                             select new
                {
                    cv.Id,
                    cv.MemberId,
                    member.Username,
                    member.PersonId,
                    person.BirthDate,
                    person.FirstName_el,
                    person.LastName_el,
                    person.FirstName_en,
                    person.LastName_en
                }).Single();
                model.Id       = FillItemForDatabase.FillItem(query.Id);
                model.MemberId = FillItemForDatabase.FillItem(query.MemberId);
                model.Member   = new MemberVO()
                {
                    Id       = model.MemberId,
                    Username = FillItemForDatabase.FillItem(query.Username),
                    PersonId = FillItemForDatabase.FillItem(query.PersonId)
                };
                model.Member.Person = new PersonVO()
                {
                    Id           = model.Member.PersonId,
                    BirthDate    = FillItemForDatabase.FillItem(query.BirthDate),
                    FirstName_el = FillItemForDatabase.FillItem(query.FirstName_el),
                    LastName_el  = FillItemForDatabase.FillItem(query.LastName_el),
                    FirstName_en = FillItemForDatabase.FillItem(query.FirstName_en),
                    LastName_en  = FillItemForDatabase.FillItem(query.LastName_en)
                };
            }
            catch
            {
                throw;
            }
            return(model);
        }
Пример #7
0
        void Start()
        {
            //byte[] bytes = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_7764.JPG");
            //byte[] bytes = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_0655.JPG");
            byte[]    bytes   = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_0669.JPG");
            Texture2D texture = new Texture2D(1, 1);

            texture.LoadImage(bytes);


            CvContext cvContext = new CvContext(texture.width, texture.height);


            cvContext.SetImageDataFlipY(texture.GetRawTextureData(), 3);
            int numQrs = cvContext.DetectQrMarkers();

            if (numQrs == 0)
            {
                return;
            }

            var qr = cvContext.GetDetectedQrCorners()[0];

            DrawLine(texture,
                     0, 0,
                     texture.width - 1, 0);
            DrawLine(texture,
                     (int)qr.Corners[0].X, texture.height - 1 - (int)qr.Corners[0].Y,
                     (int)qr.Corners[1].X, texture.height - 1 - (int)qr.Corners[1].Y, Color.blue);
            DrawLine(texture,
                     (int)qr.Corners[1].X, texture.height - 1 - (int)qr.Corners[1].Y,
                     (int)qr.Corners[2].X, texture.height - 1 - (int)qr.Corners[2].Y);
            DrawLine(texture,
                     (int)qr.Corners[2].X, texture.height - 1 - (int)qr.Corners[2].Y,
                     (int)qr.Corners[3].X, texture.height - 1 - (int)qr.Corners[3].Y);
            DrawLine(texture,
                     (int)qr.Corners[3].X, texture.height - 1 - (int)qr.Corners[3].Y,
                     (int)qr.Corners[0].X, texture.height - 1 - (int)qr.Corners[0].Y);


            var detectedMarker = new DetectedARMarker
            {
                Type       = (byte)ARMarkerType.QrCode,
                Header     = new Header(0, default, TfListener.FixedFrameId),
Пример #8
0
        public CvVO GetCvByMemberId(int memberId)
        {
            CvVO model = new CvVO();

            try
            {
                using (var ctx = new CvContext())
                {
                    model = new CvDA().FindCvByMemberId(ctx, memberId);
                    if (model.Id != 0 && model.Member != null && model.MemberId != 0 && model.Member.Person != null && model.Member.PersonId != 0)
                    {
                        Task <List <AddressVO> > addrTask;
                        using (var ctxAddr = new AddressContext())
                        {
                            addrTask = Task.Run(() => new AddressDA().FindAddressesByPersonId(ctxAddr, model.Member.PersonId));
                            using (var ctxEmail = new EmailContext())
                            {
                                Task <List <EmailVO> > emailTask = Task.Run(() => new EmailDA().FindEmailsByPersonId(ctxEmail, model.Member.PersonId));
                                using (var ctxPhone = new PhoneContext())
                                {
                                    Task <List <PhoneVO> > phoneTask = Task.Run(() => new PhoneDA().FindPhonesByPersonId(ctxPhone, model.Member.PersonId));
                                    Task.WhenAll(phoneTask, addrTask, emailTask);
                                    model.Member.Person.Addresses = addrTask.Result;
                                    model.Member.Person.Emails    = emailTask.Result;
                                    model.Member.Person.Phones    = phoneTask.Result;
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(model);
        }
 public PersonalInformationsController(CvContext context)
 {
     _context = context;
 }
 public ImportScrapeData(CvContext dbCtx, cvParsers parsers, cvConfig cvConfiguration)
 {
     this.ctx             = dbCtx;
     this.parsers         = parsers;
     this.cvConfiguration = cvConfiguration;
 }
 /// <summary>
 ///  ctor
 /// </summary>
 public ScrapeImportController(CvContext context)
 {
     _context = context;
 }
 public ProjectsController(CvContext context)
 {
     _context = context;
 }
Пример #13
0
 public CompanyRepository(CvContext cvContext)
 {
     _cvContext = cvContext;
 }
Пример #14
0
 public SkillRepository(CvContext cvContext)
 {
     _cvContext = cvContext;
 }
Пример #15
0
 public CvRepository(CvContext cvContext)
 {
     _cvContext = cvContext;
 }
 /// <summary>
 ///  ctor
 /// </summary>
 public ScrapeRunsController(CvContext context)
 {
     _context = context;
 }
 public EducationsController(CvContext context)
 {
     _context = context;
 }
Пример #18
0
 public CvEntriesRepository(CvContext cvContext)
 {
     _cvContext = cvContext;
 }
Пример #19
0
 public UserReposistory(CvContext cvContext)
 {
     _cvContext = cvContext;
 }
Пример #20
0
 public WorksController(CvContext context)
 {
     _context = context;
 }
Пример #21
0
 public HomeController()
 {
     cvContext = new CvContext();
 }