public void fillTargetserverComboBox() { DataTable dt = new DataTable(); dt = RestrServers(); TargetserverComboBox.DataSource = dt; // TargetserverComboBox.Text = "select"; TargetserverComboBox.TextField = "Name"; TargetserverComboBox.ValueField = "ID"; TargetserverComboBox.DataBind(); // TargetserverComboBox.SelectedIndex = 1; confserverComboBox.DataSource = dt; confserverComboBox.TextField = "Name"; confserverComboBox.ValueField = "ID"; confserverComboBox.DataBind(); // confserverComboBox.SelectedIndex = 1; SourceComboBox.DataSource = dt; SourceComboBox.TextField = "Name"; SourceComboBox.ValueField = "ID"; SourceComboBox.DataBind(); // SourceComboBox.SelectedIndex = 1; }
private void BuildLibrary() { var box = new MeeGoHeaderBox() { Title = Catalog.GetString("Library") }; // Build the Library Header var header = new HBox() { Spacing = 5, BorderWidth = 5 }; var app_button = new Button(new Image() { IconSize = (int)IconSize.LargeToolbar, IconName = "media-player-banshee" }) { TooltipText = Catalog.GetString("Launch the Banshee Media Player") }; app_button.Clicked += (o, e) => { ServiceManager.SourceManager.SetActiveSource(ServiceManager.SourceManager.MusicLibrary); ServiceManager.Get <MeeGoService> ().PresentPrimaryInterface(); }; header.PackStart(source_combo_box = new SourceComboBox(), false, false, 0); header.PackStart(app_button, false, false, 0); header.PackStart(search_entry = new SearchEntry(), true, true, 0); box.PackStartHighlighted(header, false, false, 0, MeeGoHeaderBox.HighlightFlags.Background); // Build the Library Views var views = new HBox() { Spacing = 5 }; views.PackStart(SetupView(artist_view = new ArtistListView() { Name = "meego-panel-artists", WidthRequest = 150, DoNotRenderNullModel = true }), false, false, 0); views.PackStart(SetupView(album_view = new AlbumListView() { Name = "meego-panel-albums", DoNotRenderNullModel = true }), true, true, 0); box.PackStart(views, true, true, 0); Attach(box, 0, 1, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); }
//============================================================================* // SetInitialFocus() //============================================================================* private void SetInitialFocus() { if (SourceComboBox.BackColor == Color.LightPink) { SourceComboBox.Focus(); } else { if (BarrelLengthTextBox.BackColor == Color.LightPink) { BarrelLengthTextBox.Focus(); } else { if (TwistTextBox.BackColor == Color.LightPink) { TwistTextBox.Focus(); } else { if (MuzzleVelocityTextBox.BackColor == Color.LightPink) { MuzzleVelocityTextBox.Focus(); } else { if (PressureTextBox.BackColor == Color.LightPink) { PressureTextBox.Focus(); } else { if (BestGroupTextBox.BackColor == Color.LightPink) { BestGroupTextBox.Focus(); } else { if (BestGroupRangeTextBox.BackColor == Color.LightPink) { BestGroupRangeTextBox.Focus(); } else { TestDatePicker.Focus(); } } } } } } } }
private void DefaultComponentState() { SourceComboBox.SelectedIndex = 0; TargetComboBox.SelectedIndex = 1; CommandComboBox.SelectedIndex = 1; ModifierComboBox.SelectedIndex = 0; PayloadTextbox.Clear(); PayloadTextbox.Enabled = false; BrowseButton.Enabled = false; UpdatePacketPreview(); SourceComboBox.Focus(); }
private void raportJournalier_Load(object sender, EventArgs e) { DataTable poleDtrj = GGAO.PoleCRUDOps.getVisiblePole(false, "SELECT"); DataTable SourceDtrj = GGAO.PoleCRUDOps.getVisiblePole(true, "SELECT"); this.PoleCombobox.Clear(); this.SourceComboBox.Clear(); this.PoleCombobox.setFilter(new int[] { 1, 2 }); this.SourceComboBox.setFilter(new int[] { 1, 2 }); this.dateTimePickerLocal.Value = System.DateTime.Now; PoleCombobox.SourceDataString = GGAO.Utilities.Tools.ConvColNametoArray(poleDtrj.Columns); SourceComboBox.SourceDataString = GGAO.Utilities.Tools.ConvColNametoArray(SourceDtrj.Columns); PoleCombobox.DataSource = poleDtrj; SourceComboBox.DataSource = SourceDtrj; PoleCombobox.setTextBox(""); SourceComboBox.setTextBox(""); }
private void Build() { var vbox = new VBox() { Spacing = 12 }; var top = new HBox() { Spacing = 6 }; var bot = new HBox() { Spacing = 6 }; vbox.PackStart(top, false, false, 0); vbox.PackStart(bot, false, false, 0); // Top row: playback buttons, seek slider, full-mode button, volume Widget previous_button = ActionService.PlaybackActions["PreviousAction"].CreateToolItem(); Widget playpause_button = ActionService.PlaybackActions["PlayPauseAction"].CreateToolItem(); Widget button = ActionService.PlaybackActions["NextAction"].CreateToolItem(); Menu menu = ActionService.PlaybackActions.ShuffleActions.CreateMenu(); MenuButton next_button = new MenuButton(button, menu, true); top.PackStart(previous_button, false, false, 0); top.PackStart(playpause_button, false, false, 0); top.PackStart(next_button, false, false, 0); seek_slider = new ConnectedSeekSlider(); top.PackStart(seek_slider, true, true, 0); var fullmode_button = new Button() { Label = Catalog.GetString("Full Mode"), Image = new Image(Stock.LeaveFullscreen, Gtk.IconSize.Button), Relief = Gtk.ReliefStyle.None }; fullmode_button.Clicked += OnFullmode; top.PackStart(fullmode_button, false, false, 0); volume_button = new ConnectedVolumeButton(); top.PackStart(volume_button, false, false, 0); // Bottom row: source dropdown, track info display (cover art, etc), repeat mode button source_combo_box = new SourceComboBox(); bot.PackStart(source_combo_box, false, false, 0); track_info_display = new ClassicTrackInfoDisplay(); track_info_display.WidthRequest = 250; bot.PackStart(track_info_display, true, true, 0); var repeat_align = new Alignment(1, 1, 1, 1); var repeat_toggle_button = new RepeatActionButton(true); repeat_align.Add(repeat_toggle_button); bot.PackEnd(repeat_align, false, false, 0); SetTip(fullmode_button, Catalog.GetString("Switch back to full mode")); SetTip(repeat_toggle_button, Catalog.GetString("Change repeat playback mode")); Add(vbox); }
public MiniMode(BaseClientWindow defaultMainWindow) : base(Catalog.GetString("Banshee Media Player"), "minimode", 0, 0) { default_main_window = defaultMainWindow; glade = new Glade.XML(System.Reflection.Assembly.GetExecutingAssembly(), "minimode.glade", "MiniModeWindow", null); glade.Autoconnect(this); Widget child = glade["mini_mode_contents"]; (child.Parent as Container).Remove(child); Add(child); BorderWidth = 12; Resizable = false; // Playback Buttons Widget previous_button = ActionService.PlaybackActions["PreviousAction"].CreateToolItem(); Widget playpause_button = ActionService.PlaybackActions["PlayPauseAction"].CreateToolItem(); Widget button = ActionService.PlaybackActions["NextAction"].CreateToolItem(); Menu menu = ActionService.PlaybackActions.ShuffleActions.CreateMenu(); MenuButton next_button = new MenuButton(button, menu, true); PlaybackBox.PackStart(previous_button, false, false, 0); PlaybackBox.PackStart(playpause_button, false, false, 0); PlaybackBox.PackStart(next_button, false, false, 0); PlaybackBox.ShowAll(); // Seek Slider/Position Label seek_slider = new ConnectedSeekSlider(); SeekContainer.PackStart(seek_slider, false, false, 0); SeekContainer.ShowAll(); // Volume button volume_button = new ConnectedVolumeButton(); VolumeContainer.PackStart(volume_button, false, false, 0); volume_button.Show(); // Source combobox source_combo_box = new SourceComboBox(); SourceBox.PackStart(source_combo_box, true, true, 0); source_combo_box.Show(); // Track info track_info_display = new ClassicTrackInfoDisplay(); track_info_display.Show(); CoverBox.PackStart(track_info_display, true, true, 0); // Repeat button RepeatActionButton repeat_toggle_button = new RepeatActionButton(); LowerButtonsBox.PackEnd(repeat_toggle_button, false, false, 0); LowerButtonsBox.ShowAll(); tooltip_host = TooltipSetter.CreateHost(); SetTip(fullmode_button, Catalog.GetString("Switch back to full mode")); SetTip(repeat_toggle_button, Catalog.GetString("Change repeat playback mode")); // Hook up everything ServiceManager.PlayerEngine.ConnectEvent(OnPlayerEvent, PlayerEvent.Error | PlayerEvent.StateChange | PlayerEvent.TrackInfoUpdated); SetHeightLimit(); }