1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using System.Collections.Generic;
6
using ICSharpCode.Core;
8
namespace ICSharpCode.SharpDevelop
10
public class DefaultOptionPanelDescriptor : IOptionPanelDescriptor
12
string id = String.Empty;
13
List<IOptionPanelDescriptor> optionPanelDescriptors = null;
14
IOptionPanel optionPanel = null;
22
public string Label { get; set; }
24
public IEnumerable<IOptionPanelDescriptor> ChildOptionPanelDescriptors {
26
return optionPanelDescriptors;
32
string optionPanelPath;
34
public IOptionPanel OptionPanel {
36
if (optionPanelPath != null) {
37
if (optionPanel == null) {
38
optionPanel = (IOptionPanel)addin.CreateObject(optionPanelPath);
39
if (optionPanel != null) {
40
optionPanel.Owner = owner;
43
optionPanelPath = null;
50
public bool HasOptionPanel {
52
return optionPanelPath != null;
56
public DefaultOptionPanelDescriptor(string id, string label)
62
public DefaultOptionPanelDescriptor(string id, string label, List<IOptionPanelDescriptor> dialogPanelDescriptors) : this(id, label)
64
this.optionPanelDescriptors = dialogPanelDescriptors;
67
public DefaultOptionPanelDescriptor(string id, string label, AddIn addin, object owner, string optionPanelPath) : this(id, label)
71
this.optionPanelPath = optionPanelPath;