예제 #1
0
 //Staff role choose button
 private void Staff_role_button_Click(object sender, EventArgs e)
 {
     SlideTimer.Start();
     sliding_panel.BringToFront();
     Role = "STAFF";
     //RoleTimer.Start();
 }
예제 #2
0
 //Admin role choose button
 private void Admin_role_button_Click(object sender, EventArgs e)
 {
     SlideTimer.Start();
     sliding_panel.BringToFront();
     Role = "ADMIN";
     //RoleTimer.Start();
 }
예제 #3
0
 //Trainer role choose button
 private void Trainer_role_button_Click(object sender, EventArgs e)
 {
     SlideTimer.Start();
     sliding_panel.BringToFront();
     Role = "TRAINER";
     //RoleTimer.Start();
 }
        private void SlideMenuBtn_Click(object sender, EventArgs e)
        {
            var button = allSliderPanels.First(b => b.Value.Equals(sender));

            orderSliderPanels.Add(new Tuple <Panel, Button>(button.Key, button.Value));
            SlideTimer.Start();
        }
예제 #5
0
 //Back button
 private void Back_button_Click(object sender, EventArgs e)
 {
     SlideTimer.Start();
     Role                              = "";
     Username_TB.Text                  = "Username";
     Password_TB.Text                  = "Password";
     Username_TB.ForeColor             = SystemColors.InactiveCaption;
     Password_TB.UseSystemPasswordChar = false;
     Password_TB.ForeColor             = SystemColors.InactiveCaption;
 }
예제 #6
0
        void Setup()
        {
            try
            {
                SlideInterval          = int.Parse(ConfigurationManager.AppSettings["SlideInterval"]);
                DetectorInterval       = int.Parse(ConfigurationManager.AppSettings["DetectorInterval"]);
                TimerDetector.Interval = DetectorInterval;
                SlideTimer.Interval    = SlideInterval;
                if (ImagePath == null)
                {
                    ImagePath = new List <string>();
                }
                if (ImageCounter == null)
                {
                    ImageCounter = new Dictionary <int, int>();
                }
                var mapFile = ConfigurationManager.AppSettings["MappingFile"];
                if (File.Exists(mapFile))
                {
                    var AllLines = File.ReadAllLines(mapFile);
                    foreach (var line in AllLines)
                    {
                        var path = line.Split(',')[1];
                        if (!Directory.Exists(path))
                        {
                            Directory.CreateDirectory(path);
                            Directory.CreateDirectory(path + "\\Male");
                            Directory.CreateDirectory(path + "\\Female");
                        }
                        ImagePath.Add(path);
                    }
                }

                if (Datas == null)
                {
                    Datas = new List <DetectionResult>();
                }
                _frame   = new Mat();
                detector = new DetectAgeGender();
                _capture = new VideoCapture();
                _capture.ImageGrabbed += _capture_ImageGrabbed;
                _capture.Start();
                TimerDetector.Start();
                SlideTimer.Start();
            }
            catch (NullReferenceException excpt)
            {
                MessageBox.Show(excpt.Message);
            }
        }
예제 #7
0
 private void Login_Load(object sender, EventArgs e)
 {
     pictureBox1.Visible = true;
     SlideTimer.Start();
     timer.Start();
 }
예제 #8
0
 private void PictureBox1_Click(object sender, EventArgs e)
 {
     SlideTimer.Start();
 }