//----------------------
        //functions
        //----------------------
        public MainWindow()
        {
            InitializeComponent();

            Server = new audioServer();

            grdMain.DataContext = Server;
            listDevices.DataContext = this;
            txtMp3Path.DataContext = settings;
            GetDevices();

            if (GetDevicesCount() > 0 && listDevices.SelectedIndex < 0)
            {
                listDevices.SelectedIndex = 0;
            }

            //Server.mp3Path = System.IO.Directory.GetCurrentDirectory(); //@"H:\stuff\MP3's\"
            debug = new DebugListener(txtDebug);
            Debug.Listeners.Add(debug);
        }
        //functions
        public MainWindow()
        {
            //setup UI
            InitializeComponent();
            CommandBinding pause = new CommandBinding(RoutePause, cmdPausePlayer);
            this.CommandBindings.Add(pause);
            KeyGesture keyPause = new KeyGesture(Key.Space,ModifierKeys.None);
            btConnect.Focus();

            //enable debugging output
            debug = new DebugListener(txtDebug);
            Debug.Listeners.Add(debug);

            //assinging datacontext to all the stuff...
            this.DataContext = Client;

            //connection settings binding
            stConnections.DataContext = settings; //Client.settings;

            //for the disabling of controls
            stConnectionbtn.DataContext = Client;
        }