public void _ReceiveSay(Beetle.IChannel channel, Logic.Say e) { string message = string.Format(@"\viewkind4\uc1\pard\sa200\sl276\slmult1\lang2052\f0\cf1\fs22 {0} \cf0 {2} IP:{1} \cf0\line {3}", e.User.Name, e.User.IP, DateTime.Now, e.Body); Invoke(new Action <string>(msg => { addSay(msg); }), message); }
public void _Say(IChannel channel, Logic.Say e) { e.User.Name = channel.Name; e.User.IP = channel.EndPoint.ToString(); foreach (IChannel item in mServer.GetOnlines()) { if (item != channel) { item.Send(e); } } Console.WriteLine("{0} say", e.User.Name); }
private void cmdSend_Click(object sender, EventArgs e) { string tmp = richSay.Rtf; int startindex, endindex; startindex = tmp.IndexOf(@"\viewkind4"); endindex = tmp.LastIndexOf("}"); tmp = tmp.Substring(startindex, endindex - startindex); tmp= tmp.Replace("\\pard", "\\pard\\li220"); string message = string.Format(@"\viewkind4\uc1\pard\sa200\sl276\slmult1\lang2052\f0\cf1\fs22 {0} \cf0 {1} \cf0\line {2}", txtUserName.Text, DateTime.Now, tmp); richSay.Rtf = ""; richSay.Focus(); addSay(message); Logic.Say say = new Logic.Say(); say.Body = tmp; mChannel.Send(say); }
private void cmdSend_Click(object sender, EventArgs e) { string tmp = richSay.Rtf; int startindex, endindex; startindex = tmp.IndexOf(@"\viewkind4"); endindex = tmp.LastIndexOf("}"); tmp = tmp.Substring(startindex, endindex - startindex); tmp = tmp.Replace("\\pard", "\\pard\\li220"); string message = string.Format(@"\viewkind4\uc1\pard\sa200\sl276\slmult1\lang2052\f0\cf1\fs22 {0} \cf0 {1} \cf0\line {2}", txtUserName.Text, DateTime.Now, tmp); richSay.Rtf = ""; richSay.Focus(); addSay(message); Logic.Say say = new Logic.Say(); say.Body = tmp; mChannel.Send(say); }