// methods public bool setUser(string login,string password) { this.currentUser = dbUsers.getUser(login,password); if(this.currentUser != null) { validUserLoggedInEventArgs args = new validUserLoggedInEventArgs(login); validUserLoggedIn(this,args); return true; } return false; }
// app event handlers void app_validUserLoggedIn(object sender,validUserLoggedInEventArgs e) { fillMenu(app.currentUser.getMenuItems()); }