Пример #1
0
        private async void LoadData()
        {
            string chatname = await Logic.GetChatName();

            if (string.IsNullOrEmpty(chatname))
            {
                ChatName.Focus();
            }
            else
            {
                ChatName.Text = chatname;
                joinButton.Focus();
            }
            joinButton.Text = item.IamMember ? "Leave Room" : "Join Room";
            titleLabel.Text = $"{item.Title} Room";

            if (!item.IamMember)
            {
                introText.Text             = $"Hey {chatname}, {Environment.NewLine}This is a new group and I feel you might just want to change your display name. {Environment.NewLine}Do this by typing something below or tap 'Random' to get a random name.{Environment.NewLine}Join the room afterwards to proceed.";
                introText.IsVisible        = true;
                save_name_button.IsVisible = false;
            }
            else
            {
                introText.IsVisible = false;
            }
        }
        public bool Equals(GroupOptionalConversation input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     GroupId == input.GroupId ||
                     (GroupId.Equals(input.GroupId))
                     ) &&
                 (
                     ConversationId == input.ConversationId ||
                     (ConversationId.Equals(input.ConversationId))
                 ) &&
                 (
                     ChatEnabled == input.ChatEnabled ||
                     (ChatEnabled != null && ChatEnabled.Equals(input.ChatEnabled))
                 ) &&
                 (
                     ChatName == input.ChatName ||
                     (ChatName != null && ChatName.Equals(input.ChatName))
                 ) &&
                 (
                     ChatSecurity == input.ChatSecurity ||
                     (ChatSecurity != null && ChatSecurity.Equals(input.ChatSecurity))
                 ));
        }
Пример #3
0
 private void ShowConnectClicked()
 {
     if (ChatName != null && !ChatName.Equals(""))
     {
         //Wenn kein Name eingegeben ist, kann er sich nicht verbinden
         Connected = true;
         clientVar = new Client("127.0.0.1", 10100, new Action <string>(NewMessageReceived), ClientDisconnected);
     }
 }
        public bool Equals(GroupOptionalConversationAddRequest input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     ChatName == input.ChatName ||
                     (ChatName != null && ChatName.Equals(input.ChatName))
                     ) &&
                 (
                     ChatSecurity == input.ChatSecurity ||
                     (ChatSecurity != null && ChatSecurity.Equals(input.ChatSecurity))
                 ));
        }
Пример #5
0
        public void sendToAllNames()
        {
            List<String> getNames = new List<String>();

            foreach (String names in connections.Values)
            {
                getNames.Add(names);
            }

            ChatName temp = new ChatName(getNames);

            foreach (IWebSocketConnection connection in connections.Keys)
            {
                connection.Send(JsonConvert.SerializeObject(temp));
            }
        }