private void frmMain_Load(object sender, EventArgs e) { try { //login UserApiClient _userApiClient = new UserApiClient(Core.Client); //user RoleApiClient apiClientRole = new RoleApiClient(Core.Client); _userController = new UserController(_userApiClient, apiClientRole); // timer1.Enabled = true; timerCheckLogin.Enabled = true; MasterList.Innit(Core.User, Core.Path); if (Core.IsLogin) { lbUser.Text = Core.User; } else { lbUser.Text = "no login"; if (!_userController.IsLogin()) { Login(); } } } catch (Exception) { } }