private void SinglePanel_ButtonStateChanged(object sender, SelectionChangedEventArgs e) { GUITogglePanel panel = sender as GUITogglePanel; GUIButton button = e.ButtonChanged; button.UpdateCaption(null, null, "State is now" + button.CurrentState); }
private void BuildToggle(GUIEnumerations.ButtonType buttontype, GUITogglePanelSelectionType selectiontype) { GUIButton button = new GUIButton( buttontype, GUIElements.GUIEnumerations.ButtonDock.Top, selectiontype.ToString(), string.Format(@"{0}{1}", System.AppDomain.CurrentDomain.BaseDirectory, "mute.png"), null ); button.UpdateFrame(new Thickness(10), Brushes.Black, 0.6, Brushes.Black, new Thickness(1)); button.UpdateButton(Colors.Transparent, null, false); button.UpdatePicture(null, 20, 20); button.UpdateCaption(Colors.White, Colors.Black, string.Empty); if (selectiontype == GUITogglePanelSelectionType.Single) { _single_buttons.Add(button); } else { _multi_buttons.Add(button); } }