// // // // // $Revision$ // using System; using System.Drawing; using ICSharpCode.Core; namespace ICSharpCode.CodeCoverage { public class CodeCoverageOptions { public static readonly string OptionsProperty = "CodeCoverage.Options"; #region Property names public static readonly string VisitedColorProperty = "VisitedColor"; public static readonly string VisitedForeColorProperty = "VisitedForeColor"; public static readonly string NotVisitedColorProperty = "NotVisitedColor"; public static readonly string NotVisitedForeColorProperty = "NotVisitedForeColor"; // This name is also referenced by CodeCoverage.addin public static readonly string CodeCoverageHighlightedProperty = "CodeCoverageHighlighted"; public static readonly string ShowSourceCodePanelProperty = "ShowSourceCodePanel"; public static readonly string ShowVisitCountPanelProperty = "ShowVisitCountPanel"; #endregion static Properties properties; static CodeCoverageOptions() { properties = PropertyService.Get(OptionsProperty, new Properties()); } public static Properties Properties { get { return properties; } } /// /// Enables/disables code coverage highlighting. /// public static bool CodeCoverageHighlighted { get { return Properties.Get(CodeCoverageHighlightedProperty, false); } set { Properties.Set(CodeCoverageHighlightedProperty, value); } } /// /// Shows/hides the source code panel in the code coverage pad. /// public static bool ShowSourceCodePanel { get { return Properties.Get(ShowSourceCodePanelProperty, false); } set { Properties.Set(ShowSourceCodePanelProperty, value); } } /// /// Shows/hides the visit count panel in the code coverage pad. /// public static bool ShowVisitCountPanel { get { return Properties.Get(ShowVisitCountPanelProperty, true); } set { Properties.Set(ShowVisitCountPanelProperty, value); } } /// /// Gets the colour that will be used when highlighting visited code. /// public static Color VisitedColor { get { return Properties.Get(VisitedColorProperty, Color.Lime); } set { Properties.Set(VisitedColorProperty, value); } } /// /// Gets the foreground colour that will be used when highlighting /// visited code. /// public static Color VisitedForeColor { get { return Properties.Get(VisitedForeColorProperty, Color.Black); } set { Properties.Set(VisitedForeColorProperty, value); } } /// /// Gets the colour that will be used when highlighting code that has not /// been visited. /// public static Color NotVisitedColor { get { return Properties.Get(NotVisitedColorProperty, Color.Red); } set { Properties.Set(NotVisitedColorProperty, value); } } /// /// Gets the foreground colour that will be used when highlighting /// code that has not been visited. /// public static Color NotVisitedForeColor { get { return Properties.Get(NotVisitedForeColorProperty, Color.White); } set { Properties.Set(NotVisitedForeColorProperty, value); } } } }