Example #1
0
 public override void PrintTo(TextWriter wr, PrintCtx ctx, Boolean isLast)
 {
     foreach (KeyValuePair <Int64, FileSystemItem> kv in GetItems())
     {
         kv.Value.PrintTo(wr, ctx, isLast);
     }
 }
Example #2
0
            public virtual void PrintTo(TextWriter wr, PrintCtx ctx, Boolean isLast)
            {
                PrintTabs(wr, ctx, isLast);
                String prt = Name;

                if (this is FsDrive)
                {
                    prt += ":";
                }
                wr.WriteLine(prt);
            }
Example #3
0
 protected void PrintTabs(TextWriter wr, PrintCtx ctx, Boolean isLast)
 {
     for (Int32 i = 0; i < ctx.Tabs.Count; ++i)
     {
         String spc = new String(' ', ctx.Tabs[i]);
         wr.Write(spc);
         wr.Write(ctx.IsTheLast[i] ? ' ':'|');
     }
     if (ctx.Level > 0)
     {
         wr.Write('_');
     }
 }
Example #4
0
            public override void PrintTo(TextWriter wr, PrintCtx ctx, Boolean isLast)
            {
                base.PrintTo(wr, ctx, isLast);

                ctx.Level += 1;
                ctx.Tabs.Add(Name.Length - 1);
                if (ctx.IsTheLast.Count > 0)
                {
                    ctx.IsTheLast[ctx.IsTheLast.Count - 1] = isLast;
                }
                ctx.IsTheLast.Add(false);

                SortedList <String, FileSystemItem> lst = GetChildsView(Sorting.ByName_Asc);

                foreach (KeyValuePair <String, FileSystemItem> kv in lst)
                {
                    kv.Value.PrintTo(wr, ctx, lst.IndexOfKey(kv.Key) == lst.Count - 1);
                }

                ctx.IsTheLast.RemoveAt(ctx.IsTheLast.Count - 1);
                ctx.Tabs.RemoveAt(ctx.Tabs.Count - 1);
                ctx.Level -= 1;
            }
Example #5
0
        public void PrintTo(TextWriter wr)
        {
            PrintCtx ctx = new PrintCtx();

            _root.PrintTo(wr, ctx, false);
        }
Example #6
0
 public override void PrintTo(TextWriter wr, PrintCtx ctx, Boolean isLast)
 {
     PrintTabs(wr, ctx, isLast);
     wr.WriteLine(String.Format("{0}[{1}]", IsDynamic ? "dlink":"hlink", _itemTo.GetFullPath()));
 }