当前位置: 首页>>代码示例>>C#>>正文


C# ChatType类代码示例

本文整理汇总了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;
 }
开发者ID:Everlight,项目名称:DesertProject,代码行数:7,代码来源:SpChat.cs

示例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;
        }
开发者ID:Boboo99,项目名称:Infinity-Script,代码行数:25,代码来源:BadWords.cs

示例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);
 }
开发者ID:edwinr,项目名称:VPNet,代码行数:10,代码来源:Chat.cs

示例4: SpChatMessage

 public SpChatMessage(Player player, string message, ChatType type, bool sysmsg = false)
 {
     Player = player;
     Message = message;
     Type = type;
     IsSystemMessage = sysmsg;
 }
开发者ID:mMellowz,项目名称:revcore,代码行数:7,代码来源:SpChatMessage.cs

示例5: ChatMessage

 public ChatMessage(Character sender, ChatType type, int dest, string message)
 {
     this.Sender = sender;
     this.Type = type;
     this.Destination = dest;
     this.Message = message;
 }
开发者ID:KtBkkr,项目名称:Asteria,代码行数:7,代码来源:ChatProcessor.cs

示例6: SendMessage

        public void SendMessage(ChatType type, string message)
        {
            if (type == ChatType.Private)
                return;

            SendMessage(type, new Character(), message);
        }
开发者ID:neo1106,项目名称:l2script,代码行数:7,代码来源:Commands.cs

示例7: ChatModel

 protected ChatModel(string id, string name, ChatType chatType, IProtocolManager networkManager)
 {
     _ID = id;
     _Name = name;
     _ChatType = chatType;
     _ProtocolManager = networkManager;
 }
开发者ID:RoninBG,项目名称:smuxi,代码行数:7,代码来源:ChatModel.cs

示例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));
        }
开发者ID:SObS,项目名称:SLeek,代码行数:7,代码来源:SLNetCom.cs

示例9: Read

 public override void Read()
 {
     Type = (ChatType)ReadC();
     RecvName = ReadSN();
     ReadB(7);
     Message = ReadS();
 }
开发者ID:mMellowz,项目名称:revcore,代码行数:7,代码来源:RpChatMessage.cs

示例10: BaseChat

 public BaseChat(ChatType chatType, string message)
 {
     packet.Type(1006);
     packet.WriteShort((short)chatType);
     packet.WriteString(message);
     packet.WriteByte(0);
 }
开发者ID:TonGIZa,项目名称:Digital-World,代码行数:7,代码来源:Chat.cs

示例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;
        }
开发者ID:NullProjects,项目名称:METAbolt,代码行数:34,代码来源:frmSpelling.cs

示例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;
 }
开发者ID:jakepetroules,项目名称:jakes-3d-mmo,代码行数:15,代码来源:ChatPacket.cs

示例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;
        }
开发者ID:fuding,项目名称:Snowlight,代码行数:59,代码来源:RoomChatComposer.cs

示例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);
     }
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:9,代码来源:Program.cs

示例15: ChatViewAddedEventArgs

 public ChatViewAddedEventArgs(ChatModel chatModel, string chatId,
                               ChatType chatType, int chatPosition,
                               Type protocolManagerType)
 {
     ChatModel = chatModel;
     ChatID = chatId;
     ChatType = chatType;
     ChatPosition = chatPosition;
     ProtocolManagerType = protocolManagerType;
 }
开发者ID:grendello,项目名称:smuxi,代码行数:10,代码来源:ChatViewSyncManager.cs


注:本文中的ChatType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。