상속: INotifyPropertyChanged
예제 #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;
 }
예제 #2
0
        private const double InteractionTimeout = 240; // 4 hour interaction timeout
#endif

        internal Interaction(Engagement engagement, String id = null)
        {
            _engagement = engagement;
            _id         = String.IsNullOrEmpty(id) ? Util.getSingleton().generateString(6) : id;
            Logger.Debug("Starting Interaction " + _id);
            LastActivity = DateTime.Now;
            _expired     = false;
        }
예제 #3
0
파일: Interaction.cs 프로젝트: gwupe/Gwupe
 internal Interaction(Engagement engagement, String id = null)
 {
     _engagement = engagement;
     _id = String.IsNullOrEmpty(id) ? Util.getSingleton().generateString(6) : id;
     Logger.Debug("Starting Interaction " + _id);
     LastActivity = DateTime.Now;
     _expired = false;
 }
예제 #4
0
 public EngagementWindowDataContext(GwupeClientAppContext appContext, Engagement engagement)
 {
     _appContext = appContext;
     Engagement = engagement;
     SecondParty = Engagement.SecondParty;
 }
예제 #5
0
        // Gets an engagement, creates it if its not there
        public Engagement GetNewEngagement(String username, String shortCode = null)
        {
            lock (_engagementLookupLock)
            {
                if (_engagementLookup.ContainsKey(username.ToLower()))
                {
                    return _engagementLookup[username.ToLower()];
                }

                Attendance servicePersonAttendance = _appContext.RosterManager.GetServicePersonAttendance(username.ToLower());
                if (servicePersonAttendance == null && shortCode != null)
                {
                    // add them temporarily
                    _appContext.RosterManager.AddAdHocPerson(username, shortCode);
                    servicePersonAttendance = _appContext.RosterManager.GetServicePersonAttendance(username.ToLower());
                }
                if (servicePersonAttendance == null)
                {
                    throw new Exception("Unable to find service person [" + username + "]");
                }
                var newEngagement = new Engagement(_appContext, servicePersonAttendance);
                newEngagement.Functions.Values.ToList().ForEach(value => value.NewActivity += (sender, args) => OnActivity(args));
                Engagements.Add(newEngagement);
                _engagementLookup[username.ToLower()] = newEngagement;
                servicePersonAttendance.Engagement = newEngagement;
                return _engagementLookup[username.ToLower()];
            }
        }
예제 #6
0
 private void ResetUnreadIfVisible(Engagement engagement)
 {
     var currentEngagement = ActiveContent.Content as EngagementWindow;
     if (currentEngagement != null && engagement.IsUnread &&
         currentEngagement.Engagement == engagement &&
         currentEngagement.EngagementVisibleContent == EngagementVisibleContent.Chat)
     {
         engagement.IsUnread = false;
     }
 }
예제 #7
0
 internal EngagementActivity(Engagement engagement, String function, String activity)
 {
     Engagement = engagement;
     Activity = activity;
     Function = function;
 }
예제 #8
0
 internal Interactions(Engagement engagement)
 {
     _engagement   = engagement;
     _interactions = new List <Interaction>();
     //_interactionLookup = new Dictionary<string, Interaction>();
 }
예제 #9
0
 internal EngagementActivity(Engagement engagement, String function, String activity)
 {
     Engagement = engagement;
     Activity   = activity;
     Function   = function;
 }
예제 #10
0
 //public DispatchingCollection<ObservableCollection<ChatElement>, ChatElement> Exchange { get; private set; }
 public ChatWindowDataContext(GwupeClientAppContext appContext, Engagement engagement)
 {
     this._appContext = appContext;
     //this._chatWindow = chatWindow;
     Self = engagement.SecondParty.Party;
     //  this.Exchange =
     //    new DispatchingCollection<ObservableCollection<ChatElement>, ChatElement>(
     //      _chatWindow._chat.Conversation.Exchange, chatWindow.Dispatcher);
 }
예제 #11
0
파일: Interactions.cs 프로젝트: gwupe/Gwupe
 internal Interactions(Engagement engagement)
 {
     _engagement = engagement;
     _interactions = new List<Interaction>();
     //_interactionLookup = new Dictionary<string, Interaction>();
 }