Created
May 28, 2014 11:59
-
-
Save elbruno/65d006318b77ce32b176 to your computer and use it in GitHub Desktop.
ElBruno Lync to Pebble
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main() | |
{ | |
WriteAppTitle(); | |
if (ConnectToPebble()) return; | |
var client = LyncClient.GetClient(); | |
client.ConversationManager.ConversationAdded += ConversationManager_ConversationAdded; | |
Console.WriteLine("Press Enter to exit."); | |
Console.ReadLine(); | |
} | |
static void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e) | |
{ | |
var conversation = e.Conversation; | |
var message = string.Format("New Lync conversation{0}", Environment.NewLine); | |
message = conversation.Participants.Aggregate(message, (current, participant) => current + (participant.Properties.Values.ElementAt(1) + Environment.NewLine)); | |
_pebble.NotificationSMS("New Lync conversation", message); | |
WriteFullLine(message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment