Example #1
0
        public static void Logout()
        {
            IsLogin  = false;
            UserType = UserType.Indefinite;
            UserId   = 0;

            UserStateChanged?.Invoke();
        }
Example #2
0
        public static void Login(int userId, UserType type)
        {
            IsLogin  = true;
            UserType = type;
            UserId   = userId;

            UserStateChanged?.Invoke();
        }
Example #3
0
 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));
 }