internal Engagement(GwupeClientAppContext appContext, Attendance personAttendance) { this._appContext = appContext; Interactions = new Interactions(this); // This is to pickup logouts/connection disconnections _appContext.LoginManager.LoggedOut += LogoutOccurred; SecondParty = personAttendance; _countdownToDeactivation = new Timer(TimeoutToTunnelClose) { AutoReset = false }; _countdownToDeactivation.Elapsed += (sender, args) => CompleteDeactivation(); //_transportManager = new TransportManager(); // Setup the functions of this engagement Functions = new Dictionary <string, IFunction> { { "Chat", new Functions.Chat.Function(_appContext, this) }, { "FileSend", new Functions.FileSend.Function(_appContext, this) }, { "RemoteDesktop", new Functions.RemoteDesktop.Function(_appContext, this) }, }; Functions.Values.ToList().ForEach(function => { function.Activate += (sender, args) => { Active = true; }; function.Deactivate += (sender, args) => SuggestCountdownToDeactivation(); }); }
internal Engagement(GwupeClientAppContext appContext, Attendance personAttendance) { this._appContext = appContext; Interactions = new Interactions(this); // This is to pickup logouts/connection disconnections _appContext.LoginManager.LoggedOut += LogoutOccurred; SecondParty = personAttendance; _countdownToDeactivation = new Timer(TimeoutToTunnelClose) { AutoReset = false }; _countdownToDeactivation.Elapsed += (sender, args) => CompleteDeactivation(); //_transportManager = new TransportManager(); // Setup the functions of this engagement Functions = new Dictionary<string, IFunction> { {"Chat", new Functions.Chat.Function(_appContext,this)}, {"FileSend", new Functions.FileSend.Function(_appContext, this)}, {"RemoteDesktop", new Functions.RemoteDesktop.Function(_appContext, this)}, }; Functions.Values.ToList().ForEach(function => { function.Activate += (sender, args) => { Active = true; }; function.Deactivate += (sender, args) => SuggestCountdownToDeactivation(); }); }