Ejemplo n.º 1
0
 private void UpdateServerDown(string text)
 {
     App.Current.Dispatcher.Invoke((Action) delegate
     {
         APIClientModel old = _clientData.FirstOrDefault();
         _clientData.Clear();
         _clientData.Add(new APIClientModel(ClientState.DISCONNECTED, old.IpClientConnected, old.PortClientConnected, old.Name));
         _disconnectClient.InvokeCanExecuteChanged();
         SelectedReader = null;
     });
 }
Ejemplo n.º 2
0
        private void UpdateServerDown(string text)
        {
            if (_clientData.FirstOrDefault().ClientState.Equals("DISCONNECTED"))
            {
                return;
            }
            APIClientModel old = _clientData.FirstOrDefault();

            _clientData = new ObservableCollection <APIClientModel>();
            _clientData.Add(new APIClientModel("DISCONNECTED", old.IpClientConnected, old.PortClientConnected));
            OnPropertyChanged("ClientData");
        }
Ejemplo n.º 3
0
        private void DelDisconnectClient()
        {
            APIClientModel old = _clientData.FirstOrDefault();

            if (old.ClientState.Equals("DISCONNECTED"))
            {
                MessageBox.Show("Error: Client already disconnected");
                return;
            }
            _clientData = new ObservableCollection <APIClientModel>();
            _clientData.Add(new APIClientModel("DISCONNECTED", old.IpClientConnected, old.PortClientConnected));
            OnPropertyChanged("ClientData");
            ResponseDLL response = APIClientWrapper.DisconnectClient();

            CheckError(response);
        }
Ejemplo n.º 4
0
        private void DelConnectClient()
        {
            if (_selectedReader == null)
            {
                MessageBox.Show("Error: A reader must be selected");
                return;
            }
            APIClientModel old      = _clientData.FirstOrDefault();
            ResponseDLL    response = APIClientWrapper.ConnectClient(_selectedReader.ReaderName, old.IpClientConnected, old.PortClientConnected);

            if (CheckError(response))
            {
                return;
            }
            _clientData = new ObservableCollection <APIClientModel>();
            _clientData.Add(new APIClientModel("CONNECTED", old.IpClientConnected, old.PortClientConnected));
            OnPropertyChanged("ClientData");
        }