private void CbRoom_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (null != cbRoom.SelectedItem)
            {
                // First I will need to clear the ConnectedDevSet and table
                ConnectedDevSet.Clear();
                DevTable.Clear();
                DevTable = ConnectedDevSet;     // Dev table is now of the the same structure as ConnectedDevSet
                                                // The ConnectedDevSet will be built from UDP responses to the four auth config Get commands. This is done within ParseResponseToDataGrid()

                // Connect to the selected controller
                DataTable dt  = ((MainWindow)Application.Current.MainWindow)._1337;
                var       IPs = (from row in dt.AsEnumerable()
                                 where row.Field <string>("Building").Contains(cbBuilding.SelectedItem.ToString())
                                 where row.Field <string>("Room") == cbRoom.SelectedItem.ToString()
                                 select row["IP"].ToString()).ToList();

                foreach (string ip in IPs)
                {
                    GUCTechTools.DataSet.Classroom.ControllerDBRow controller = ((MainWindow)Application.Current.MainWindow)._1337.FindByIP(ip);
                    string type = "";
                    if (!controller.IsDesignationNull())
                    {
                        type = controller.Designation + " ";
                    }

                    if (!controller.UDP)
                    {
                        // display "Controller is not compatible with Authentication Configurator"
                        Log("Selected controller is not compatible with Authentication Configurator");
                    }
                    else
                    {
                        // Create a thread and send get commands
                        Log("Fetching data...");
                        Dispatcher.Invoke(() =>
                        {
                            string controllerIP     = IPs.ElementAt(0);
                            ControllerGuc.IPAddress = controllerIP;
                            //ControllerGuc.Connect(controllerIP, 8888);

                            ControllerGuc.SendCommand("!GETDEVLABELS", "");

                            //ControllerGuc.SendCommand("!GETIP", "");
                            //ControllerGuc.SendCommand("!GETUSER", "");
                            //ControllerGuc.SendCommand("!GETPW", "");
                        });
                    }
                }
            }
        }
        private void CbRoom_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (null != cbRoom.SelectedItem)
            {
                spInfo.Children.Clear();
                DataTable dt  = ((MainWindow)Application.Current.MainWindow)._1337;
                var       IPs = (from row in dt.AsEnumerable()
                                 where row.Field <string>("Building").Contains(cbBuilding.SelectedItem.ToString())
                                 where row.Field <string>("Room") == cbRoom.SelectedItem.ToString()
                                 select row["IP"].ToString()).ToList();
                DataTable projDT  = ((MainWindow)Application.Current.MainWindow)._H4X0R;
                var       projIPs = (from row in projDT.AsEnumerable()
                                     where row.Field <string>("Building").Contains(cbBuilding.SelectedItem.ToString())
                                     where row.Field <string>("Room") == cbRoom.SelectedItem.ToString()
                                     select row["IP"].ToString()).ToList();
                foreach (string ip in projIPs)
                {
                    Button button = new Button
                    {
                        Content = "Projector " + ((MainWindow)Application.Current.MainWindow)._H4X0R.FindByIP(ip).ProjNumber + " Login",
                        Tag     = ip,
                        HorizontalContentAlignment = HorizontalAlignment.Center,
                        VerticalContentAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment        = HorizontalAlignment.Stretch,
                        Margin = new Thickness(10, 2, 10, 2)
                    };
                    button.Click += NavigateToURL;
                    spInfo.Children.Add(button);
                }
                foreach (string ip in IPs)
                {
                    GUCTechTools.DataSet.Classroom.ControllerDBRow controller = ((MainWindow)Application.Current.MainWindow)._1337.FindByIP(ip);
                    string type = "";
                    if (!controller.IsDesignationNull())
                    {
                        type = controller.Designation + " ";
                    }

                    Button buttonLogIn = new Button
                    {
                        Content = "Controller Login " + type,
                        Tag     = ip,
                        HorizontalContentAlignment = HorizontalAlignment.Center,
                        VerticalContentAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment        = HorizontalAlignment.Stretch,
                        Margin = new Thickness(10, 2, 10, 2)
                    };
                    buttonLogIn.Click += NavigateToURL;
                    spInfo.Children.Add(buttonLogIn);
                }
                foreach (string ip in IPs)
                {
                    var    controller = ((MainWindow)Application.Current.MainWindow)._1337.FindByIP(ip);
                    string type       = "";
                    if (!controller.IsDesignationNull())
                    {
                        type = controller.Designation + " ";
                    }

                    Button buttonRestart = new Button
                    {
                        Content = "Restart Controller " + type,
                        Tag     = ip,
                        HorizontalContentAlignment = HorizontalAlignment.Center,
                        VerticalContentAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment        = HorizontalAlignment.Stretch,
                        Background = Brushes.DarkRed,
                        Margin     = new Thickness(10, 30, 10, 0)
                    };
                    buttonRestart.Click += RestartController;
                    spInfo.Children.Add(buttonRestart);
                }
                BuildControls();
            }
        }