コード例 #1
0
        private void RebuildVisualSplits()
        {
            Components      = new List <IComponent>();
            SplitComponents = new List <SplitComponent>();
            InternalComponent.VisibleComponents = Components;

            var totalSplits = Settings.ShowBlankSplits ? Math.Max(Settings.VisualSplitCount, visualSplitCount) : visualSplitCount;

            if (Settings.ShowColumnLabels && CurrentState.Layout.Mode == LayoutMode.Vertical)
            {
                Components.Add(new LabelsComponent(Settings, ColumnsList));
                Components.Add(new SeparatorComponent());
            }

            for (var i = 0; i < totalSplits; ++i)
            {
                if ((i == totalSplits - 1 && totalSplits > 1 && Settings.LockLastSplit && i > 0) ||
                    (i == visualSplitCount - 1 && totalSplits > 1 && !Settings.LockLastSplit && i > 0))
                {
                    LastSplitSeparatorIndex = Components.Count;
                    if (Settings.AlwaysShowLastSplit && Settings.SeparatorLastSplit)
                    {
                        Components.Add(new SeparatorComponent());
                    }
                    else if (Settings.ShowThinSeparators)
                    {
                        Components.Add(new ThinSeparatorComponent());
                    }
                }

                var splitComponent = new SplitComponent(Settings);
                Components.Add(splitComponent);
                if (i < visualSplitCount - 1 + (Settings.LockLastSplit ? 0 : 1) || i == totalSplits - 1 + (Settings.LockLastSplit ? 0 : 1))
                {
                    SplitComponents.Add(splitComponent);
                }

                if (Settings.ShowThinSeparators && ((i < totalSplits - 2 && Settings.LockLastSplit) || (!Settings.LockLastSplit && i != visualSplitCount - 2 && i < totalSplits - 1)))
                {
                    Components.Add(new ThinSeparatorComponent());
                }
            }
        }
コード例 #2
0
        private void RebuildVisualSplits()
        {
            Components      = new List <IComponent>();
            SplitComponents = new List <SplitComponent>();
            InternalComponent.VisibleComponents = Components;

            if (Settings.ShowColumnLabels && CurrentState.Layout.Mode == LayoutMode.Vertical)
            {
                Components.Add(new LabelsComponent(Settings, ColumnsList));
                Components.Add(new SeparatorComponent());
            }

            for (var i = 0; i < visualSplitCount; ++i)
            {
                if (i == visualSplitCount - 1 && i > 0)
                {
                    LastSplitSeparatorIndex = Components.Count;
                    if (Settings.AlwaysShowLastSplit && Settings.SeparatorLastSplit)
                    {
                        Components.Add(new SeparatorComponent());
                    }
                    else if (Settings.ShowThinSeparators)
                    {
                        Components.Add(new ThinSeparatorComponent());
                    }
                }

                var splitComponent = new SplitComponent(Settings, ColumnsList);
                Components.Add(splitComponent);
                SplitComponents.Add(splitComponent);

                if (Settings.ShowThinSeparators && i < visualSplitCount - 2)
                {
                    Components.Add(new ThinSeparatorComponent());
                }
            }
        }
コード例 #3
0
        private void RebuildVisualSplits()
        {
            Components = new List<IComponent>();
            SplitComponents = new List<SplitComponent>();
            InternalComponent.VisibleComponents = Components;

            var totalSplits = Settings.ShowBlankSplits ? Math.Max(Settings.VisualSplitCount, visualSplitCount) : visualSplitCount;

            if (Settings.ShowColumnLabels && CurrentState.Layout.Mode == LayoutMode.Vertical)
            {
                Components.Add(new LabelsComponent(Settings, ColumnsList));
                Components.Add(new SeparatorComponent());
            }

            for (var i = 0; i < totalSplits; ++i)
            {
                if (i == totalSplits - 1 && i > 0)
                {
                    LastSplitSeparatorIndex = Components.Count;
                    if (Settings.AlwaysShowLastSplit && Settings.SeparatorLastSplit)
                        Components.Add(new SeparatorComponent());
                    else if (Settings.ShowThinSeparators)
                        Components.Add(new ThinSeparatorComponent());
                }

                var splitComponent = new SplitComponent(Settings, ColumnsList);
                Components.Add(splitComponent);
                if (i < visualSplitCount - 1 || i == (Settings.LockLastSplit ? totalSplits - 1 : visualSplitCount - 1))
                    SplitComponents.Add(splitComponent);                   

                if (Settings.ShowThinSeparators && i < totalSplits - 2)
                    Components.Add(new ThinSeparatorComponent());
            }
        }
コード例 #4
0
        private void RebuildVisualSplits()
        {
            Components = new List<IComponent>();
            SplitComponents = new List<SplitComponent>();
            InternalComponent.VisibleComponents = Components;

            for (var i = 0; i < visualSplitCount; ++i)
            {
                if (i > 0 && i == visualSplitCount - 1)
                {
                    LastSplitSeparatorIndex = Components.Count;
                    if (Settings.AlwaysShowLastSplit && Settings.SeparatorLastSplit)
                        Components.Add(new SeparatorComponent());
                    else if (Settings.ShowThinSeparators)
                        Components.Add(new ThinSeparatorComponent());
                }

                var splitComponent = new SplitComponent(Settings);
                Components.Add(splitComponent);
                SplitComponents.Add(splitComponent);

                if (Settings.ShowThinSeparators && i < visualSplitCount - 2)
                    Components.Add(new ThinSeparatorComponent());
            }
        }