コード例 #1
0
        protected virtual void DoSelect(RadPanelBarGroupElement[] groups)
        {
            if (groups == null || groups.Length == 0)
            {
                return;
            }

            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupSelecting(groupCancelArgs);
            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group != groups[0])
                {
                    group.Selected = false;
                }
            }
            groups[0].Selected = true;
            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupSelected(groupArgs);
        }
コード例 #2
0
        protected override void DoExpand(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            for (int i = 0; i < groups.Length; i++)
            {
                RadPanelBarGroupElement group = groups[i];
                group.Expanded = true;
                group.Expand(true);
            }

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            UpdateGroupsUI();
            this.panelBar.CallPanelBarGroupExpanded(groupArgs);


            return;
        }
コード例 #3
0
 protected virtual void OnPanelBarGroupCollapsed(PanelBarGroupEventArgs args)
 {
     if (this.PanelBarGroupCollapsed != null)
     {
         this.PanelBarGroupCollapsed(this, args);
     }
 }
コード例 #4
0
        private void RadPanelBarElement_PanelBarGroupCollapsed(object sender, PanelBarGroupEventArgs args)
        {
            if (this.Children.Count > 0 && this.ElementTree != null)
            {
                RadPanelBar panelBar = this.ElementTree.Control as RadPanelBar;

                if (panelBar != null && this.PanelBarStyle != PanelBarStyles.ExplorerBarStyle && this.PanelBarStyle != PanelBarStyles.VisualStudio2005ToolBox)
                {
                    panelBar.vScrollBar.Value       = 0;
                    this.Children[0].PositionOffset = new SizeF(
                        this.Children[0].PositionOffset.Width,
                        0);
                }
            }
        }
コード例 #5
0
ファイル: ListBarStyle.cs プロジェクト: configare/hispeed
        private bool DoExpandCollapse(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                groups[0].Expanded = false;
                return(false);
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group.Expanded && group != groups[0])
                {
                    PanelBarGroupCancelEventArgs groupCollapseCancelArgs = new PanelBarGroupCancelEventArgs(group, false);

                    this.panelBar.CallPanelBarGroupCollapsing(groupCancelArgs);

                    if (groupCollapseCancelArgs.Cancel)
                    {
                        this.panelBar.EndUpdate();
                        return(false);
                    }

                    group.Expanded = false;
                    group.Expand(false);

                    PanelBarGroupEventArgs groupCollapseArgs = new PanelBarGroupEventArgs(group);
                    this.panelBar.CallPanelBarGroupCollapsed(groupCollapseArgs);
                }
            }

            groups[0].Expand(true);
            groups[0].Expanded = true;

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            this.panelBar.CallPanelBarGroupExpanded(groupArgs);

            return(true);
        }
コード例 #6
0
        protected override void DoExpand(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            this.panelBar.CallPanelBarGroupExpanded(groupArgs);

            return;
        }
コード例 #7
0
        private void DoSelectUnSelect(RadPanelBarGroupElement[] groups)
        {
            if (groups == null || groups.Length == 0)
            {
                return;
            }

            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupSelecting(groupCancelArgs);
            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group != groups[0])
                {
                    group.Selected = false;
                }
            }
            groups[0].Selected = true;

            if (this.itemsControl.ThemeName != this.GetRadPanelBarElement().ElementTree.ComponentTreeHandler.ThemeName)
            {
                this.itemsControl.ThemeName = this.GetRadPanelBarElement().ElementTree.ComponentTreeHandler.ThemeName;
            }

            MoveContent(groups[0]);
            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupSelected(groupArgs);

            UnWireEvents();
            this.panelBar.SetStyle();
        }
コード例 #8
0
        protected override void DoUnSelect(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupUnSelecting(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                group.Selected = false;
            }

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupUnSelected(groupArgs);
        }
コード例 #9
0
 internal void CallPanelBarGroupCollapsed(PanelBarGroupEventArgs args)
 {
     OnPanelBarGroupCollapsed(args);
 }
コード例 #10
0
 internal void CallPanelBarGroupUnSelected(PanelBarGroupEventArgs args)
 {
     OnPanelBarGroupUnSelected(args);
 }
コード例 #11
0
 internal void CallPanelBarGroupExpanded(PanelBarGroupEventArgs args)
 {
     OnPanelBarGroupExpanded(args);
 }