public static void Logout() { IsLogin = false; UserType = UserType.Indefinite; UserId = 0; UserStateChanged?.Invoke(); }
public static void Login(int userId, UserType type) { IsLogin = true; UserType = type; UserId = userId; UserStateChanged?.Invoke(); }
private void panel1_Click(object sender, EventArgs e) { IsOpen = !IsOpen; UserStateChanged?.Invoke(this, IsOpen); }
protected virtual void OnRaiseCustomEvent(UserStateChangedEventArgs e) { UserStateChanged?.Invoke(this, e); }
protected virtual void OnUserStateChanged(User user, Server server) { UserStateChanged?.Invoke(this, new UserStateChangedEvent(user, server, _client)); }