//============================================= // .ctor //============================================= /// <summary> /// SortedArrayBase のインスタンスを作成します。 /// </summary> /// <param name="original">作成の元となるコレクションを指定します。 /// このコレクションの内容を以て初期化されます。</param> public SortedArrayBase(Gen::IList <T> original) : this(original.Count + 4) { if (original == null) { throw new System.ArgumentNullException("original"); } original.CopyTo(this.vals, 0); System.Array.Sort <T>(this.vals); this.count = original.Count; }
//============================================= // .ctor //============================================= /// <summary> /// SortedArray のインスタンスを作成します。 /// </summary> /// <param name="original">作成の元となるコレクションを指定します。 /// このコレクションの内容を以て初期化されます。</param> public SortedArray(Gen::IList <T> original) : base(original) { // 重複する物を削除 for (int i = 1; i < vals.Length; i++) { if (this.vals[i - 1].Equals(this.vals[i])) { this.RemoveAt(--i); } } }
void ExportToXml_WriteNodes(System.IO.StreamWriter sw, Gen::IList <BookmarkNode> nodelist, ref string indent) { foreach (BookmarkNode node in nodelist) { BookmarkLink lnk = node as BookmarkLink; if (lnk != null) { sw.Write(indent); sw.Write("<link name=\"{0}\" url=\"{1}\" ctime=\"{2}\" utime=\"{3}\" charset=\"{4}\"", afh.Text.TextUtils.EscapeXml(lnk.name), afh.Text.TextUtils.EscapeXml(lnk.url), afh.Text.TextUtils.EscapeXml(lnk.ctime.ToString("u")), afh.Text.TextUtils.EscapeXml(lnk.utime.ToString("u")), afh.Text.TextUtils.EscapeXml(lnk.charset) ); if (lnk.faviId >= 0) { sw.Write(" favicon=\"{0}\"", lnk.faviId); } if (lnk.title != null) { sw.Write(" title=\"{0}\"", afh.Text.TextUtils.EscapeXml(lnk.title)); } if (lnk.description != null) { sw.Write(" desc=\"{0}\"", afh.Text.TextUtils.EscapeXml(lnk.description)); } sw.WriteLine("/>"); continue; } BookmarkDir dir = node as BookmarkDir; if (dir != null) { sw.Write(indent); sw.Write("<directory name=\"{0}\" ctime=\"{1}\" utime=\"{2}\"", afh.Text.TextUtils.EscapeXml(dir.name), afh.Text.TextUtils.EscapeXml(dir.ctime.ToString("u")), afh.Text.TextUtils.EscapeXml(dir.utime.ToString("u")) ); if (dir.description != null) { sw.Write(" desc=\"{0}\"", afh.Text.TextUtils.EscapeXml(dir.description)); } sw.WriteLine(">"); indent = " " + indent; this.ExportToXml_WriteNodes(sw, dir.Nodes, ref indent); indent = indent.Substring(2); sw.Write(indent); sw.WriteLine("</directory>"); continue; } BookmarkSep sep = node as BookmarkSep; if (sep != null) { sw.Write(indent); sw.WriteLine("<separator />"); continue; } } }
//============================================= // .ctor //============================================= /// <summary> /// SortedArray のインスタンスを作成します。 /// </summary> /// <param name="original">作成の元となるコレクションを指定します。 /// このコレクションの内容を以て初期化されます。</param> public SortedArrayP(Gen::IList <T> original) : base(original) { }
/// <summary> /// CollectionEditor のコンストラクタです。 /// 指定した <see cref="Gen::IList<T>"/> を使用して初期化を実行します。 /// </summary> public CollectionEditorBase(Gen::IList <T> items) : base() { this.InitializeComponent(); this.InitializeComponent2(); this.list = items; }
/// <summary> /// 指定したリストと番号を使用して ObjectForPropertyGrid を初期化します。 /// </summary> /// <param name="list"><typeparamref name="T"/> の値を含む <see cref="Gen::IList<T>"/> を指定します。</param> /// <param name="index"><paramref name="list"/> 内に於ける対象の <typeparamref name="T"/> の 0 から始まる番号を指定します。</param> public ObjectForPropertyGrid(Gen::IList <T> list, int index) { this.list = list; this.index = index; }
public DummyBase(Gen::IList <T> items) : base(items) { }
public dummyTCONFrameEditor(Gen::IList <Genre> items) : base(items) { }