本文整理汇总了C#中ChatType类的典型用法代码示例。如果您正苦于以下问题:C# ChatType类的具体用法?C# ChatType怎么用?C# ChatType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChatType类属于命名空间,在下文中一共展示了ChatType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SpChat
public SpChat(string message, int sessionId, string characterName, ChatType chatType)
{
_message = message;
_sessionId = sessionId;
_characterName = characterName;
_chatType = chatType;
}
示例2: OnSay3
public override EventEat OnSay3(Entity player, ChatType type, string name, ref string message)
{
string[] splitmsg = message.ToLower().Split(' ');
foreach (string word in splitmsg)
{
if (BadWordsList.Contains(word))
{
if (!player.HasField("warnsbadwords")) player.SetField("warnsbadwords", new Parameter(0));
if (player.GetField<int>("warnsbadwords") >= 2)
{
Utilities.RawSayAll("^1BAD^2WORDS^3: " + player.Name + " got kicked for ^1Bad^2words");
Utilities.ExecuteCommand("dropclient " + player.EntRef + " \"" + "^3Bad ^2words ^1DETECTED" + "\"");
return EventEat.EatGame;
}
else
{
Utilities.RawSayTo(player, "Don't use any ^1offensive ^2language");
player.SetField("warnsbadwords",player.GetField<int>("warnsbadwords") + 1);
return EventEat.EatGame;
}
}
}
return EventEat.EatNone;
}
示例3: ConsoleMessage
/// <summary>
/// Creates a ConsoleMessage from a native instance's attributes
/// </summary>
internal ConsoleMessage(IntPtr pointer)
: base(pointer)
{
Color = new Color(pointer);
Type = (ChatType) Functions.vp_int(pointer, IntAttributes.ChatType);
Effect = (ChatEffect) Functions.vp_int(pointer, IntAttributes.ChatType);
}
示例4: SpChatMessage
public SpChatMessage(Player player, string message, ChatType type, bool sysmsg = false)
{
Player = player;
Message = message;
Type = type;
IsSystemMessage = sysmsg;
}
示例5: ChatMessage
public ChatMessage(Character sender, ChatType type, int dest, string message)
{
this.Sender = sender;
this.Type = type;
this.Destination = dest;
this.Message = message;
}
示例6: SendMessage
public void SendMessage(ChatType type, string message)
{
if (type == ChatType.Private)
return;
SendMessage(type, new Character(), message);
}
示例7: ChatModel
protected ChatModel(string id, string name, ChatType chatType, IProtocolManager networkManager)
{
_ID = id;
_Name = name;
_ChatType = chatType;
_ProtocolManager = networkManager;
}
示例8: ChatOut
public void ChatOut(string chat, ChatType type, int channel)
{
if (!loggedIn) return;
client.Self.Chat(chat, channel, type);
OnChatSent(new ChatSentEventArgs(chat, type, channel));
}
示例9: Read
public override void Read()
{
Type = (ChatType)ReadC();
RecvName = ReadSN();
ReadB(7);
Message = ReadS();
}
示例10: BaseChat
public BaseChat(ChatType chatType, string message)
{
packet.Type(1006);
packet.WriteShort((short)chatType);
packet.WriteString(message);
packet.WriteByte(0);
}
示例11: frmSpelling
public frmSpelling(METAboltInstance instance, string sentence, string[] swords, ChatType type)
{
InitializeComponent();
this.instance = instance;
afffile = this.instance.AffFile; // "en_GB.aff";
dicfile = this.instance.DictionaryFile; // "en_GB.dic";
string[] idic = dicfile.Split('.');
dic = dir + idic[0];
if (!System.IO.File.Exists(dic + ".csv"))
{
System.IO.File.Create(dic + ".csv");
}
try
{
hunspell.Load(dir + afffile, dir + dicfile); //("en_us.aff", "en_us.dic");
ReadWords();
}
catch
{
//string exp = ex.Message;
}
//words = sentence;
richTextBox1.Text = sentence;
this.swords = swords;
this.ctype = type;
ischat = true;
}
示例12: ChatPacket
/// <summary>
/// Initializes a new instance of the ChatPacket class.
/// This overload should be used by the server because
/// the client needs to know who sent the message.
/// </summary>
/// <param name="chat">The text of the chat message.</param>
/// <param name="sender">The player who sent the chat message.</param>
/// <param name="chatType">The type of chat.</param>
public ChatPacket(string chat, string sender, ChatType chatType)
: base()
{
this.Chat = chat;
this.Sender = sender;
this.ChatType = chatType;
}
示例13: Compose
public static ServerMessage Compose(uint ActorId, string MessageText, int EmotionId, ChatType ChatType)
{
StringBuilder TextBuilder = new StringBuilder();
Dictionary<int, string> LinkRefs = new Dictionary<int, string>();
string[] Bits = MessageText.Split(' ');
int i = 0;
int j = 0;
foreach (string Bit in Bits)
{
if (j > 0)
{
TextBuilder.Append(' ');
}
if (Bit.StartsWith("http://"))
{
LinkRefs.Add(i, Bit);
TextBuilder.Append("{" + i++ + "}");
}
else if (Bit.StartsWith("www."))
{
LinkRefs.Add(i, Bit);
TextBuilder.Append("{" + i++ + "}");
}
else
{
TextBuilder.Append(Bit);
}
j++;
}
ServerMessage Message = new ServerMessage(ChatType == ChatType.Say ? OpcodesOut.ROOM_CHAT_SAY : (ChatType ==
ChatType.Whisper ? OpcodesOut.ROOM_CHAT_WHISPER : OpcodesOut.ROOM_CHAT_SHOUT));
Message.AppendUInt32(ActorId);
Message.AppendStringWithBreak(TextBuilder.ToString());
Message.AppendInt32(EmotionId);
Message.AppendInt32(LinkRefs.Count);
foreach (KeyValuePair<int, string> LinkedRef in LinkRefs)
{
string Url = LinkedRef.Value;
if (!Url.StartsWith("http://"))
{
Url = "http://" + Url;
}
Message.AppendStringWithBreak("/link_to.php?url=" + HttpUtility.UrlEncode(Url) + "&hash=xx");
Message.AppendStringWithBreak(LinkedRef.Value);
Message.AppendBoolean(false); // Trusted URL (instaopen)
}
Message.AppendInt32(0); // No idea
Message.AppendBoolean(true);
return Message;
}
示例14: Self_OnChat
static void Self_OnChat(string message, ChatAudibleLevel audible, ChatType type, ChatSourceType sourceType, string fromName, UUID id, UUID ownerid, Vector3 position)
{
if (fromName != _Client.Self.Name && type == ChatType.Normal && audible == ChatAudibleLevel.Fully)
{
string str = "<" + fromName + "> " + message;
_IRC.SendMessage(_AutoJoinChannel, str);
Console.WriteLine("[SL->IRC] " + str);
}
}
示例15: ChatViewAddedEventArgs
public ChatViewAddedEventArgs(ChatModel chatModel, string chatId,
ChatType chatType, int chatPosition,
Type protocolManagerType)
{
ChatModel = chatModel;
ChatID = chatId;
ChatType = chatType;
ChatPosition = chatPosition;
ProtocolManagerType = protocolManagerType;
}