Example #1
0
        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);
            }
        }