Exemple #1
0
        /// <summary>
        /// チャットの通知を発行するメソッド
        /// </summary>
        /// <param name="message">変更のあったチャット</param>
        /// <param name="status">変更後のチャットステータス</param>
        /// <param name="image">通知に使うビットマップイメージ</param>
        public void RunNotificationMessageStatus(SKYPE4COMLib.ChatMessage message, SKYPE4COMLib.TChatMessageStatus status, Bitmap image = null)
        {
            string name  = String.IsNullOrEmpty(message.Sender.FullName) ? "表示名がありません" : message.Sender.FullName;
            string title = String.Format("{0}({1})さんからのチャット", name, message.Sender.Handle);

            var context = MakeCallbackContext(NotificationTypeChatReceived.Name, message.Chat.Name);

            var notification = new Notification(ApplicationName, NotificationTypeChatReceived.Name, DateTime.Now.Millisecond.ToString(CultureInfo.InvariantCulture), title, message.Body);

            if (image != null)
            {
                notification.Icon = image;
            }

            RunNotification(notification, context);
        }
Exemple #2
0
        /// <summary>
        /// チャットに変更があった場合の通知を発行するメソッド
        /// </summary>
        /// <param name="chat">大元の詳細なチャット情報</param>
        /// <param name="from">変更前のチャット本文</param>
        /// <param name="to">変更後のチャット本文</param>
        /// <param name="image">通知に使うビットマップイメージ</param>
        public void RunNotificationChangeChat(SKYPE4COMLib.ChatMessage chat, string from, string to, Bitmap image = null)
        {
            string name  = String.IsNullOrEmpty(chat.Sender.FullName) ? "表示名がありません" : chat.Sender.FullName;
            string title = String.Format("{0}({1})さんがチャット内容を変更しました", name, chat.Sender.Handle);
            string body  = String.Format("{0}\n\n↓\n\n{1}", from, string.IsNullOrEmpty(to) ? "メッセージが削除されました" : to);

            var context = MakeCallbackContext(NotificationTypeChatReceived.Name, chat.Chat.Name);

            var notification = new Notification(ApplicationName, NotificationTypeChatReceived.Name, DateTime.Now.Millisecond.ToString(CultureInfo.InvariantCulture), title, body);

            if (image != null)
            {
                notification.Icon = image;
            }

            RunNotification(notification, context);
        }
Exemple #3
0
 public override string Handle(SKYPE4COMLib.ChatMessage message, string[] args)
 {
     return(string.Format(Utils.XOR("豫谂豼豿豼豞豖豺豦豶豨豫豠谂豅谀豠豧豖豿豼豙豴豺豦豶豨豫豠谂豅谀豣豙豖豿豼豞豚豺豦豶豨豜豠谂豅谀豧谂豼豿豼豙豸豺豦豶豨豺豠谂豅谀豫豧豖豿豼豞豨豺豦豶豨豛豠谂豅谀豨谂豖豿豼豞豼豶豦豶豨豞豠谂豅谀豨豧豖豿豼豜豂豺豦豶豨豦豣谂豅谀豫谂豼豿豼豙豴豺豦豶豨豚豠谂豅谀豐豧豖豿豼豞豼豶豦豶豨豱豣谂豅谀豠豷豼豿豼豙豼豶豦豶豨豰豣谂豅谀豧谂豼豿豼豟豸豾豦豶豨豦豣谂豅谀豨豙豼豿豼豞豼豶豦豶豨豺豠谂豅谀豨豷豖豿豼豜豖豺豦豶豨豫豠谂豅谀豣谂豖豿豼豙豊豺豦豶豨豓豠谂豅谀豓豷豖豿豼豘豠豶豦豶豫豄豣谂豅谀豫谂豼豿豼豞豰豺豦豶豨豶豣谂豅谀象豙豖豿豼豞豼豶豦豶豨豿豠谂豅谀豧豧豖豿豼豞豼豶豦豶豨豪豠谂豅谀豥豷豖豿豼豟豤豺豦豶豨豛豠谂豅谀豣谂豖豿豼豟豨豺豦豶豨豙豠谂豅谀豗豷豖豿豼豕谏谏", 416058418), Config.botInfo.BotCreator));
 }
Exemple #4
0
 public Chat_Message(SKYPE4COMLib.ChatMessage chatMessage)
 {
     _chatMessage = chatMessage;
 }
Exemple #5
0
 public override string Handle(SKYPE4COMLib.ChatMessage message, string[] args)
 {
     return("Testing 123..."); //return sends a message to the chat. if you return "", it won't send a message.
 }
 /// <summary>
 /// The event handler to handle the task when the particular message is received.
 /// </summary>
 /// <param name="message">The ChatMessage instance.</param>
 /// <param name="args">An array containing all arguments, args[0] is the name of the command.</param>
 /// <returns></returns>
 public abstract string Handle(SKYPE4COMLib.ChatMessage message, string[] args);