private void BuildStandardMediaTab() { GUCTechTools.Pages.CustomRoomControls.StandardMediatab stdMediaTab = new GUCTechTools.Pages.CustomRoomControls.StandardMediatab(); GroupBox capturedGB = new GroupBox(); Grid capturedGrid = new Grid(); foreach (Button b in stdMediaTab.controlGrid.Children) { b.Click += Button_Click; } mediaTab.Content = stdMediaTab; }
private void BuildADBFMediaTab() { // screen up and screen down are special case constants GUCTechTools.Pages.CustomRoomControls.StandardMediatab stdMediaTab = new GUCTechTools.Pages.CustomRoomControls.StandardMediatab(); GroupBox capturedGB = new GroupBox(); Grid capturedGrid = new Grid(); 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(); string controllerIP = IPs.ElementAt(0); string tag = ((MainWindow)Application.Current.MainWindow)._1337.FindByIP(controllerIP).Tag; ControllerGuc.Connect(controllerIP, 8888); foreach (Button b in stdMediaTab.controlGrid.Children) { if (b.Content.ToString() == "Local PC") { b.Click += ((sender, e) => { ControllerGuc.SendHTTPCommand(controllerIP, 8888, ""); }); } else if (b.Content.ToString() == "HDMI") { b.Click += ((sender, e) => { ControllerGuc.SendHTTPCommand(controllerIP, 8888, ""); }); } else if (b.Content.ToString() == "VGA") { b.Click += ((sender, e) => { ControllerGuc.SendHTTPCommand(controllerIP, 8888, ""); }); } else if (b.Content.ToString() == "Doc Cam") { b.Click += ((sender, e) => { ControllerGuc.SendHTTPCommand(controllerIP, 8888, ""); }); } else if (b.Content.ToString() == "AV") { b.Click += ((sender, e) => { ControllerGuc.SendHTTPCommand(controllerIP, 8888, ""); }); } else { b.Click += Button_Click; } } mediaTab.Content = stdMediaTab; }