Пример #1
0
        public static TabStop NewInstance(float currentPosition, float tabInterval)
        {
            currentPosition = (float)Math.Round(currentPosition * 1000) / 1000;
            tabInterval = (float)Math.Round(tabInterval * 1000) / 1000;

            TabStop tabStop = new TabStop(currentPosition + tabInterval - currentPosition % tabInterval);
            return tabStop;
        }
Пример #2
0
        public static TabStop NewInstance(float currentPosition, float tabInterval)
        {
            currentPosition = (float)Math.Round(currentPosition * 1000) / 1000;
            tabInterval = (float)Math.Round(tabInterval * 1000) / 1000;

            TabStop tabStop = new TabStop(currentPosition + tabInterval - currentPosition % tabInterval);
            return tabStop;
        }
Пример #3
0
 public static TabStop getTabStopNewInstance(float currentPosition, TabSettings tabSettings)
 {
     if (tabSettings != null)
     {
         return(tabSettings.GetTabStopNewInstance(currentPosition));
     }
     return(TabStop.NewInstance(currentPosition, DEFAULT_TAB_INTERVAL));
 }
Пример #4
0
        public TabStop GetTabStopNewInstance(float currentPosition)
        {
            TabStop tabStop = null;
            if (tabStops != null)
            {
                foreach (TabStop currentTabStop in tabStops)
                {
                    if (currentTabStop.Position - currentPosition > 0.001)
                    {
                        tabStop = new TabStop(currentTabStop);
                        break;
                    }
                }
            }

            if (tabStop == null)
            {
                tabStop = TabStop.NewInstance(currentPosition, tabInterval);
            }

            return tabStop;
        }
Пример #5
0
        virtual public TabStop GetTabStopNewInstance(float currentPosition)
        {
            TabStop tabStop = null;

            if (tabStops != null)
            {
                foreach (TabStop currentTabStop in tabStops)
                {
                    if (currentTabStop.Position - currentPosition > 0.001)
                    {
                        tabStop = new TabStop(currentTabStop);
                        break;
                    }
                }
            }

            if (tabStop == null)
            {
                tabStop = TabStop.NewInstance(currentPosition, tabInterval);
            }

            return(tabStop);
        }
Пример #6
0
 public TabStop(TabStop tabStop)
     : this(tabStop.Position, tabStop.Leader, tabStop.Align, tabStop.AnchorChar)
 {
 }
Пример #7
0
 public TabStop(TabStop tabStop)
     : this(tabStop.Position, tabStop.Leader, tabStop.Align, tabStop.AnchorChar)
 {
 }