public FgfsClient(FgfsDataHelper Helper, TcpClient client, int OutputPort)
            : this("127.0.0.1", OutputPort)
        {
            _dataObject = Helper.DataObject;
            _dataHelper = Helper;

            mTCPClientOutput = client;
        }
        public FgfsClient(TcpClient client,int OutputPort)
            : this("127.0.0.1",OutputPort)
        {
            _dataObject = new FgfsDataObject();
            _dataHelper = new FgfsDataHelper(_dataObject);

            mTCPClientOutput = client;
        }
        //starts the server @ ip:port
        public void StartServer(IPAddress ip, int port, FgfsDataHelper helper)
        {
            this.Ip = ip;
            this.Port = port;
            this.Helper = helper;

            mlstTCPClients.Clear();

            //start a new thread on the run-method
            _serverThread = new Thread(new ThreadStart(ListenForClients));
            _serverThread.Name = "ServerThread";
            _serverThread.Priority = ThreadPriority.Normal;
            _serverThread.Start();

            Console.WriteLine("Started Server…");
            running = 1;
        }
        private void InitializePrivates()
        {
            Console.WriteLine("Init the privates ...");
            //init the privates
            _dataObject = new FgfsDataObject();
            _dataHelper = new FgfsDataHelper(_dataObject);
            _registredDisplays = new ArrayList();
            //_display = new FgfsDisplay();

            #if USING_MS_SAPI
            // MS Speech SDK
            //SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
            SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
            ms_Voice = null;
            //this._speechObj = null;
            #else
            this._soundCheckBox.Enabled = false;
            #endif

            this._sPort = null;
            this._swLog = null;

            //prepare the gui
            IpComboBox.DataSource = FgfsServer.DeterminePossibleIPs();

            // initialize pitch/roll max/min
            _max_pitch = -1;
            _min_pitch = 999999;
            _max_roll = -1;
            _min_roll = 999999;

            pitch_max = this.PitchBar.Maximum;
            pitch_min = this.PitchBar.Minimum;
            roll_max = this.RollBar.Maximum;
            roll_min = this.RollBar.Minimum;
            pitch_scale = pitch_max - pitch_min;
            roll_scale = roll_max - roll_min;
            pitch_scale2 = pitch_scale / 2;
            roll_scale2 = roll_scale / 2;
            Console.WriteLine("pitch {0} {1} {2} {3} roll {4} {5} {6} {7}",
                pitch_min, pitch_max, pitch_scale, pitch_scale2,
                roll_min, roll_max, roll_scale, roll_scale2);
        }
 //transforms string in ipaddress –
 public void StartServer(string ip, int port, FgfsDataHelper helper)
 {
     IPAddress ipAddress = IPAddress.Parse(ip);
     Console.WriteLine("StartServer: On {0}, at {1} ...", ip, port.ToString());
     this.StartServer(ipAddress, port, helper);
 }