private void Form1_Load(object sender, EventArgs e) { Login form = new Login(); form.ShowDialog(); actual_user.Text = Global.appUser; GetStatus(); currentTime.TextAlign = HorizontalAlignment.Center; StartTimer(); }
private void Form1_Load(object sender, EventArgs e) { Login form = new Login(); form.ShowDialog(); //Inicia el timer que va a servir para fichar StartTimer(); //Inicializar controles actual_user.Text = Global.appUser; currentTime.TextAlign = HorizontalAlignment.Center; observaciones_txt.Enabled = false; //Inicializar control de hora de ingreso hora_ingreso_dtp.Format = DateTimePickerFormat.Time; hora_ingreso_dtp.ShowUpDown = true; hora_ingreso_dtp.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 7, 0, 0); //Inicializar control de hora de egreso hora_egreso_dtp.Format = DateTimePickerFormat.Time; hora_egreso_dtp.ShowUpDown = true; hora_egreso_dtp.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0); GetStatus(); }
private void loginToolStripMenuItem_Click(object sender, EventArgs e) { Global.appUser = ""; actual_user.Text = ""; Login form = new Login(); form.ShowDialog(); actual_user.Text = Global.appUser; loginToolStripMenuItem.Text = "Logout"; GetStatus(); }