[ToolboxItem(false)]
[ParseChildren(true)]
[Editor(typeof(SelectCommandCollectionEditor), typeof(UITypeEditor))]
public class SelectCommandCollection:Collection<SearchSelect>
{
public SelectCommandCollection()
:base()
{}
public new int Count{get{return base.Count;}}
public bool IsReadOnly{get{return false;}}
public new void Add(SearchSelect se){base.Add(se);}
public new void Clear(){base.Clear();}
public new bool Contains(SearchSelect se){return base.Contains(se);}
public new bool Remove(SearchSelect se){return base.Remove(se);}
public new SearchSelect this[int index]
{
get{return base[index];}
set{base[index]=value;}
}
}
[ToolboxItem(false)]
[ParseChildren(true)]
[Editor(typeof(OptionCommandCollectionEditor), typeof(UITypeEditor))]
public class OptionCommandCollection : Collection<SearchOption>
{
public OptionCommandCollection() : base() { }
public new int Count { get { return base.Count; } }
public bool IsReadOnly { get { return false; } }
public new void Add(SearchOption op) { base.Add(op); }
public new void Clear() { base.Clear(); }
public new bool Contains(SearchOption op) { return base.Contains(op); }
public new bool Remove(SearchOption op) { return base.Remove(op); }
public new SearchOption this[int index]
{
get { return base[index]; }
set { base[index] = value; }
}
}
public class SelectCommandCollectionEditor : CollectionEditor
{
public SelectCommandCollectionEditor(Type type) : base(type) { }
protected override bool CanSelectMultipleInstances() { return true; }
protected override Type[] CreateNewItemTypes()
{
return new Type[] { typeof(SearchSelect)};
}
protected override object CreateInstance(Type itemType)
{
if (itemType == typeof(SearchSelect)) { return new SearchSelect(); }
return null;
}
}
public class OptionCommandCollectionEditor : CollectionEditor
{
public OptionCommandCollectionEditor(Type type) : base(type) { }
protected override bool CanSelectMultipleInstances() { return true; }
protected override Type[] CreateNewItemTypes()
{
return new Type[] { typeof(SearchOption) };
}
protected override object CreateInstance(Type itemType)
{
if (itemType == typeof(SearchOption)) { return new SearchOption(); }
return null;
}
}
///////////////////////////////////////////////
public class ScriptItem
{
private string _Text;
[DefaultValue("")]
[Editor("System.ComponentModel.Design.MultilineStringEditor,System.Design", typeof(UITypeEditor))]
[PersistenceMode(PersistenceMode.EncodedInnerDefaultProperty)]
[NotifyParentProperty(true)]
/// <summary>
/// JavaScript脚本块
/// </summary>
public string Text
{
get
{