GetFunction() public method

public GetFunction ( String function ) : IFunction
function String
return IFunction
示例#1
0
 internal EngagementWindow(GwupeClientAppContext appContext, DispatchingCollection<ObservableCollection<Notification>, Notification> notificationList, Engagement engagement)
 {
     InitializeComponent();
     _appContext = appContext;
     Engagement = engagement;
     engagement.PropertyChanged += EngagementOnPropertyChanged;
     try
     {
         ((Components.Functions.RemoteDesktop.Function)Engagement.GetFunction("RemoteDesktop")).Server.ServerConnectionOpened += EngagementOnRDPConnectionAccepted;
         ((Components.Functions.RemoteDesktop.Function)Engagement.GetFunction("RemoteDesktop")).Server.ServerConnectionClosed += EngagementOnRDPConnectionClosed;
     }
     catch (Exception e)
     {
         Logger.Error("Failed to link into function RemoteDesktop : " + e.Message, e);
     }
     _notificationView = new CollectionViewSource { Source = notificationList };
     _notificationView.Filter += NotificationFilter;
     _notificationView.View.Refresh();
     notificationList.CollectionChanged += NotificationListOnCollectionChanged;
     //SetTunnelIndicator(Engagement.IncomingTunnel, IncomingTunnelIndicator);
     //SetTunnelIndicator(Engagement.OutgoingTunnel, OutgoingTunnelIndicator);
     ShowChat();
     _ewDataContext = new EngagementWindowDataContext(_appContext, engagement);
     DataContext = _ewDataContext;
 }