private void ShowComponent() { _buttonBox.Add(_showAllCheckBox); _buttonBox.Add(_randomUuidCheckBox); _buttonBox.Add(_scanButton); _buttonBox.Add(_cancelButton); _amiiboSeriesBox.Add(_amiiboSeriesLabel); _amiiboSeriesBox.Add(_amiiboSeriesComboBox); _amiiboCharsBox.Add(_amiiboCharsLabel); _amiiboCharsBox.Add(_amiiboCharsComboBox); _amiiboHeadBox.Add(_amiiboSeriesBox); _amiiboHeadBox.Add(_amiiboCharsBox); _amiiboBox.PackStart(_amiiboHeadBox, true, true, 0); _amiiboBox.PackEnd(_gameUsageLabel, false, false, 0); _amiiboBox.PackEnd(_amiiboImage, false, false, 0); _mainBox.Add(_amiiboBox); _mainBox.PackEnd(_buttonBox, false, false, 0); Add(_mainBox); ShowAll(); }
private Box GetButtonBox() { var box = new ButtonBox(Orientation.Horizontal); _buttonClear = new LinkButton("https://www.youtube.com/watch?v=EPUVstUH22k", "Clear"); box.Add(_buttonClear); _buttonSave = new Button("Save"); box.Add(_buttonSave); return(box); }
public EqualizerWindow(Window parent) : base(Catalog.GetString("Equalizer")) { if (instance == null) { instance = this; } TransientFor = parent; WindowPosition = WindowPosition.CenterOnParent; TypeHint = Gdk.WindowTypeHint.Dialog; SkipPagerHint = true; SkipTaskbarHint = true; SetDefaultSize(-1, 230); VBox box = new VBox(); header_box = new HBox(); header_box.BorderWidth = 4; header_box.Spacing = 2; box.PackStart(header_box, false, false, 0); box.PackStart(new HSeparator(), false, false, 0); eq_view = new EqualizerView(); eq_view.BorderWidth = 10; eq_view.SetSizeRequest(-1, 110); eq_view.Frequencies = ((IEqualizer)ServiceManager.PlayerEngine.ActiveEngine).EqualizerFrequencies; eq_view.Show(); eq_enabled_checkbox = new CheckButton(Catalog.GetString("Enabled")); eq_preset_combo = new EqualizerPresetComboBox(); eq_preset_combo.Changed += OnPresetChanged; eq_preset_combo.Show(); Button new_preset_button = new Button(new Image(Stock.Add, IconSize.Button)); new_preset_button.Relief = ReliefStyle.None; new_preset_button.Clicked += OnNewPreset; delete_preset_button = new Button(new Image(Stock.Remove, IconSize.Button)); delete_preset_button.Relief = ReliefStyle.None; delete_preset_button.Clicked += OnDeletePreset; VBox combo_box = new VBox(); combo_box.PackStart(eq_preset_combo, true, false, 0); header_box.PackStart(combo_box, false, false, 0); header_box.PackStart(new_preset_button, false, false, 0); header_box.PackStart(delete_preset_button, false, false, 0); header_box.PackEnd(eq_enabled_checkbox, false, false, 0); box.PackStart(eq_view, true, true, 0); var button_box = new ButtonBox(Orientation.Horizontal); button_box.Layout = ButtonBoxStyle.End; button_box.BorderWidth = 12; var button = new Button(Stock.Close) { UseStock = true }; button.Clicked += delegate { Destroy(); }; button_box.Add(button); box.PackEnd(button_box, false, true, 0); eq_enabled_checkbox.Active = EqualizerManager.Instance.IsActive; eq_enabled_checkbox.Clicked += OnEnableDisable; eq_preset_combo.ActiveEqualizer = EqualizerManager.Instance.SelectedEqualizer; int minimum_height, natural_height; GetPreferredHeight(out minimum_height, out natural_height); Gdk.Geometry limits = new Gdk.Geometry(); limits.MinWidth = -1; limits.MaxWidth = -1; limits.MinHeight = minimum_height; limits.MaxHeight = Gdk.Screen.Default.Height; SetGeometryHints(this, limits, Gdk.WindowHints.MaxSize); KeyPressEvent += OnKeyPress; Add(box); box.ShowAll(); }