예제 #1
0
        void dialog_LostFocused(IFocusable sender, FocusEventArgs args)
        {
            var dialog = sender as UserMenuDialog;

            if (dialog.Selected)
            {
                sound.Play(PPDSetting.DefaultSounds[1], -1000);
                UserMenuDialog.Mode mode = dialog.SelectedMode;
                switch (mode)
                {
                case UserMenuDialog.Mode.ChangeLeader:
                    ChangeLeader?.Invoke(this, EventArgs.Empty);
                    break;

                case UserMenuDialog.Mode.Kick:
                    KickUser?.Invoke(this, EventArgs.Empty);
                    break;
                }
            }

            this.RemoveChild(dialog);
        }
예제 #2
0
파일: LeftMenu.cs 프로젝트: KHCmaster/PPD
 void userSelectComponent_ChangeLeader(object sender, EventArgs e)
 {
     ChangeLeader?.Invoke(userSelectComponent.SelectedUser);
 }