Bluetooth_Manager bm;                 //The instance of the Bluetooth Manager.

        /// <summary>
        /// Constructor.
        /// </summary>
        ///
        /// <param name="client">The user's device so a list of paired devices can be extracted.</param>
        /// <param name="nch">The NCH attempted to be paired to.</param>
        /// <param name="uuid">The UUID recognized by an NCH</param>
        /// <param name="bm">The Bluetooth Manager</param>
        public Pairer(BluetoothClient client, Device nch, Guid uuid, Bluetooth_Manager bm)
        {
            pairedDevices = client.DiscoverDevices(255, false, true, false, false);
            this.nch      = nch;
            this.uuid     = uuid;
            this.bm       = bm;
        }
        /// <summary>
        /// The Constructor.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            bm = new Bluetooth_Manager();


            this.KeyDown         += new KeyEventHandler(Main_KeyDown); //This listens for key commands issued by the user.
            this.ContentRendered += MainWindow_ContentRendered;

            this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#34373A"));

            //This sets the "connected" placement for the selected button to
            //the middle column and bottom row of the grid.
            connected_col = this.grid.ColumnDefinitions.Count / 2;
            connected_row = this.grid.RowDefinitions.Count - 1;


            wifi_status_button.Click += Buttonclicked;
        }