JSFiddle - React, Tailwind, and code Playground
by charmis
JavaScript
using Microsoft.Lync.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LyncSDK
{
public partial class Form1 : Form
{
ContactSubscription _contactSubscription;
List<ContactInformationType> _contactInformationList;
Contact _contact;
ProcessL l;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
_contactSubscription = LyncClient.GetClient().ContactManager.CreateSubscription();
_contactInformationList = new List<ContactInformationType>();
_contactInformationList.Add(ContactInformationType.Availability);
_contact = LyncClient.GetClient().ContactManager.GetContactByUri("[email protected]");
//_contact = LyncClient.GetClient().Self.Contact;
_contactSubscription.AddContact(_contact);
_contactSubscription.Subscribe(ContactSubscriptionRefreshRate.High, _contactInformationList);
_contact.ContactInformationChanged += _contact_ContactInformationChanged;
var availability = (int)_contact.GetContactInformation(ContactInformationType.Availability);
DateTime? availabilityChangeStarted = null;
try
{
availabilityChangeStarted = (DateTime?)_contact.GetContactInformation(ContactInformationType.IdleStartTime);
}
catch (Exception)
{
}
IdentifyAvailability(availability, availabilityChangeStarted);
try
{
l = new ProcessL();
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.Message);
}
}
private void _contact_ContactInformationChanged(object sender, ContactInformationChangedEventArgs e)
{
...