private void BreadCrumb_Clicked(object sender, BreadcrumbClickedEventArgs e) { Breadcrumb breadcrumb = e.Breadcrumb; ElementProperties ep = breadcrumb.Tag as ElementProperties; Utility.AsyncCall(() => this._elementsBuilder.RenewElementsByAncestor(ep.AutomationElement)); }
private void myLinkLabel_Click(object sender, System.EventArgs e) { //event is raised to the form that holds this control LinkLabel label = (LinkLabel)sender; Breadcrumb crumb = GetBreadcrumbFromIndex((int)label.Tag); ItemClicked(this, new BreadcrumbClickedEventArgs(crumb)); //TODO: originally sender //we are moving back in the menu so we need to adjust our menu. RemoveLaterItems(((Control)sender).Tag.ToString()); //TODO label.Enabled = false; }
internal Breadcrumb[] GetItems() { List <Breadcrumb> list = new List <Breadcrumb>(_itemCount); for (int i = 0; i < _itemCount; i++) { Breadcrumb breadcrumb = GetBreadcrumbFromIndex(i); list.Add(breadcrumb); } return(list.ToArray()); }
private Breadcrumb GetBreadcrumbFromIndex(int index) { Breadcrumb breadcrumb = new Breadcrumb(); Control[] controls = flowLayoutPanel1.Controls.Find(PrefixCheckBox + index.ToString(), true); CheckBox checkbox = (controls.Length > 0) ? (CheckBox)controls[0] : null; breadcrumb.Checked = checkbox != null && checkbox.Checked; controls = flowLayoutPanel1.Controls.Find(PrefixLinkLabel + index.ToString(), true); LinkLabel label = (controls.Length > 0) ? (LinkLabel)controls[0] : null; breadcrumb.Text = (label != null) ? label.Text : null; breadcrumb.Tag = _tags[index]; return(breadcrumb); }
public BreadcrumbClickedEventArgs(Breadcrumb crumb) { Breadcrumb = new Breadcrumb(); this.Breadcrumb = crumb; }