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; }
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(); }