public void RedrawButton(DashboardButton b) { DashboardButtonView co = Objects.OfType <DashboardButtonView> ().FirstOrDefault(o => o.Button == b); if (co != null) { co.ReDraw(); } }
public void Click(DashboardButton b, TagVM tag = null) { DashboardButtonView co = Objects.OfType <DashboardButtonView> ().FirstOrDefault(o => o.Button == b); if (tag != null && co is AnalysisEventButtonView) { (co as AnalysisEventButtonView).ClickTag(tag); } else { co.Click(); } }
void AddActionLinks(DashboardButtonView buttonObject) { foreach (ActionLinkVM link in buttonObject.ButtonVM.ActionLinks) { LinkAnchorView sourceAnchor, destAnchor; ActionLinkView linkObject; sourceAnchor = buttonObject.GetAnchor(link.SourceTags.ViewModels); try { var but = buttonsDict [link.DestinationButton]; destAnchor = buttonsDict [link.DestinationButton].GetAnchor(link.DestinationTags.ViewModels); } catch { Log.Error("Skipping link with invalid destination tags"); continue; } linkObject = new ActionLinkView(sourceAnchor, destAnchor, link); link.SourceButton = buttonObject.ButtonVM; linkObject.Visible = ViewModel.ShowLinks; AddObject(linkObject); linksDict.Add(link, linkObject); } }