Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            client = new ClientService();

            while (true)
            {
                Console.WriteLine("Enter command..");
                string readMemoryCommand = Console.ReadLine();
                try
                {
                    string[] values = ParseCommand(readMemoryCommand);
                    ProcessRequest(values);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
            }
        }
Ejemplo n.º 2
0
 protected override void ProcessRecord()
 {
     var client = new ClientService(Constants.ConnectionString);
     client.Read();
 }
Ejemplo n.º 3
0
        public Window1(IServerService serverChannel, Guid userId, string username, ServerProxy serverProxy, ClientService clientService)
        {
            InitializeComponent();
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            this._serverChannel   = serverChannel;
            this._userId          = userId;
            this._username        = username;
            this._serverProxy     = serverProxy;
            this._clientService   = clientService;

            _clientService.ConnectedClientsListUpdatedEvent += UpdateListOfConnectedClients;
            _clientService.NewMessageReceivedEvent          += DisplayNewMessage;

            clientsListBox.SelectionChanged += OnClientSelect;
            Closed += OnClosed;
        }