public static void Main()
 {
     try {
         RemotingConfiguration.Configure("EmployeeTrainingClient.exe.config", false);
         WellKnownClientTypeEntry[] client_types      = RemotingConfiguration.GetRegisteredWellKnownClientTypes();
         IEmployeeTraining          employee_training = (IEmployeeTraining)Activator.GetObject(typeof(IEmployeeTraining), client_types[0].ObjectUrl);
         EmployeeTrainingClient     client            = new EmployeeTrainingClient(employee_training);
         Application.Run(client);
     }catch (Exception e) {
         Console.WriteLine(e);
     }
 }
Ejemplo n.º 2
0
 public static void Main()
 {
     try {
         RemotingConfiguration.Configure("EmployeeTrainingClient.exe.config", false);
         WellKnownClientTypeEntry[] client_types      = RemotingConfiguration.GetRegisteredWellKnownClientTypes();
         IEmployeeTraining          employee_training = (IEmployeeTraining)Activator.GetObject(typeof(IEmployeeTraining), client_types[0].ObjectUrl);
         Console.WriteLine("Remote EmployeeTraining object successfully created!");
         List <EmployeeVO> employee_list = employee_training.GetAllEmployees();
         foreach (EmployeeVO emp in employee_list)
         {
             Console.WriteLine(emp.FirstName + " " + emp.MiddleName + " " + emp.LastName);
         }
     }catch (Exception e) {
         Console.WriteLine(e);
     }
 }
 public EmployeeTrainingClient(IEmployeeTraining employeeTraining)
 {
     _employeeTraining = employeeTraining;
     this.InitializeComponent();
 }