/// <summary> /// Loads the given services into the gallery /// </summary> public void LoadServices(IConnectedService [] services) { this.services = services; ClearServices(); //TODO: sort the lists foreach (var service in services) { var serviceWidget = new ServiceWidget(service); serviceWidget.MarginTop = 5; if (service.Status == Status.Added) { enabledList.PackStart(serviceWidget); enabledLabel.Visible = true; } else { availableList.PackStart(serviceWidget); availableLabel.Visible = true; } serviceWidget.ButtonReleased += HandleServiceWidgetButtonReleased; service.StatusChanged += HandleServiceStatusChanged; serviceWidget.Cursor = CursorType.Hand; } }
public ServiceDetailsWidget() { Margin = 30; var container = new VBox(); details = new ServiceWidget(true); details.BorderWidth = 1; details.CornerRadius = new Components.RoundedFrameBox.BorderCornerRadius(6, 6, 0, 0); sections = new VBox(); container.Spacing = sections.Spacing = 0; container.PackStart(details); container.PackStart(sections); Content = container; }