/// <summary> /// Constructor /// </summary> /// <param name="parts">TextParts that the AdifExistsMacro is contained in</param> /// <param name="part">AdifExistsMacro object displayed in this group box</param> /// <param name="includeContextMenu">Indicator for whether to include the /// context menu. Values are INCLUDECONTEXTMENU and DONOTINCLUDECONTEXTMENU</param> public AdifExistsMacroGroupBox(TextParts parts, TextPart part, bool includeContextMenu) : base(parts, part, includeContextMenu) { InitializeComponent(); AdifExistsMacro macro = part as AdifExistsMacro; SeparateCheckBox.DataContext = macro; AdifField.DataContext = macro.AdifField; foreach(TextPart p in macro.DesignText) { MacroGroupBox box = p.BuildGroupBox(macro.DesignText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; DesignTextPanel.Children.Add(box); } foreach(TextPart p in macro.ExistsText) { MacroGroupBox box = p.BuildGroupBox(macro.ExistsText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; ExistsTextPanel.Children.Add(box); } foreach(TextPart p in macro.DoesntExistText) { MacroGroupBox box = p.BuildGroupBox(macro.DoesntExistText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; DoesntExistTextPanel.Children.Add(box); } }
/// <summary> /// Constructor /// </summary> /// <param name="parts">TextParts that the CountMacro is contained in</param> /// <param name="part">CountMacro object displayed in this group box</param> /// <param name="includeContextMenu">Indicator for whether to include the /// context menu. Values are INCLUDECONTEXTMENU and DONOTINCLUDECONTEXTMENU</param> public CountMacroGroupBox(TextParts parts, TextPart part, bool includeContextMenu) : base(parts, part, includeContextMenu) { InitializeComponent(); CountMacro macro = part as CountMacro; this.DataContext = macro; foreach(TextPart p in macro.DesignText) { MacroGroupBox box = p.BuildGroupBox(macro.DesignText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; DesignTextPanel.Children.Add(box); } foreach(TextPart p in macro.TrueText) { MacroGroupBox box = p.BuildGroupBox(macro.TrueText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; TrueTextPanel.Children.Add(box); } foreach(TextPart p in macro.FalseText) { MacroGroupBox box = p.BuildGroupBox(macro.FalseText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; FalseTextPanel.Children.Add(box); } }
/// <summary> /// Constructor /// </summary> /// <param name="parts">TextParts that the ManagerMacro is contained in</param> /// <param name="part">ManagerMacro object displayed in this group box</param> /// <param name="includeContextMenu">Indicator for whether to include the /// context menu. Values are INCLUDECONTEXTMENU and DONOTINCLUDECONTEXTMENU</param> public ManagerMacroGroupBox(TextParts parts, TextPart part, bool includeContextMenu) : base(parts, part, includeContextMenu) { InitializeComponent(); ManagerMacro macro = part as ManagerMacro; foreach(TextPart p in macro.DesignText) { MacroGroupBox box = p.BuildGroupBox(macro.DesignText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; DesignTextPanel.Children.Add(box); } foreach(TextPart p in macro.NoManagerText) { MacroGroupBox box = p.BuildGroupBox(macro.NoManagerText, INCLUDECONTENTMENU); box.Margin = INSETMARGIN; NoManagerTextPanel.Children.Add(box); } }
/// <summary> /// Constructor /// </summary> /// <param name="parts">TextParts object that the specified TextPart is part of</param> /// <param name="part">TextPart object to display</param> /// <param name="includeContextMenu">Indicator for whether to include the /// context menu. Values are INCLUDECONTEXTMENU and DONOTINCLUDECONTEXTMENU</param> public MacroGroupBox(TextParts parts, TextPart part, bool includeContextMenu) { SetValue(PartItemsPropertyKey, parts); PartItem = part; InitializeGroupBox(includeContextMenu); }
/// <summary> /// Constructor /// </summary> /// <param name="parts">TextParts object that contains the specified StaticText object</param> /// <param name="part">StaticText object to be displayed</param> /// <param name="includeContextMenu">Indicator for whether to include the /// context menu. Values are INCLUDECONTEXTMENU and DONOTINCLUDECONTEXTMENU</param> public StaticTextGroupBox(TextParts parts, TextPart part, bool includeContextMenu) : base(parts, part, includeContextMenu) { InitializeComponent(); }