public RulesBoxLine(string text, IHyperlinkObject[] objects, bool displayRemove) { m_Text = text; m_displayRemove = displayRemove; System.Reflection.Assembly assem = this.GetType().Assembly; m_RemoveButton = new System.Drawing.Bitmap(assem.GetManifestResourceStream("Workshare.Policy.UI.RulesBoxControl.Resources.RemoveButton.bmp")); int prevIdx = 0; int idx = text.IndexOf("%"); int firstIdx = 0; while (0 <= idx) { string hyperlinkIdx = text.Substring(idx + 1, 1); IHyperlinkObject obj = null; try { int actualIdx = Convert.ToInt32(hyperlinkIdx, System.Globalization.CultureInfo.InvariantCulture); if (0 == firstIdx) firstIdx = -actualIdx; obj = objects[actualIdx + firstIdx]; } catch (ArgumentOutOfRangeException) { throw new RulesBoxLineException("There is a mismatch between the number of hyperlinks defined in parameter [text], and the number of objects."); } if (idx > 0) m_TextObjects.Add(text.Substring(prevIdx, idx - prevIdx)); m_TextObjects.Add(new HyperlinkElement(obj)); m_HyperlinkObjects.Add(obj); prevIdx = idx + 2; idx = text.IndexOf("%", prevIdx); } if (prevIdx < text.Length) m_TextObjects.Add(text.Substring(prevIdx, text.Length - prevIdx)); }
public ConditionEventArgs(IConditionGroup conditionGroup, ConditionDisplayBase conditionMethodDisplay, IHyperlinkObject hyperlinkObject) { m_conditionGroup = conditionGroup; m_hyperlinkObject = hyperlinkObject; Add(conditionMethodDisplay); }
public ConditionEventArgs(IConditionGroup conditionGroup, IHyperlinkObject hyperlinkObject) { m_conditionGroup = conditionGroup; m_hyperlinkObject = hyperlinkObject; }
public HyperlinkElement(IHyperlinkObject obj) { m_Object = obj; }
public RulesBoxLine(string text, IHyperlinkObject[] objects) : this(text, objects, false) { }