public RoomNavigationViewModel(IUiRoomService roomService, IUiGlobalRoomsService globalRoomsService) { _roomService = roomService; _globalRoomsService = globalRoomsService; _searchResults = new RoomInfoViewModel[0]; _globalRoomsService.SearchCompleted += HandleSearchCompleted; }
public MainWindowViewModel(IUiAuthenticationService authenticationService, IUserStateListener userStateListener, IUiRoomService roomService, IUiGlobalRoomsService globalRoomsService) { _authenticationService = authenticationService; _loginViewModel = new LoginViewModel(authenticationService, userStateListener); _roomNavigationViewModel = new RoomNavigationViewModel(roomService, globalRoomsService); LoginVisibility = Visibility.Visible; RoomNavigationVisiblity = Visibility.Collapsed; _authenticationService.LoginCompleted += HandleLoginCompleted; }
public MainWindowViewModel(IUiAuthenticationService authenticationService, IUiRoomService roomService, IUiGlobalRoomsService globalRoomsService, IUserStateService userStateService, IUiUserMessageService uiUserMessageService) { _authenticationService = authenticationService; _roomService = roomService; _loginViewModel = new LoginViewModel(authenticationService); _roomNavigationViewModel = new RoomNavigationViewModel(roomService, globalRoomsService); _roomStateViewModel = new RoomStateViewModel(_roomService, authenticationService, uiUserMessageService); _startStopViewModel = new StartStopViewModel(userStateService); ShowLogin(); _authenticationService.LoginCompleted += HandleLoginCompleted; }
public RoomNavigationViewModel(IUiRoomService roomService, IUiGlobalRoomsService globalRoomsService) { _roomService = roomService; _globalRoomsService = globalRoomsService; _searchResults = new RoomInfoViewModel[0]; JoinRoomCommand = new DelegateCommand(_ => { if (Selected == null) { return; } Message = "joining room.."; _roomService.JoinRoomAsync(Selected.RoomId); }); _roomService.JoinRoomCompleted += HandleJoinRoomCompleted; _globalRoomsService.SearchCompleted += HandleSearchCompleted; }