Exemplo n.º 1
0
        public void AddTabColumnTest()
        {
            var s0 = "(2,4,6)";
            var c0 = 5;
            var s1 = "(2,4,5,6)";
            var d  = new TabStops(s0);

            d.AddTabStop(-4);
            Assert.Equal(s0, d.ToString());
            d.AddTabStop(c0);
            Assert.Equal(s1, d.ToString());
        }
Exemplo n.º 2
0
        protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
        {
            if (!tabStops._fClearAll)
            {
                foreach (TabStop refTabStop in refTabStops)
                {
                    if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
                    {
                        tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
                    }
                }
            }

            for (int i = 0; i < tabStops.Count; i++)
            {
                TabStop tabStop = tabStops[i];
                if (!tabStop.AddTab)
                {
                    tabStops.RemoveObjectAt(i);
                }
            }
            // The TabStopCollection is complete now.
            // Prevent inheritence of tab stops.
            tabStops._fClearAll = true;
        }
Exemplo n.º 3
0
        protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
        {
            if (!tabStops.fClearAll)
            {
                foreach (TabStop refTabStop in refTabStops)
                {
                    if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
                    {
                        tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
                    }
                }
            }

            for (int i = 0; i < tabStops.Count; i++)
            {
                TabStop tabStop = tabStops[i];
                if (!tabStop.AddTab)
                {
                    tabStops.RemoveObjectAt(i);
                }
            }
            //Die TabStopCollection ist so wie sie jetzt ist vollständig.
            //Sie darf daher nichts erben, d.h. :
            tabStops.fClearAll = true;
        }
Exemplo n.º 4
0
        protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
        {
            if (!tabStops._fClearAll)
            {
                foreach (TabStop refTabStop in refTabStops)
                {
                    if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
                        tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
                }
            }

            for (int i = 0; i < tabStops.Count; i++)
            {
                TabStop tabStop = tabStops[i];
                if (!tabStop.AddTab)
                    tabStops.RemoveObjectAt(i);
            }
            // The TabStopCollection is complete now.
            // Prevent inheritence of tab stops.
            tabStops._fClearAll = true;
        }
Exemplo n.º 5
0
    protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
    {
      if (!tabStops.fClearAll)
      {
        foreach (TabStop refTabStop in refTabStops)
        {
          if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
            tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
        }
      }

      for (int i = 0; i < tabStops.Count; i++)
      {
        TabStop tabStop = tabStops[i];
        if (!tabStop.AddTab)
          tabStops.RemoveObjectAt(i);
      }
      //Die TabStopCollection ist so wie sie jetzt ist vollständig.
      //Sie darf daher nichts erben, d.h. :
      tabStops.fClearAll = true;
    }