public void AdminGameRoom(string id)
        {
            ChatroomSessionBase session;
            if (_chatroomUsage.TryGetValue(id, out session))
            {
                GameRoomSession gameRoomSession = session as GameRoomSession;

                GameRoomAdminDialogModelView modelView = new GameRoomAdminDialogModelView();
                modelView.Init(this, gameRoomSession);

                GameRoomAdminDialog dialog = new GameRoomAdminDialog();
                dialog.DataContext = modelView;
                dialog.ShowDialog();
                RefreshAdminsList(dialog, modelView);

                if (dialog.DialogResult == true)
                {
                    modelView.UpdateGameRoomSettings();
                }
            }
        }
 private void RefreshAdminsList(GameRoomAdminDialog dialog, GameRoomAdminDialogModelView modelView)
 {
     var adminsCollection = dialog.adminsListBox.Items;
     PgUser[] admins = new PgUser[adminsCollection.Count];
     for (int i = 0; i < admins.Length; i++)
         admins[i] = (PgUser)adminsCollection[i];
     modelView.Admins = admins;
 }