當前位置: 首頁>>代碼示例>>C#>>正文


C# Chat.SendMessage方法代碼示例

本文整理匯總了C#中Chat.SendMessage方法的典型用法代碼示例。如果您正苦於以下問題:C# Chat.SendMessage方法的具體用法?C# Chat.SendMessage怎麽用?C# Chat.SendMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Chat的用法示例。


在下文中一共展示了Chat.SendMessage方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: send_message

        public void send_message(string username, string message)
        {
            var user = new User();

            var users = new UserCollection {user};

            var chat = new Chat();
            // chat.AddMembers(users);
            chat.SendMessage(message);
        }
開發者ID:MisterY,項目名稱:SkypeAPIPlayground,代碼行數:10,代碼來源:SkypeAdapter.cs

示例2: SendMessage

 /// <summary>
 /// 指定したチャットに、指定したメッセージを送信します。
 /// </summary>
 /// <param name="chat"></param>
 /// <param name="text"></param>
 private void SendMessage(Chat chat, string text)
 {
     chat.SendMessage(text);
 }
開發者ID:nishio-dens,項目名稱:Skype-Chat-Client,代碼行數:9,代碼來源:MainForm.cs

示例3: newUpdatesTest

 public void newUpdatesTest()
 {
     Chat chat = new Chat();
     Assert.IsFalse(chat.newUpdates(1), "Updates for a not existing chatter id");
     Chatter chatter = new Chatter(new Guid(), "chatter");
     chatter.intId = 2;
     chat.join(chatter);
     Assert.IsTrue(chat.newUpdates(chatter.intId), "No updates after joining");
     chat.iAmUpToDate(chatter.intId);
     Assert.IsFalse(chat.newUpdates(chatter.intId), "Updates after call 'I'm up to date'");
     chat.SendMessage("hallo");
     Assert.IsTrue(chat.newUpdates(chatter.intId), "No updates after receiving a new message");
     chat.iAmUpToDate(chatter.intId);
     chat.SendMessageTo("hallo", 1);
     Assert.IsFalse(chat.newUpdates(chatter.intId), "Updates after whispering to a different chatter");
     chat.SendMessageTo("hallo", 2);
     Assert.IsTrue(chat.newUpdates(chatter.intId), "No updates after whispering to this chatter");
 }
開發者ID:Andi1986,項目名稱:ChatApp,代碼行數:18,代碼來源:Chat_offlineTest.cs

示例4: InitBatle

        public void InitBatle(string Name, Chat ch, string donger)
        {
            Init();
            if (p1.nll == true)
            {
            Donger tmp=dongers.Find(x => x.dongerName == donger);
            if (tmp==null)
                p1 = new Player(Name, dongers[SeijaHelper.RandomProvider.GetThreadRandom().Next(0, dongers.Count)].Clone(), GetKonfaName(ch.Name));
            else
                p1 = new Player(Name, tmp.Clone(), GetKonfaName(ch.Name));
            ch.SendMessage("Первый игрок - " + p1.name + " и его донгер: \n\r" + p1.donger.Info + "\n\rОжидание второго игрока");
            ch1 = ch;
            restTimer = new System.Windows.Threading.DispatcherTimer();
            restTimer.Interval = new TimeSpan(0, 0, 30);
            restTimer.Tick += RestTick;
            restTimer.Start();
            }
            else
            {
            restTimer.Stop();
            ch2 = ch;
            if (Name == p1.name)
                p2 = new Player("SeijaBot", Donger.seija.Clone(), GetKonfaName(ch.Name));
            else
            {
                Donger tmp=dongers.Find(x => x.dongerName == donger);
                if (tmp == null)
                {
                    Donger temp;
                    do
                    {
                        temp = dongers[SeijaHelper.RandomProvider.GetThreadRandom().Next(0, dongers.Count)].Clone();
                    }
                    while (temp.dongerName == p1.donger.dongerName);
                    p2 = new Player(Name, temp.Clone(), GetKonfaName(ch.Name));
                }
                else
                    p2 = new Player(Name, tmp.Clone(), GetKonfaName(ch.Name));

            }
            SendMessages("Второй игрок - " + p2.name + " и его донгер: \n\r" + p2.donger.Info);
            StartBattle();
            }
        }
開發者ID:KanColleSoftFan,項目名稱:SeijaBot,代碼行數:44,代碼來源:Donger.cs

示例5: SendMessageTest1

 public void SendMessageTest1()
 {
     Chat chat = new Chat();
     for (int i = 0; i < 5; i++)
     {
         string message = "Another test message!!! " + i;
         string returnMessage = chat.SendMessage(message);
         Assert.IsTrue(returnMessage.Contains(message), "Run " + i + ": the message text was not used");
         Assert.AreEqual(returnMessage, chat.AllMessages[chat.AllMessages.Count - 1].Message, "Run " + i + ": the saved message is not the returned message");
         Assert.AreEqual(-1, chat.AllMessages[chat.AllMessages.Count - 1].id, "Run " + i + ": The message is not visible for all chatters");
     }
 }
開發者ID:Andi1986,項目名稱:ChatApp,代碼行數:12,代碼來源:Chat_offlineTest.cs

示例6: Leave

 public void Leave(Chat chat)
 {
     if (!chat.Equals(myChats[0])) {
         chat.leave(this);
         myChats.Remove(chat);
         chat.SendMessage("User [b]" + m_name + "[/b] left the Chat Room");
     }
     mainChat = 0;
 }
開發者ID:Andi1986,項目名稱:ChatApp,代碼行數:9,代碼來源:Chatter.cs

示例7: Join

 public void Join(Chat chat)
 {
     if (!myChats.Contains(chat)) {
         chat.join(this);
         myChats.Add(chat);
         chat.SendMessage("User [b]" + m_name + "[/b] has joined the Chat");
     }
 }
開發者ID:Andi1986,項目名稱:ChatApp,代碼行數:8,代碼來源:Chatter.cs

示例8: SendResponse

 public void SendResponse(Chat chat, string message)
 {
     chat.SendMessage(message);
 }
開發者ID:mikeclayton,項目名稱:AutoBot,代碼行數:4,代碼來源:SkypeSession.cs

示例9: SetSettingsGroup

 private void SetSettingsGroup(Chat group)
 {
     if (ToLink.IsChecked == true)
     {
         try {
             group.SendMessage("/set options +JOINING_ENABLED");
         }
         catch { }
         group.SendMessage("/get uri");
         group.SendMessage("Это ссылка для вступления в группу по ссылке.");
     }
     //if (HappyDay.IsChecked == true)
     //{
     //    group.SendMessage("/nobday");
     //}
     if (OldPosts.IsChecked==true)
     {
         try
         {
             group.SendMessage("/set options +HISTORY_DISCLOSED");
         }
         catch { }
     }
     if (UserAreListener.IsChecked == true)
     {
         try
         {
             group.SendMessage("/set options +USERS_ARE_LISTENERS");
         }
         catch { }
     }
     //if (FormatText.IsChecked == true)
     //{
     //    group.SendMessage("/wikimarkup off");
     //}
     try
     {
         group.SendMessage("/set options +TOPIC_AND_PIC_LOCKED_FOR_USERS");
     }
     catch { }
 }
開發者ID:Mopo3in,項目名稱:Skype-Tools,代碼行數:41,代碼來源:MainWindow.xaml.cs


注:本文中的Chat.SendMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。