Esempio n. 1
0
        public ChatPageVM(string roomName, ObservableCollection <ChatItem> chatList, ObservableCollection <User> userList, SideItem sideItem)
        {
            ChatList = chatList;
            UserList = userList;
            SideItem = sideItem;
            RoomName = roomName;

            (CClient.serverlist[0] as CServer).ChatPage_Return_Callback.Add(RoomName, ReturnCallback);

            MessageSendCommand = new RelayParameterCommand(async(parameter) => await MessageSendAsync(parameter));
            ExitCommand        = new RelayCommand(async() => await ExitAsync());
        }
Esempio n. 2
0
        public LoginPageVM()
        {
            LoginCommand = new RelayParameterCommand(async(parameter) => await LoginAsync(parameter));

            Task.Run(() => Connect());
        }