Inheritance: INotifyPropertyChanged
コード例 #1
0
ファイル: EngagementWindow.xaml.cs プロジェクト: gwupe/Gwupe
 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
ファイル: EngagementWindow.xaml.cs プロジェクト: gwupe/Gwupe
 public EngagementWindowDataContext(GwupeClientAppContext appContext, Engagement engagement)
 {
     _appContext = appContext;
     Engagement = engagement;
     SecondParty = Engagement.SecondParty;
 }
コード例 #5
0
ファイル: EngagementManager.cs プロジェクト: gwupe/Gwupe
        // 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
ファイル: Dashboard.xaml.cs プロジェクト: gwupe/Gwupe
 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
ファイル: EngagementActivity.cs プロジェクト: gwupe/Gwupe
 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
ファイル: UserImageOthers.xaml.cs プロジェクト: gwupe/Gwupe
 //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>();
 }