예제 #1
0
 private void mainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
 {
     // TODO: Add event handler implementation here.
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo);
     webcam.Start();
 }
예제 #2
0
        private void frmCheckIn_Load(object sender, EventArgs e)
        {
            try
            {
                // Loading webcam
                imgarray  = null;
                imgarray1 = null;
                webcam    = new WebCam();
                webcam.InitializeWebCam(ref pictureBox1);
                webcam.Start();

                // BC_CheckIn obj = new BC_CheckIn();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }


            BC_CheckIn obj = new BC_CheckIn();
            DataTable  dt, dt1 = new DataTable();

            dt = obj.GetAllVisitPurpose();

            if (dt.Rows.Count > 0)
            {
                cmbPurpose.DataSource    = dt;
                cmbPurpose.DisplayMember = "PurposeName";
                cmbPurpose.ValueMember   = "id";
            }
            cmbPurpose.SelectedIndex = 0;
            // cmbPurpose.Text = "Select Visit Purpose";

            dataGridViewX1.DataSource = obj.GetAllCheckINToday();
        }
예제 #3
0
        private void AddCustomer_Load(object sender, EventArgs e)
        {
            var customer = db.Customers.ToList();

            comboCustomerName.DataSource    = customer;
            comboCustomerName.DisplayMember = "CustomerName";
            comboCustomerName.ValueMember   = "CustomerID";

            comboCustomerName.Focus();

            var room = db.Rooms.ToList();

            textRoomNo.DataSource    = room;
            textRoomNo.DisplayMember = "RoomNo";
            textRoomNo.ValueMember   = "RoomNo";

            webcam = new WebCam();
            webcam.InitializeWebCam(ref pictureBox1);

            if (Login.Roll != "Admin")
            {
                btnUpdate.Enabled    = false;
                buttonDelete.Enabled = false;
            }

            Clear();
        }
예제 #4
0
        private void frmEntrance_Load(object sender, EventArgs e)
        {
            materialFlatButton2.Visible = false;
            if (File.Exists("Plate") == true)
            {
                //
            }
            else
            {
                StreamWriter swp = new StreamWriter("Plate.txt");
                swp.Close();
            }
            matlblError.Text = "";
            mattxtUserID.Focus();
            //    mattxtUserID.Text = "";
            StreamReader srS = new StreamReader("Settings.txt");

            string[] line = srS.ReadLine().Split(',');
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            if (line[2] == "Y")
            {
                webcam.Start();
            }
            // Set output point for video

            // Start video
            //    webcam.Start();
            pnlManual.Visible = false;
        }
예제 #5
0
        public AddPatient()
        {
            InitializeComponent();
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);

        }
예제 #6
0
 private void start_webcam_Click(object sender, EventArgs e)
 {
     webcam = new WebCam();
     webcam.InitializeWebCam(ref webcam_stream);
     webcam.Start();
     webcam_start = true;
 }
예제 #7
0
 private void btnCapture_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string root = @"C:\\Users\\Swamy\\source\\repos\\Velrooms-V2\\VelRooms\\Pictures";
         // If directory does not exist, don't even try
         if (Directory.Exists(root))
         {
             webcam = new WebCam();
             webcam.InitializeWebCam(ref imgVideo);
             webcam.Start();
             if (imgVideo.Source == null)
             {
                 Camerapopup.IsOpen = false;
                 MessageBox.Show("Please connect a web camera and try again");
             }
             else
             {
                 Camerapopup.IsOpen = true;
             }
         }
         else
         {
             MessageBox.Show("The Specified Folder Path of images is not Correct. Please Contact To Velsol.!");
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Please connect a web camera and try again");
     }
 }
예제 #8
0
 private void PhotoButton_OnClick(object sender, RoutedEventArgs e)
 {
     _webCam = new WebCam();
     _webCam.InitializeWebCam(ref ImgVideo);
     _webCam.Start();
     ImgVideo.Visibility = Visibility.Visible;
     ViewModel.IsPhoto   = false;
 }
예제 #9
0
        public AddFamily(string id)
        {
            patient = id;
            InitializeComponent();
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);

        }
예제 #10
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            webcam = new WebCam();

            webcam.InitializeWebCam(ref imgVideo);

            webcam.Start();
        }
예제 #11
0
 private void ClearPic()
 {
     TestingData.ProfilePhoto = new BitmapImage();
     webcam = new WebCam();
     webcam.InitializeWebCam(ref profileImg);
     webcam.Start();
     _isCameraOn = true;
 }
예제 #12
0
        public CameraControl()
        {
            InitializeComponent();

            webCam = new WebCam();
            webCam.InitializeWebCam(ref imgVideo);
            ImageVideo = imgVideo;
        }
예제 #13
0
        private void debtors_Load(object sender, EventArgs e)
        {
            search("");


            webcam = new WebCam();
            webcam.InitializeWebCam(ref picface);
            webcam.Start();
        }
예제 #14
0
        public static void initWebCam()
        {
            imgVideo      = new System.Windows.Forms.PictureBox();
            imgVideo.Size = new System.Drawing.Size(163, 160);

            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            webcam.Start();
        }
예제 #15
0
        public CameraPage()
        {
            InitializeComponent();

            alertDlg.Visibility = Visibility.Collapsed;
            ProfilePhoto        = null;
            webcam = new WebCam();
            webcam.InitializeWebCam(ref profileImg);
            webcam.Start();
        }
예제 #16
0
        private void pictureWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            // TODO: Add event handler implementation here.
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            webcam.Start();

            _countdownTimer = new DispatcherTimer();
            _countdownTimer.Interval = new TimeSpan(0, 0, 1);
            _countdownTimer.Tick += new EventHandler(CountdownTimerStep);

        }
예제 #17
0
        public Dashboard(AppData data)
        {
            InitializeComponent();
            cam.InitializeWebCam(ref pictureBox2);

            Data           = new AppData();                     // Create the application data object
            Data.OnChange += delegate { ExchangeData(false); }; // Track data changes to keep the form synchronized
            Enroller       = new EnrollmentForm(Data);


            ExchangeData(false);
        }
예제 #18
0
        private void frm_camera_Load(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.Default;
            webcam         = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            webcam.Start();

            if (File.Exists(path))
            {
                File.Delete(path);
            }
        }
예제 #19
0
        public AgentUI()
        {
            try
            {
                InitializeComponent();


                webcam = new WebCam();
                webcam.InitializeWebCam(ref ImageR);
            }
            catch (Exception ex)
            {
                this.Close();
                MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #20
0
        public AgentUI(long AgentID)
        {
            try
            {
                InitializeComponent();


                var c = Glob.CustomersAndAgents.Agents_Partial.Select_Row_Agent(AgentID);

                AgentIDForUpdateUse = c.ID;

                FirstName_Txt.Text        = c.FIRST_NAME;
                LAST_NAMETxt.Text         = c.LAST_NAME;
                Address_Txt.Text          = c.ADDRESS;
                Mobile_Txt.Text           = c.MOBILE_NO;
                EmailTxt.Text             = c.EMAIL;
                StatusToggle.Checked      = c.STATUS;
                Agent_From_Date_link.Text = c.AGENT_FROM.ToLongDateString();
                ImageR.Image = Glob.CacheData.Glob_Veriables.GetImageFromByteArray(c.PICTURE);



                webcam = new WebCam();
                webcam.InitializeWebCam(ref ImageR);


                Panel_info_Extra.Show();
                // Availibility_Toggle.Show();
                Panel_pictureControls.Hide();
                Edit_Btn.Show();
                Cancel_Edit_btn.Show();
                StatusToggle.Show();

                Main_Info_Panel.Enabled = false;
                SAVE_New_Customer_Btn.Hide();

                ImageR.Region = Glob.CacheData.Glob_Veriables.GetRoundRegion(ImageR.Width, ImageR.Height);
                this.Text     = "AGENT " + c.FIRST_NAME.ToUpper() + " ID# " + c.ID.ToString();
            }
            catch (Exception ex)
            {
                this.Close();
                MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #21
0
 private async void TomarFotoLoad(TomarFotoSenaParticularView Window = null)
 {
     try
     {
         if (!((System.Windows.UIElement)(Window.TomarFotoSenaParticularWindow)).IsVisible)
         {
             return;
         }
         CamaraWeb = new WebCam(new WindowInteropHelper(Application.Current.Windows[0]).Handle);
         await CamaraWeb.InitializeWebCam(new List <System.Windows.Controls.Image> {
             Window.ImgSenaParticular
         });
     }
     catch (Exception ex)
     {
         StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar cámara", ex);
     }
 }
        public MainScreenCanvas()
        {
            InitializeComponent();
            MWwebcam = new WebCam();
            MWwebcam.InitializeWebCam(ref MSSelectedArea.imgVideo);
            MWwebcam.ToCrap += MWwebcam_ToCrap; //Helper.MWwebcam_ToCrap;

            _FrameImageCropTop    = MSScreenResults.imgVideoResTop;
            _FrameImageCropBottom = MSScreenResults.imgVideoBottom;
            _FrameImageCropDiff   = MSScreenResults.imgVideoDiff;
            _pakaz  = MSSelectedArea.pakaz;//MSScreenResults.pakaz;
            _result = MSScreenResults.Result;
            // DiffDate = DateTime.Now;

            // row = 1;
            //  DiffoXL = new Microsoft.Office.Interop.Excel.Application();
            //DiffoWB = DiffoXL.Workbooks.Open(string.Format(@"{0}\{1:s}.xlsx", Environment.CurrentDirectory, DiffDate.ToString("MM-dd-HH-mm-ss")));
            //  DiffoXL.Workbooks.Add();
            //  DiffoSheet = DiffoXL.ActiveSheet;//String.IsNullOrEmpty("GlucoseMonitoring") ? (Microsoft.Office.Interop.Excel._Worksheet)DiffoWB.ActiveSheet : (Microsoft.Office.Interop.Excel._Worksheet)DiffoWB.Worksheets["GlucoseMonitoring"];
        }
예제 #23
0
 private void frmCamera_Load(object sender, EventArgs e)
 {
     try
     {
         webcam = new WebCam();
         webcam.InitializeWebCam(ref imgVideo);
         if (webcam == null)
         {
             MessageBox.Show("No se encontró cámara instalada en el equipo.");
         }
         else
         {
             webcam.Start();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
예제 #24
0
        public OurCompanyProfileUI()
        {
            InitializeComponent();

            webcam = new WebCam();
            webcam.InitializeWebCam(ref ImageR);

            var rr = WARPRO.Glob.CustomersAndAgents.Glob_OurCompanyProfile.Get_Select_Row_OurCompanyProfile();



            Edit_Btn.Show();

            Cancel_Edit_btn.Show();
            Main_Info_Panel.Enabled = false;
            Panel_info_Extra.Show();

            //



            CompanyName_Txt.Text = rr.COMPANY_NAME;
            Owner_NAME_Txt.Text  = rr.OWNER_NAME;

            Address_Txt.Text        = rr.ADDRESS;
            Company_Mobile_Txt.Text = rr.COMPANY_MOBILE_NO;
            Extra_Mobile_Txt.Text   = rr.EXTRA_MOBILE_NO;
            Owner_Mobile_Txt.Text   = rr.OWNER_MOBILE_NO;

            EmailTxt.Text        = rr.EMAIL;
            Extra_Email_Txt.Text = rr.EXTRA_EMAIL;

            Extra_Details_Txt.Text = rr.EXTRA_DETAILS;

            Company_From_Date_link.Text = rr.LAST_CHANGE_DATE.ToLongDateString();

            if (rr.IMAGE != null)
            {
                ImageR.Image = WARPRO.Glob.CacheData.Glob_Veriables.GetImageFromByteArray(rr.IMAGE);
            }
        }
예제 #25
0
        private void FrmModificarPropietario_Load(object sender, EventArgs e)
        {
            webcam = new WebCam();
            webcam.InitializeWebCam(ref ptbFotoModificarPropietario);
            // llenar combo
            cmbClienteModificarForaneo.DataSource    = clientes.getAll();
            cmbClienteModificarForaneo.DisplayMember = "sNombre";
            cmbClienteModificarForaneo.ValueMember   = "pkCliente";

            cmbClienteModificarForaneo.SelectedIndex = indexrol;

            propietarios pprop = propietarios.Getallprpo(FrmCatalogoPropietario.propf);

            txtNombreCompletoModificarPropietario.Text    = pprop.sNombre;
            txtDireccionCompletaModificarPropietario.Text = pprop.sDireccion;
            txtCorreoModificarPropietario.Text            = pprop.sCorreo;
            txtTelefonoModificarPropietario.Text          = pprop.sTelefono;
            txtIFEModificarPropietario.Text = pprop.iIfe;
            textBox1.Text = pprop.sFoto;
            cmbClienteModificarForaneo.SelectedValue = pprop.Cliente_pkCliente;
        }
예제 #26
0
        private void FrmAgregarPropietarioAuto_Load_1(object sender, EventArgs e)
        {
            webcam = new WebCam();
            webcam.InitializeWebCam(ref pcbTomaFoto);

            cmbClienteForaneo.DataSource    = clientes.getAll();
            cmbClienteForaneo.DisplayMember = "sNombre";
            cmbClienteForaneo.ValueMember   = "pkCliente";
            cmbClienteForaneo.SelectedIndex = indexrol;


            cmbPropietarioForaneo.DataSource    = propietarios.getAll(true);
            cmbPropietarioForaneo.DisplayMember = "sNombre";
            cmbPropietarioForaneo.ValueMember   = "pkPropietario";
            cmbPropietarioForaneo.SelectedIndex = indx;

            txtNombreCompletoPropietario.Text    = this.sNombre;
            txtDireccionCompletaPropietario.Text = this.sDireccion;
            txtCorreoPropietario.Text            = this.sCorreo;
            txtTelefonoPropietario.Text          = this.sTelefono;
            txtIFEPropietario.Text = this.iIfe;
            cmbClienteForaneo.Text = this.Cliente_pkCliente;
        }
 private void LblWebCam_Click(object sender, EventArgs e)
 {
     try
     {
         if (lblWebCam.Text == "استفاده از WebCam")
         {
             wb.InitializeWebCam(ref picPerssonel);
             try
             {
                 wb.Start();
             }
             catch
             {
             }
             finally
             {
                 wb.Continue();
                 lblWebCam.Text = "عکس گرفتن";
             }
         }
         else if (lblWebCam.Text == "عکس گرفتن")
         {
             wb.Stop();
             lblWebCam.Text = "استفاده از WebCam";
             var image = picPerssonel.Image;
             var Name  = Guid.NewGuid().ToString() + ".jpg";
             var path  = Path.Combine(Application.StartupPath + "\\pictures\\Customer", Name);
             image.Save(path);
             Pic = Name;
         }
     }
     catch (Exception ex)
     {
         frmMessage f = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, ex.Message);
         f.ShowDialog();
     }
 }
        //fotos
        private async void TomarFotoLoad(TomarFotoSenaParticularView Window = null)
        {
            try
            {
                if (!((System.Windows.UIElement)(Window.TomarFotoSenaParticularWindow)).IsVisible)
                {
                    return;
                }
                CamaraWeb = new WebCam(new WindowInteropHelper(Application.Current.Windows[0]).Handle);
                await CamaraWeb.InitializeWebCam(new List <System.Windows.Controls.Image> {
                    Window.ImgSenaParticular
                });

                if (SelectedLiberacion.ImagenEgreso != null)
                {
                    ImagenEgreso = SelectedLiberacion.ImagenEgreso;
                    CamaraWeb.AgregarImagenControl(Window.ImgSenaParticular, new Imagenes().ConvertByteToImageSource(ImagenEgreso));
                }
            }
            catch (Exception ex)
            {
                StaticSourcesViewModel.ShowMessageError("Algo pasó..", "Ocurrió un error al cargar la pantalla para tomar foto.", ex);
            }
        }
 private void btnWebCam_Click(object sender, EventArgs e)
 {
     if (btnWebCam.Text == "WebCam")
     {
         wb.InitializeWebCam(ref PictureBox);
         try
         {
             wb.Start();
         }
         catch
         {
         }
         finally
         {
             wb.Continue();
             btnWebCam.Text = "Capture";
         }
     }
     else if (btnWebCam.Text == "Capture")
     {
         wb.Stop();
         btnWebCam.Text = "WebCam";
     }
 }
예제 #30
0
 public Settings()
 {
     InitializeComponent();
     webCam.InitializeWebCam(ref pictureBox1);
 }
 public MainWindow()
 {
     InitializeComponent();
     webcam = new WebCam();
     webcam.InitializeWebCam(ref captureImage);
 }
예제 #32
0
 private void AddPicture_Load(object sender, EventArgs e)
 {
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgCapture);
 }
예제 #33
0
 private void frmRegister_Load(object sender, EventArgs e)
 {
     webcam = new WebCam();
     webcam.InitializeWebCam(ref picCapture);
 }