コード例 #1
0
 private RouterVpnManagerWrapper()
 {
     try
     {
         connection_ = new RouterVpnManagerConnection();
         GetSettings();
         connected_ = false;
         request_   = new ControlledRequests(connection_);
         request_.AddBroadcastListener(this);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         Global.BasicNotificationAlert("Something Broke", "We were unable to process your request", MainPageController, e.ToString());
     }
 }
コード例 #2
0
 static void Main(string[] args)
 {
     using (connection = new RouterVpnManagerConnection())
     {
         try
         {
             connection.Host = "192.168.3.1";
             connection.Connect();
             requests = new ControlledRequests(connection);
             requests.AddBroadcastListener(new Broadcasts());
             ListenForCommands();
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
             throw;
         }
     }
 }