Beispiel #1
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (MyMsg.Text.Length > 1048576)
     {
         MessageBox.Show("消息过长,无法发送", "提示", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
     Connection.SendMsg($"回复消息:\n{ClientMsg.Text}\n消息内容:\n{MyMsg.Text}",
                        UserHelper.CurrentUser.UserId == 0 ? 1 : UserHelper.CurrentUser.UserId, _userId, null);
     Close();
 }
Beispiel #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            var x = from c in _myClientInfo where c.IsChecked select c;

            foreach (var i in x)
            {
                Connection.SendMsg($"{Msg.Text}",
                                   UserHelper.CurrentUser.UserId == 0 ? 1 : UserHelper.CurrentUser.UserId, i.UserId, null);
            }
            Msg.Clear();
        }