Example #1
0
 private void ManagedServer_ClientDisconnected(object sender, Arrowgene.Services.Network.ManagedConnection.Event.DisconnectedEventArgs e)
 {
     this.dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
     {
         ClientViewModel clientViewModel = this.clientViewModelContainer.GetClientViewModel(e.ClientSocket);
         if (clientViewModel != null)
         {
             DatabaseManager.Instance.InsertClient(clientViewModel);
             clientViewModel.Dispose();
             this.clientViewModelContainer.Remove(clientViewModel);
         }
     }));
 }
Example #2
0
        public async Task <bool> DisposeAsync()
        {
            Singleton.getDialogueBox().showSearch(ConfigurationManager.AppSettings["close_message"]);
            unsubscribeEvents();
            ItemViewModel.Dispose();
            ClientViewModel.Dispose();
            QuoteViewModel.Dispose();
            OrderViewModel.Dispose();
            ReferentialViewModel.Dispose();
            AgentViewModel.Dispose();
            NotificationViewModel.Dispose();
            SecurityLoginViewModel.Dispose();
            HomeViewModel.Dispose();
            ChatRoomCurrentView = null;
            await ChatRoomViewModel.DisposeAsync();

            deleteCache();
            return(true);
        }