Ejemplo n.º 1
0
 public bool ConnectToFactory(int factoryID)
 {
     factoryListener.ClearAllObservers();
     try
     {
         return(loginService.connectToFactory(sessionID, factoryID));
     }
     catch (EndpointNotFoundException)
     {
         ClientServerEvent(this, new ClientServerEventArgs());
     }
     catch (FaultException)
     {
         ClientServerEvent(this, new ClientServerEventArgs("Fehler auf Server"));
     }
     return(false);
 }
Ejemplo n.º 2
0
 public void Logout()
 {
     try
     {
         loginService.disconnect(sessionID);
         factoryListener.ClearAllObservers();
         userListener.ClearAllObservers();
         username  = null;
         sessionID = -1;
     }
     catch (EndpointNotFoundException)
     {
         ClientServerEvent(this, new ClientServerEventArgs());
     }
     catch (FaultException)
     {
         ClientServerEvent(this, new ClientServerEventArgs("Fehler auf Server"));
     }
 }