public MarginUIElement(RiskTag riskTag, IWpfTextViewLine line)
 {
     this.riskTag = riskTag;
     _line = line;
     entry = EntryCache.GetRiskEntryFor(riskTag.Signature.StringSignature);
     entry.Changed += Refresh;
     entry.Invalidated += CheckUpdate;
     IsVisibleChanged += MarginUIElement_IsVisibleChanged;
     SetUIElements();
 }
Beispiel #2
0
 public MarginUIElement(RiskTag riskTag, IWpfTextViewLine line)
 {
     this.riskTag       = riskTag;
     _line              = line;
     entry              = EntryCache.GetRiskEntryFor(riskTag.Signature.StringSignature);
     entry.Changed     += Refresh;
     entry.Invalidated += CheckUpdate;
     IsVisibleChanged  += MarginUIElement_IsVisibleChanged;
     SetUIElements();
 }
 public static RiskEntry GetRiskEntryFor(string signature)
 {
     VerifyCommunications();
     RiskEntry entry;
     if(!Cache.TryGetValue(signature, out entry))
     {
         entry = new RiskEntry(signature, 0, 20, 0);
         Cache.Add(signature, entry);
         communications.UpdateEntry(entry.Signature);
     }
     if(entry.NeedsRefresh)
     {
         communications.UpdateEntry(entry.Signature);
     }
     return entry;
 }
Beispiel #4
0
        public static RiskEntry GetRiskEntryFor(string signature)
        {
            VerifyCommunications();
            RiskEntry entry;

            if (!Cache.TryGetValue(signature, out entry))
            {
                entry = new RiskEntry(signature, 0, 20, 0);
                Cache.Add(signature, entry);
                communications.UpdateEntry(entry.Signature);
            }
            if (entry.NeedsRefresh)
            {
                communications.UpdateEntry(entry.Signature);
            }
            return(entry);
        }