/// <summary> /// Initializes a new Instance of the RoomListWindow class; /// </summary> public RoomListWindow(string NickName) { InitializeComponent(); RoomListWindowViewModel vm = new RoomListWindowViewModel(NickName); DataContext = vm; if (vm.CloseAction == null) { vm.CloseAction = new Action(this.Close); } if (vm.OpenChatWindowAction == null) { vm.OpenChatWindowAction = new Action(() => { ChatWindow chatWindow = new ChatWindow(vm.SelectedRoom.Number); chatWindow.Show(); }); } if (vm.OpenChatWindowActionWithCreate == null) { vm.OpenChatWindowActionWithCreate = new Action(() => { ChatWindow chatWindow = new ChatWindow(vm.createRoomNumber); chatWindow.Show(); }); } }
/// <summary> /// Initializes a new instance of the CreateCommand class; /// </summary> public CreateCommand(RoomListWindowViewModel viewModel) { _ViewModel = viewModel; }
/// <summary> /// Initailizes a new instance of the RoomRefreshCommand class; /// </summary> public RefreshCommand(RoomListWindowViewModel viewModel) { _ViewModel = viewModel; }
public JoinCommand(RoomListWindowViewModel viewModel) { _ViewModel = viewModel; }