/// <summary> /// Handles a new share session initialization /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Client_ShareStarted(object sender, Client.ShareEventArgs e) { CollabPacket.ShareInfo sInfo = new CollabPacket.ShareInfo { ShareID = e.Packet.ShareID, Sharer = e.Packet.User, WindowTitle = e.Packet.WindowTitle }; if (e.Packet.ShareID != null) ShareID = (int) e.Packet.ShareID; _dispatcher.Invoke(new Action(() => { ShareWindow = new Share(sInfo); ShareWindow.Show(); ShareWindow.Focus(); })); CollabPacket.Packet joinedShare = new CollabPacket.Packet { ShareID = sInfo.ShareID, Message = "JOIN_SHARE", User = Globals.User }; Globals.Client.WriteData(CollabPacket.ClassSerializer.SerializeClass(joinedShare)); }
public Share(CollabPacket.ShareInfo shareInfo) { _shareInfo = shareInfo; InitializeComponent(); }