Esempio n. 1
0
        public ClientViewModel()
        {
            fileManagerService = new FileWindowService();

            Clients = new ObservableCollection <ClientInfo>();

            ConnectedMessageQueue = new SnackbarMessageQueue(TimeSpan.FromMilliseconds(5000));

            OpenFileManagerCommand = new RelayCommand <ClientInfo>(OpenFileManager);

            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            server = new PaceServer();
            server.ClientConnected    += Server_ClientConnected;
            server.ClientDisconnected += Server_ClientDisconnected;

            server.PacketChannel.RegisterHandler <GetSystemInfoResponsePacket>(HandleSystemInfo);

            server.Start();
        }