/***
         * the function initDisplay initiiliaze the DisplayWindow.
         ***/
        private void initDisplay(Model_Flight_Client client)
        {
            model = new MyFlightModel(client);
            InitializeComponent(); //call it from mainWindow.
                                   //int port = 5400;
                                   //string ip = "127.0.0.1";

            vm       = new FlightViewModel(model);
            graph_vm = new GraphViewModel(model);
            this.controls.DataContext = vm;
            this.indices.DataContext  = vm;
            this.joystick.DataContext = vm;
            this.graph.DataContext    = graph_vm;
        }
        /***
         * constractor of DisplayWindow that get ip and port to start connection.
         ***/
        public DisplayWindow(string ip, string port)
        {
            Model_Flight_Client client = new Model_Flight_Client(ip, Int32.Parse(port));

            initDisplay(client);
        }