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


C# Chat类代码示例

本文整理汇总了C#中Chat的典型用法代码示例。如果您正苦于以下问题:C# Chat类的具体用法?C# Chat怎么用?C# Chat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Chat类属于命名空间,在下文中一共展示了Chat类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Parse

        public NetworkObject Parse(Match match)
        {
            Chat chat = new Chat {
                Now = {
                    Players = new List<Player>() {
                        new Player() {
                            Name = match.Groups["name"].Value,
                            Uid = match.Groups["uniqueid"].Value
                        }
                    },
                    Content = new List<String>() {
                        match.Groups["text"].Value.Replace("\r", "")
                    }
                },
                Origin = ChatOrigin.Player
            };

            if (String.Compare(match.Groups["context"].Value, "say", StringComparison.OrdinalIgnoreCase) == 0) {
                chat.Scope.Groups = new GroupingList();
            }
            else {
                // Can we get a team identifier here?
                chat.Scope.Groups = new GroupingList() {
                    new Grouping() {
                        Type = Grouping.Team
                    }
                };
            }

            return chat;
        }
开发者ID:EBassie,项目名称:Potato,代码行数:31,代码来源:SourceChat.cs

示例2: NetworkWindow

 public NetworkWindow(NetworkInterface nif)
 {
     chat = new Chat(nif);
     chat.togglePos = new Rect(0,30,togglePos.width,25);
     nif.AddMessageRecipient((INetworkMessage)this);
     menus.Add(new MainContent(nif,this));
 }
开发者ID:PxcL,项目名称:Unity_Tic-Tac-Tower,代码行数:7,代码来源:NetworkWindow.cs

示例3: NetworkWindow

 public NetworkWindow(IGUIMessages receiver)
 {
     chat = new Chat(receiver);
     chat.togglePos = new Rect(0,30,togglePos.width,25);
     receiver.AddNetworkMessageRecipient((INetworkMessage)this);
     menus.Add(new MainContent(receiver,this));
 }
开发者ID:Arganato,项目名称:Unity_Tic-Tac-Tower,代码行数:7,代码来源:NetworkWindow.cs

示例4: onChatMessage

	public void onChatMessage(SocketModel model)
	{
		NoticeMessage.MsgChatRep msg = MsgSerializer.Deserialize<NoticeMessage.MsgChatRep>(model);

        Chat chat = new Chat();
        chat.uid = msg.uid;
        chat.name = msg.name;
        chat.type = msg.type;
        chat.data = msg.data;
		chat.targetUid = msg.target;
		if (msg.item != null) {
			chat.goods.guid = msg.item.guid;
			//server changed, client not change
//			chat.goods.number = msg.item.number;	
		}
        chat.targetName = msg.tarname;
        ChatManager chatManager = MonoInstancePool.getInstance<ChatManager>();
        if (chat.type == (int)GlobalDef.CHAT_CHANNEL.ALL_CHANNEL)
        {
            chatManager.setSystemChatList(chat);
			chatManager.setHaveNewSystemChat(true);
        }
        else if (chat.type == (int)GlobalDef.CHAT_CHANNEL.WORLD_CHANNEL)
        {
            chatManager.setWorldChatList(chat);
			chatManager.setHaveNewWorldChat(true);
        }
        else if (chat.type == (int)GlobalDef.CHAT_CHANNEL.PRIVATE_CHANNEL)
        {
            chatManager.setPrivateChatList(chat);
			chatManager.setHaveNewPrivateChat(true);
			//chatManager.setTargetId(chat.uid);
        }
        chatManager.setIsDirty(true);
	}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:35,代码来源:NoticeModuleMsg.cs

示例5: Start

 void Start()
 {
     game = GameObject.Find("Networking").GetComponent<Game>();
     sender = GameObject.Find("Networking").GetComponent<PacketSender>();
     chat = GameObject.Find("Chat").GetComponent<Chat>();
     side = GameObject.Find("SideObjects").GetComponent<SideObjects>();
 }
开发者ID:Wiebrendh,项目名称:MMORPG,代码行数:7,代码来源:ActionMenu.cs

示例6: RequestNewChat

 public void RequestNewChat(string auctionId, string participant, Message message)
 {
     CurrentChat = new Chat(auctionId, participant);
     CurrentChat.Message = message;
     Chats.Add(CurrentChat);
     OnChatCreated(EventArgs.Empty);
 }
开发者ID:frankidoze,项目名称:GOOS_sample_csharp,代码行数:7,代码来源:ChatManager.cs

示例7: Awake

        protected void Awake()
        {
            // force the twitch libraries to be loaded
            Twitch.Broadcast.UnityBroadcastController.LoadTwitchLibraries();

            m_Chat = new Chat(new CoreChatAPI());
        }
开发者ID:RELO4D3D,项目名称:sdk-dist,代码行数:7,代码来源:UnityChatController.cs

示例8: checkKey

 /// <summary>
 /// Chatオブジェクトが検索keyにHITするかどうかを判定する
 /// 検索keyは以下
 ///  個人チャットの場合     : 相手のskype名
 ///  グループチャットの場合 : 会話のタイトル
 /// </summary>
 /// <param name="key"></param>
 /// <param name="chat"></param>
 /// <returns></returns>
 private bool checkKey(string key, Chat chat)
 {
     try
     {
         textBox1.Text = "chat.Status: " + chat.Status + "\r\n" + textBox1.Text;
         //けっこうあいまいな判定
         switch (chat.Status)
         {
             case TChatStatus.chsDialog: //個人チャットかな~
                 //個人チャットの相手のskype名
                 if (key == chat.DialogPartner)
                 {
                     return true;
                 }
                 break;
             case TChatStatus.chsMultiSubscribed://グループチャットかな~
                 //グループチャットの会話のタイトル
                 if (key == chat.Topic)
                 {
                     return true;
                 }
                 break;
             default://分からん
                 break;
         }
         return false;
     }
     catch (Exception exp)
     {
         return false;
     }
 }
开发者ID:kikakubu-ksg,项目名称:SkypeJimaku,代码行数:41,代码来源:Skype.cs

示例9: Join

        public string[] Join(string name)
        {
            MyChat = new Chat(UserHandler);
            lock (syncObj)
            {
                if (!Chatter.Contains(name)) //이름이 기존 채터에 있는지 검색한다.
                {
                    //이름과 이벤트를 추가한다.
                    this.name = name;
                    Chatter.Add(name);

                    //사용자에게 보내 줄 채널을 설정한다.
                    callback = OperationContext.Current.GetCallbackChannel<IChatCallback>();

                    //현재 접속자 정보를 모두에게 전달
                    BroadcastMessage(name, "", "UserEnter");

                    //델리게이터 추가
                    List += MyChat;

                    //사용자리스트를 보내준다.
                    string[] list = new string[Chatter.Count];
                    lock (syncObj)
                    {
                        Chatter.CopyTo(list);
                    }
                    return list;
                }
                else //이미 사용자가 사용하고 있는 이름일 경우
                {
                    return null;
                }
            }
        }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:34,代码来源:ChatService.cs

示例10: CreateNewChat

 public static Chat CreateNewChat(Visitor v, Operator o)
 {
     Chat c = new Chat();
     c.AccountId = v.AccountId;
     c.OperatorId = o.OperatorId;
     c.VisitorId = v.VisitorId;
     return c;
 }
开发者ID:honj51,项目名称:ideacode,代码行数:8,代码来源:TestTool.cs

示例11: AddChat

 public void AddChat(Chat chatRequest)
 {
     string sql = string.Format("INSERT INTO LiveChat_Chat "+
         "(ChatId,CreateBy,CreateTime,AccountId,VisitorId,Status) "
     +"VALUES('{0}','{1}','{2}','{3}','{4}','{5}')" ,
         chatRequest.ChatId, chatRequest.CreateBy, chatRequest.CreateTime,chatRequest.AccountId, chatRequest.VisitorId, chatRequest.Status);
     DBHelper.ExecuteCommand(sql);
 }
开发者ID:honj51,项目名称:ideacode,代码行数:8,代码来源:SqlChatProvider.cs

示例12: CreateChat

 public Chat CreateChat(string auctionId, string participant, IMessageListener messageListener)
 {
     CurrentChat = new Chat(auctionId, participant);
     CurrentChat.AddIMessageListener(messageListener);
     Chats.Add(CurrentChat);
     OnChatCreated(EventArgs.Empty);
     return CurrentChat;
 }
开发者ID:frankidoze,项目名称:GOOS_sample_csharp,代码行数:8,代码来源:ChatManager.cs

示例13: ChatInterface

        public ChatInterface()
        {
            m_chat = new Chat();
            m_chat.Visible = true;
            m_chat.OnInput += OnChatInput;

            Overlay.System.Register(m_chat);
        }
开发者ID:imGoose,项目名称:SkyrimOnline,代码行数:8,代码来源:ChatInterface.cs

示例14: Accept

        public void Accept(Chat chat)
        {
            this.chat = chat;
            visitor = operatorServiceAgent.GetVisitorById(chat.VisitorId);
            initChat();

            operatorServiceAgent.AcceptChatRequest(chat.ChatId);
        }
开发者ID:honj51,项目名称:ideacode,代码行数:8,代码来源:ChatForm.cs

示例15: Awake

    void Awake()
    {
        Instance = this;

        mClient = LobbyManager.s_Singleton.client;

        NetworkServer.RegisterHandler(MSG_TYPE, OnServerPostChatMessage);
    }
开发者ID:kyousuke916,项目名称:Keep-Alive,代码行数:8,代码来源:Chat.cs


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