Exemplo n.º 1
0
        public Service(ISynchronizeInvoke syncInvoke, IServers servers)
        {
            __SyncInvoke   = syncInvoke;
            __ServiceProxy = new IVPNClientProxy();

            __ServiceProxy.Connected        += ServiceProxy_Connected;
            __ServiceProxy.ConnectionState  += ServiceProxy_ConnectionState;
            __ServiceProxy.Disconnected     += ServiceProxy_Disconnected;
            __ServiceProxy.KillSwitchStatus += (bool?enabled, bool?isPersistant, bool?isAllowLAN, bool?isAllowMulticast) =>
            {
                if (enabled != null)
                {
                    UpdateKillSwitchIsEnabled((bool)enabled);
                }
                if (isPersistant != null)
                {
                    UpdateKillSwitchIsPersistent((bool)isPersistant);
                }
            };

            __ServiceProxy.AlternateDNSChanged += (string dns) =>
            {
                AlternateDNSChanged(dns);
            };

            __State = ServiceState.Uninitialized;
            __InitializationSignal = new ManualResetEvent(false);

            Servers = servers;

            SetProxyHandlers();
        }
Exemplo n.º 2
0
        public Service(ISynchronizeInvoke syncInvoke, IServers servers)
        {
            __SyncInvoke   = syncInvoke;
            __ServiceProxy = new IVPNClientProxy();

            __ServiceProxy.Connected       += ServiceProxy_Connected;
            __ServiceProxy.ConnectionState += ServiceProxy_ConnectionState;
            __ServiceProxy.Disconnected    += ServiceProxy_Disconnected;

            __State = ServiceState.Uninitialized;
            __InitializationSignal = new ManualResetEvent(false);

            Servers = servers;

            SetProxyHandlers();
        }
Exemplo n.º 3
0
 public ServersViewModel(IServers servers, IEventAggregator eventAggregator)
 {
     _tesonetServers  = servers;
     _eventAggregator = eventAggregator;
 }
Exemplo n.º 4
0
 public ServerController()
 {
     todosServers = new Servers();
 }
Exemplo n.º 5
0
 public LoginSucceededMessage(IServers servers)
 => Servers = servers;