示例#1
0
        private void breadCrumbSeparator_Click(object sender, EventArgs e)
        {
            //If separator has been clicked once clear all
            if (((ToolStripLabel)sender).LinkColor == Color.OrangeRed)
            {
                int deletedIndex   = breadCrumbToolStrip.Items.IndexOf(sender as ToolStripLabel);
                var crumbsToRemove = new List <BreadCrumb>();
                for (int x = breadCrumbToolStrip.Items.Count - 1; x > deletedIndex; x -= 3)
                {
                    crumbsToRemove.Add(breadCrumbToolStrip.Items[x].Tag as BreadCrumb);
                }
                var newBreadCrumbEvent = new BreadCrumbClickedEventArgs(null);
                newBreadCrumbEvent.BreadCrumbList = crumbsToRemove;
                BreadCrumbClicked(sender, newBreadCrumbEvent);
            }

            //Indicate that separator has been clicked once
            ((ToolStripLabel)sender).LinkColor = Color.OrangeRed;
            ((ToolStripLabel)sender).LinkColor = Color.OrangeRed;
        }
示例#2
0
        private void breadCrumbSeparator_Click(object sender, EventArgs e)
        {
            //If separator has been clicked once clear all
            if (((ToolStripLabel)sender).LinkColor == Color.OrangeRed)
            {
                int deletedIndex = breadCrumbToolStrip.Items.IndexOf(sender as ToolStripLabel);
                var crumbsToRemove = new List<BreadCrumb>();
                for (int x = breadCrumbToolStrip.Items.Count - 1; x > deletedIndex; x -= 3)
                    crumbsToRemove.Add(breadCrumbToolStrip.Items[x].Tag as BreadCrumb);
                var newBreadCrumbEvent = new BreadCrumbClickedEventArgs(null);
                newBreadCrumbEvent.BreadCrumbList = crumbsToRemove;
                BreadCrumbClicked(sender, newBreadCrumbEvent);
            }

            //Indicate that separator has been clicked once
            ((ToolStripLabel)sender).LinkColor = Color.OrangeRed;
            ((ToolStripLabel) sender).LinkColor = Color.OrangeRed;
        }
示例#3
0
        void breadCrumbControl_BreadCrumbClicked (object sender, BreadCrumbClickedEventArgs e)
        {
            lock (this)
                if (mainViewsLoaded < 5)
                    return;

            if (e.BreadCrumb == null && e.BreadCrumbList != null)
                foreach (var crumb in e.BreadCrumbList)
                    breadCrumbControl.BreadCrumbs.Remove(crumb);
            else
                breadCrumbControl.BreadCrumbs.Remove(e.BreadCrumb);
            

            // start with the basic filter
            viewFilter = basicFilter;

            // create the view filter from the BreadCrumb list
            if (breadCrumbControl.BreadCrumbs.Count > 0)
                viewFilter += breadCrumbControl.BreadCrumbs.Select(o => o.Tag as DataFilter).Aggregate((x, y) => x + y);
            setData();
        }