public SignUpControl(Dashboard dashboard) { _dashboard = dashboard; _appContext = GwupeClientAppContext.CurrentAppContext; this.InitializeComponent(); _validator = new InputValidator(null,ErrorText,Dispatcher); }
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; }
public UserImageAddBuddy() { InitializeComponent(); GwupeClientAppContext appContext = GwupeClientAppContext.CurrentAppContext.UIManager.GetAppcontext(); //DataContext = SearchResult; //new AddPerson(appContext, SearchResult.Person); }
public SignUpControl(Dashboard dashboard) { _dashboard = dashboard; _appContext = GwupeClientAppContext.CurrentAppContext; this.InitializeComponent(); _validator = new InputValidator(null, ErrorText, Dispatcher); }
public LoginManager() { this._appContext = GwupeClientAppContext.CurrentAppContext; LoginOccurredLock = new Object(); LogoutOccurredLock = new Object(); if (!String.IsNullOrEmpty(_reg.Username)) { LoginDetails.Username = _reg.Username; if (!String.IsNullOrEmpty(_reg.PasswordHash)) { LoginDetails.PasswordHash = _reg.PasswordHash; // now we can initiate a login _loginDetailsReady.Set(); } } else if (_reg.LoginAsGuest) { LoginDetails.LoginGuest = true; _loginDetailsReady.Set(); } _connectionReady = new AutoResetEvent(false); // Link into the connect and disconnect event handlers _appContext.ConnectionManager.Connect += Connected; _appContext.ConnectionManager.Disconnect += Disconnected; }
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; }
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(); }); }
public UpdateNotification() { this.InitializeComponent(); UiThread = Thread.CurrentThread; _appContext = GwupeClientAppContext.CurrentAppContext; DataContext = new UpdateNotificationData(); }
internal AvatarImageWindow(GwupeClientAppContext appContext, byte[] currentImageBytes) { _appContext = appContext; this.InitializeComponent(); validator = new InputValidator(StatusText, ErrorText,Dispatcher); ProfileImage = new ImageStreamReader() {DefaultImageUri = "pack://application:,,,/ui/wpf/Images/silhoette.png" }.CreateBitmapImage(currentImageBytes); }
public UserInfoControl(GwupeClientAppContext appContext) { this.InitializeComponent(); _uiHelper = new UiHelper(Dispatcher, Disabler, StatusText, ErrorText); _appContext = appContext; DataContext = _appContext.CurrentUserManager.CurrentUser; _appContext.CurrentUserManager.CurrentUserChanged += CurrentUserManagerOnCurrentUserChanged; }
public RosterManager() { _appContext = GwupeClientAppContext.CurrentAppContext; ServicePartyAttendanceList = new ObservableCollection<Attendance>(); ServicePartyAttendanceLookup = new Dictionary<String, Attendance>(); _queuedPresenceChanges = new ConcurrentQueue<PresenceChangeRq>(); _appContext.LoginManager.LoggedOut += (sender, args) => Reset(); }
public UserImageOthers() { InitializeComponent(); GwupeClientAppContext appContext = GwupeClientAppContext.CurrentAppContext.UIManager.GetAppcontext(); Engagement engagement = null;//GwupeClientAppContext.CurrentAppContext.UIManager.GetSourceObject(); DataContext = new ChatWindowDataContext(appContext, engagement); }
public RosterManager() { _appContext = GwupeClientAppContext.CurrentAppContext; ServicePartyAttendanceList = new ObservableCollection <Attendance>(); ServicePartyAttendanceLookup = new Dictionary <String, Attendance>(); _queuedPresenceChanges = new ConcurrentQueue <PresenceChangeRq>(); _appContext.LoginManager.LoggedOut += (sender, args) => Reset(); }
public UserImage() { InitializeComponent(); GwupeClientAppContext _appContext = GwupeClientAppContext.CurrentAppContext.UIManager.GetAppcontext(); ChatWindow chatWindow = new ChatWindow(); DataContext = new ChatWindowDataContext(_appContext); }
public SearchResultControl(GwupeClientAppContext appContext, SearchResult sourceObject) { InitializeComponent(); _appContext = appContext; SearchResult = sourceObject; DataContext = SearchResult; AddPersonButton.Command = new AddPerson(_appContext, SearchResult.Person); }
//public DispatchingCollection<ObservableCollection<ChatElement>, ChatElement> Exchange { get; private set; } public ChatWindowDataContext(GwupeClientAppContext appContext) { this._appContext = appContext; //this._chatWindow = chatWindow; Self = _appContext.CurrentUserManager.CurrentUser; // this.Exchange = // new DispatchingCollection<ObservableCollection<ChatElement>, ChatElement>( // _chatWindow._chat.Conversation.Exchange, chatWindow.Dispatcher); }
//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); }
public EngagementWindowList(GwupeClientAppContext appContext, DispatchingCollection <ObservableCollection <Notification>, Notification> notificationList, PropertyChangedEventHandler propertyChangeHandler, Dispatcher dispatcher) : base(dispatcher) { this._appContext = appContext; this._notificationList = notificationList; _propertyChangeHandler = propertyChangeHandler; }
internal AvatarImageWindow(GwupeClientAppContext appContext, byte[] currentImageBytes) { _appContext = appContext; this.InitializeComponent(); validator = new InputValidator(StatusText, ErrorText, Dispatcher); ProfileImage = new ImageStreamReader() { DefaultImageUri = "pack://application:,,,/ui/wpf/Images/silhoette.png" }.CreateBitmapImage(currentImageBytes); }
public RequestManager() { this._appContext = GwupeClientAppContext.CurrentAppContext; _appContext.ConnectionManager.Connect += delegate(object sender, EventArgs args) { if (!_setup) { RegisterRequestProcessors(); } }; }
public ChatWindow(GwupeClientAppContext appContext, EngagementWindow engagementWindow) { this.InitializeComponent(); _appContext = appContext; _engagementWindow = engagementWindow; Chat = _engagementWindow.Engagement.Functions["Chat"] as Function; Chat.NewActivity += ChatOnNewMessage; ChatPanelViewer.ScrollToBottom(); DataContext = new ChatWindowDataContext(_appContext, this); // need to do this here, because we get weird errors if its part of the data context. ChatPanel.ItemsSource = new DispatchingCollection <ObservableCollection <IChatMessage>, IChatMessage>(Chat.Conversation.Exchange, Dispatcher); }
public ChatWindow(GwupeClientAppContext appContext, EngagementWindow engagementWindow) { this.InitializeComponent(); _appContext = appContext; _engagementWindow = engagementWindow; Chat = _engagementWindow.Engagement.Functions["Chat"] as Function; Chat.NewActivity += ChatOnNewMessage; ChatPanelViewer.ScrollToBottom(); DataContext = new ChatWindowDataContext(_appContext, this); // need to do this here, because we get weird errors if its part of the data context. ChatPanel.ItemsSource = new DispatchingCollection<ObservableCollection<IChatMessage>, IChatMessage>(Chat.Conversation.Exchange, Dispatcher); }
internal Function(GwupeClientAppContext appContext, Engagement engagement) { this._appContext = appContext; this._engagement = engagement; this._to = engagement.SecondParty.Party.Username; SetupCommands(); Conversation = new Conversation(appContext); _chatQueue = new ConcurrentQueue <SelfChatElement>(); _chatSender = new Thread(ProcessChats) { Name = "ChatSender-" + _to, IsBackground = true }; _chatSender.Start(); }
public SearchWindow(GwupeClientAppContext appContext) { this.InitializeComponent(); _appContext = appContext; _searchResults = new SearchResultControlList(_appContext, Dispatcher); try { _searchResults.SetList(_appContext.SearchManager.SearchResults, "Username"); } catch (Exception e) { Logger.Error("Failed to set the list : " + e.Message, e); } SearchResults.ItemsSource = _searchResults.List; _dataContext = new SearchWindowDataContext(); DataContext = _dataContext; }
public SystemTray() { this._appContext = GwupeClientAppContext.CurrentAppContext; components = new System.ComponentModel.Container(); notifyIcon = new NotifyIcon(components) { // This is the actual context menu which will appear ContextMenuStrip = new ContextMenuStrip(), // This is the icon to user //Icon = IconSearchingList[0], Icon = IconDisconnected, // Whats the default text (to start) Text = DefaultTooltip, // Of course we want it visible Visible = true }; // Set the event handlers notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening; notifyIcon.Click += LaunchDashboardLeftClick; notifyIcon.DoubleClick += (sender, args) => GwupeClientAppContext.CurrentAppContext.UIManager.Show(); //notifyIcon.MouseUp += notifyIcon_MouseUp; }
public Dashboard(GwupeClientAppContext appContext) { this.InitializeComponent(); this._appContext = appContext; SetupNotificationHandler(); SetupRoster(); // Setup the various data contexts and sources DashboardData = new DashboardDataContext(this); DataContext = DashboardData; DashboardData.LoginState = LoginState.Initializing; _appContext.CurrentUserManager.CurrentUserChanged += delegate { SetupCurrentUserListener(); }; SetupEngagementWindows(); appContext.LoginManager.LoggedOut += LoginManagerOnLoggedOut; activateEngagementChecker = new Timer(30000); activateEngagementChecker.Elapsed += CheckActiveEngagements; activateEngagementChecker.Start(); appContext.SettingsManager.PropertyChanged += SettingsOnPropertyChanged; SetupSearch(); SetupPartner(); EventManager.RegisterClassHandler(typeof(Window), Window.PreviewMouseUpEvent, new MouseButtonEventHandler(OnPreviewMouseUp)); Logger.Info("Dashboard setup completed"); ((INotifyCollectionChanged)Notifications.Items).CollectionChanged += new NotifyCollectionChangedEventHandler(Notification_CollectionChanged); }
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 Function(GwupeClientAppContext appContext, Engagement engagement) { _appContext = appContext; _engagement = engagement; }
internal FileSendRequestProcessor(GwupeClientAppContext appContext) : base(appContext) { }
public EngagementManager() { _appContext = GwupeClientAppContext.CurrentAppContext; Engagements = new ObservableCollection<Engagement>(); _appContext.LoginManager.LoggedOut += (sender, args) => Reset(); }
internal AddPerson(GwupeClientAppContext appContext, Person person) { _appContext = appContext; _person = person; }
internal ChatMessageProcessor(GwupeClientAppContext appContext) : base(appContext) { }
public FileSendRequestResponseProcessor(GwupeClientAppContext appContext) : base(appContext) { }
internal RDPRequestProcessor(GwupeClientAppContext appContext) : base(appContext) { _appContext = appContext; }
public ConnectionManager() { _appContext = GwupeClientAppContext.CurrentAppContext; _connection = new CloudConnection(); SaveServers(_connection.Servers); }
public Conversation(GwupeClientAppContext appContext) { _appContext = appContext; Exchange = new ObservableCollection <IChatMessage>(); }
public DetectIdleTask(GwupeClientAppContext appContext) { _appContext = appContext; LastCompleteTime = DateTime.MinValue; LastExecuteTime = DateTime.MinValue; }
internal UserToUserProcessor(GwupeClientAppContext appContext) { _appContext = appContext; }
public SubscribeProcessor(GwupeClientAppContext appContext) { _appContext = appContext; }
internal InitUDPConnectionProcessor(GwupeClientAppContext appContext) { _appContext = appContext; }
public NotifyChangeProcessor(GwupeClientAppContext appContext) { }
public EngagementWindowDataContext(GwupeClientAppContext appContext, Engagement engagement) { _appContext = appContext; Engagement = engagement; SecondParty = Engagement.SecondParty; }
public InitRepeatedConnectionProcessor(GwupeClientAppContext appContext) : base(appContext) { }
internal RDPRequestResponseProcessor(GwupeClientAppContext appContext) : base(appContext) { }
internal CheckServiceTask(GwupeClientAppContext appContext) { _appContext = appContext; LastCompleteTime = DateTime.MinValue; LastExecuteTime = DateTime.MinValue; }
internal ListenHandshakeProcessor(GwupeClientAppContext appContext) : base(appContext) { _appContext = appContext; }