Exemplo n.º 1
0
        /**
         * connect - connect to the server and make a new TCP connection.
         */
        public void connect(string ip, int port)
        {
            ITelnetClient ITelnet = new MyTelnetClient();

            this.model.SetTelnetClient(ITelnet);
            model.connect(ip, port);
            this.model.setStop();
        }
Exemplo n.º 2
0
        public void createClient(string ip, int port)
        {
            ITelnetClient telnetClient = new MyTelnetClient();

            this.telnetClient = telnetClient;

            telnetClient.connect(ip, port);
        }
Exemplo n.º 3
0
 public MainWindow()
 {
     InitializeComponent();
     //   vm = new SimulatorViewModel(new SimulatorModel(new MyTelnetClient()));
     // DataContext = vm;
     client = new MyTelnetClient();
     client.Connect("127.0.0.1", 8080);
     Closed +=
         (o, p) =>
     {
         client.Disconnect();
     };
 }
Exemplo n.º 4
0
        public void App_Startup(object sender, StartupEventArgs e)
        {
            ITelnetClient telnetClient = new MyTelnetClient();
            IFlightModel  flightModel  = new MyFlight(telnetClient);

            MainViewModel = new ViewModel(flightModel);
            MainViewModel.InitializeVM();


            MainWindow mainWindow = new MainWindow(flightModel);

            FirstPage first = new FirstPage();

            first.SetFlight(flightModel);
            first.SetMain(mainWindow);

            first.ShowDialog();
        }