/// <summary> /// Loads the service details for the given service /// </summary> public void LoadService(IConnectedService service) { if (service != null) { service.StatusChanged -= HandleServiceStatusChanged; foreach (var child in sections.Children.ToArray()) { sections.Remove(child); child.Dispose(); } } this.service = details.Service = service; ConfigurationSectionWidget lastSection = null; if (service.DependenciesSection != null) { var dependencies = lastSection = new ConfigurationSectionWidget(service.DependenciesSection); dependencies.BorderLeft = dependencies.BorderRight = dependencies.BorderBottom = true; dependencies.BorderTop = false; dependencies.BorderWidth = 1; sections.PackStart(dependencies); if (service.Status != Status.Added) { dependencies.Expanded = true; } } foreach (var section in service.Sections) { var w = lastSection = new ConfigurationSectionWidget(section); w.BorderLeft = w.BorderRight = w.BorderBottom = true; w.BorderTop = false; w.BorderWidth = 1; sections.PackStart(w); } if (lastSection != null) { lastSection.CornerRadius = new Components.RoundedFrameBox.BorderCornerRadius(0, 0, 6, 6); } service.StatusChanged += HandleServiceStatusChanged; // expand the first unconfigured section if the service is already added to the project if (service.Status == Status.Added) { ExpandFirstOrUnconfiguredSection(); } Accessible.Label = service.DisplayName; }
/// <summary> /// Loads the service details for the given service /// </summary> public void LoadService (IConnectedService service) { if (service != null) { service.StatusChanged -= HandleServiceStatusChanged; foreach (var child in sections.Children.ToArray ()) { sections.Remove (child); child.Dispose (); } } this.service = details.Service = service; ConfigurationSectionWidget lastSection = null; if (service.DependenciesSection != null) { var dependencies = lastSection = new ConfigurationSectionWidget (service.DependenciesSection); dependencies.BorderLeft = dependencies.BorderRight = dependencies.BorderBottom = true; dependencies.BorderTop = false; dependencies.BorderWidth = 1; sections.PackStart (dependencies); if (service.Status != Status.Added) dependencies.Expanded = true; } foreach (var section in service.Sections) { var w = lastSection = new ConfigurationSectionWidget (section); w.BorderLeft = w.BorderRight = w.BorderBottom = true; w.BorderTop = false; w.BorderWidth = 1; sections.PackStart (w); } if (lastSection != null) lastSection.CornerRadius = new Components.RoundedFrameBox.BorderCornerRadius (0, 0, 6, 6); service.StatusChanged += HandleServiceStatusChanged; // expand the first unconfigured section if the service is already added to the project if (service.Status == Status.Added) { ExpandFirstOrUnconfiguredSection (); } }