Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created May 28, 2014 11:59
Show Gist options
  • Save elbruno/65d006318b77ce32b176 to your computer and use it in GitHub Desktop.
Save elbruno/65d006318b77ce32b176 to your computer and use it in GitHub Desktop.
ElBruno Lync to Pebble
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