Exemplo n.º 1
0
 static void Main(string[] args)
 {
     Console.WriteLine("Server connected....");
     Console.WriteLine();
     Console.WriteLine("Press enter to continue....");
     Console.ReadLine();
     SyncServerSocket.StartListener();
     Console.ReadLine();
 }
Exemplo n.º 2
0
        private void OpenSetup()
        {
            SyncServerSocket syncServerSocket = new SyncServerSocket();
            SyncClientSocket syncClientSocket = new SyncClientSocket();
            var setupViewModel = new SetupViewModel(syncClientSocket, syncServerSocket);

            setupViewModel.OnPeerAcceptFromServer += OnPeerAcceptFromServerEventHandler;
            setupViewModel.OnPeerAcceptFromClient += OnPeerAcceptFromClientEventHandler;
            setupViewModel.OnViewPreviousChats    += OpenConversationsView;
            CurrentPageViewModel = setupViewModel;
        }
Exemplo n.º 3
0
 public SetupViewModel(SyncClientSocket syncClientSocket, SyncServerSocket syncServerSocket)
 {
     isConnected              = false;
     SendInviteCommand        = new SendInviteCommand(this);
     StartServerCommand       = new StartServerCommand(this);
     ShowDialogBoxCommand     = new ShowDialogBoxCommand(this);
     ViewPreviousChatsCommand = new ViewPreviousChatsCommand(this);
     //OpenConversationsCommand           = new OpenConversationsCommand(this);
     PerformClientInitializationCommand = new PerformClientInitializationCommand(this);
     this.syncClientSocket = syncClientSocket;
     this.syncServerSocket = syncServerSocket;
     registerHandlers();
 }