Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -0,0 +1,62 @@ +using System.Drawing; +using Core.Common.Controls.Swf.Charting; +using Core.Common.Controls.Views; +using Core.Common.Gui; + +namespace Core.Plugins.CommonTools.Gui.Commands.Charting +{ + public abstract class ChartViewCommandBase : GuiCommand + { + public override bool Enabled + { + get + { + return View != null; + } + } + + public override bool Checked + { + get + { + return false; + } + } + + protected ChartView View + { + get + { + return Gui != null + ? GetViewRecursive(Gui.DocumentViews.ActiveView) + : null; + } + } + + protected Font GetChangedFontSize(Font font, int pixels) + { + return new Font(font.FontFamily, font.Size + pixels, font.Style); + } + + private T GetViewRecursive(IView view) where T : class, IView + { + if (view is T) + { + return (T) view; + } + var compositeView = view as ICompositeView; + if (compositeView != null) + { + foreach (var childView in compositeView.ChildViews) + { + var childOfTypeT = GetViewRecursive(childView); + if (childOfTypeT != null) + { + return childOfTypeT; + } + } + } + return null; + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/DecreaseFontSizeCommand.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/DecreaseFontSizeCommand.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/DecreaseFontSizeCommand.cs (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -0,0 +1,21 @@ +namespace Core.Plugins.CommonTools.Gui.Commands.Charting +{ + public class DecreaseFontSizeCommand : ChartViewCommandBase + { + public override void Execute(params object[] arguments) + { + var view = View; + if (view != null) + { + view.Chart.Font = GetChangedFontSize(view.Chart.Font, -1); + view.Chart.Legend.Font = GetChangedFontSize(view.Chart.Legend.Font, -1); + view.Chart.LeftAxis.LabelsFont = GetChangedFontSize(view.Chart.LeftAxis.LabelsFont, -1); + view.Chart.LeftAxis.TitleFont = GetChangedFontSize(view.Chart.LeftAxis.TitleFont, -1); + view.Chart.BottomAxis.LabelsFont = GetChangedFontSize(view.Chart.BottomAxis.LabelsFont, -1); + view.Chart.BottomAxis.TitleFont = GetChangedFontSize(view.Chart.BottomAxis.TitleFont, -1); + view.Chart.RightAxis.LabelsFont = GetChangedFontSize(view.Chart.RightAxis.LabelsFont, -1); + view.Chart.RightAxis.TitleFont = GetChangedFontSize(view.Chart.RightAxis.TitleFont, -1); + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs =================================================================== diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs (.../ExportChartAsImageCommand.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs (.../ExportChartAsImageCommand.cs) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -1,49 +1,5 @@ -using System.Drawing; -using Core.Common.Controls; -using Core.Common.Controls.Swf.Charting; -using Core.Common.Controls.Views; -using Core.Common.Gui; - -namespace Core.Plugins.CommonTools.Gui.Commands.Charting +namespace Core.Plugins.CommonTools.Gui.Commands.Charting { - public class IncreaseFontSizeCommand : ChartViewCommandBase - { - public override void Execute(params object[] arguments) - { - var view = View; - if (view != null) - { - view.Chart.Font = GetChangedFontSize(view.Chart.Font, 1); - view.Chart.Legend.Font = GetChangedFontSize(view.Chart.Legend.Font, 1); - view.Chart.LeftAxis.LabelsFont = GetChangedFontSize(view.Chart.LeftAxis.LabelsFont, 1); - view.Chart.LeftAxis.TitleFont = GetChangedFontSize(view.Chart.LeftAxis.TitleFont, 1); - view.Chart.BottomAxis.LabelsFont = GetChangedFontSize(view.Chart.BottomAxis.LabelsFont, 1); - view.Chart.BottomAxis.TitleFont = GetChangedFontSize(view.Chart.BottomAxis.TitleFont, 1); - view.Chart.RightAxis.LabelsFont = GetChangedFontSize(view.Chart.RightAxis.LabelsFont, 1); - view.Chart.RightAxis.TitleFont = GetChangedFontSize(view.Chart.RightAxis.TitleFont, 1); - } - } - } - - public class DecreaseFontSizeCommand : ChartViewCommandBase - { - public override void Execute(params object[] arguments) - { - var view = View; - if (view != null) - { - view.Chart.Font = GetChangedFontSize(view.Chart.Font, -1); - view.Chart.Legend.Font = GetChangedFontSize(view.Chart.Legend.Font, -1); - view.Chart.LeftAxis.LabelsFont = GetChangedFontSize(view.Chart.LeftAxis.LabelsFont, -1); - view.Chart.LeftAxis.TitleFont = GetChangedFontSize(view.Chart.LeftAxis.TitleFont, -1); - view.Chart.BottomAxis.LabelsFont = GetChangedFontSize(view.Chart.BottomAxis.LabelsFont, -1); - view.Chart.BottomAxis.TitleFont = GetChangedFontSize(view.Chart.BottomAxis.TitleFont, -1); - view.Chart.RightAxis.LabelsFont = GetChangedFontSize(view.Chart.RightAxis.LabelsFont, -1); - view.Chart.RightAxis.TitleFont = GetChangedFontSize(view.Chart.RightAxis.TitleFont, -1); - } - } - } - public class ExportChartAsImageCommand : ChartViewCommandBase { public override void Execute(params object[] arguments) @@ -55,59 +11,4 @@ } } } - - public abstract class ChartViewCommandBase : GuiCommand - { - public override bool Enabled - { - get - { - return View != null; - } - } - - public override bool Checked - { - get - { - return false; - } - } - - protected ChartView View - { - get - { - return Gui != null - ? GetViewRecursive(Gui.DocumentViews.ActiveView) - : null; - } - } - - protected Font GetChangedFontSize(Font font, int pixels) - { - return new Font(font.FontFamily, font.Size + pixels, font.Style); - } - - private T GetViewRecursive(IView view) where T : class, IView - { - if (view is T) - { - return (T) view; - } - var compositeView = view as ICompositeView; - if (compositeView != null) - { - foreach (var childView in compositeView.ChildViews) - { - var childOfTypeT = GetViewRecursive(childView); - if (childOfTypeT != null) - { - return childOfTypeT; - } - } - } - return null; - } - } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/IncreaseFontSizeCommand.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/IncreaseFontSizeCommand.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/IncreaseFontSizeCommand.cs (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -0,0 +1,21 @@ +namespace Core.Plugins.CommonTools.Gui.Commands.Charting +{ + public class IncreaseFontSizeCommand : ChartViewCommandBase + { + public override void Execute(params object[] arguments) + { + var view = View; + if (view != null) + { + view.Chart.Font = GetChangedFontSize(view.Chart.Font, 1); + view.Chart.Legend.Font = GetChangedFontSize(view.Chart.Legend.Font, 1); + view.Chart.LeftAxis.LabelsFont = GetChangedFontSize(view.Chart.LeftAxis.LabelsFont, 1); + view.Chart.LeftAxis.TitleFont = GetChangedFontSize(view.Chart.LeftAxis.TitleFont, 1); + view.Chart.BottomAxis.LabelsFont = GetChangedFontSize(view.Chart.BottomAxis.LabelsFont, 1); + view.Chart.BottomAxis.TitleFont = GetChangedFontSize(view.Chart.BottomAxis.TitleFont, 1); + view.Chart.RightAxis.LabelsFont = GetChangedFontSize(view.Chart.RightAxis.LabelsFont, 1); + view.Chart.RightAxis.TitleFont = GetChangedFontSize(view.Chart.RightAxis.TitleFont, 1); + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Core.Plugins.CommonTools.Gui.csproj =================================================================== diff -u -r257d05c151e5c8e1f661870752d8a3783633924b -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Core.Plugins.CommonTools.Gui.csproj (.../Core.Plugins.CommonTools.Gui.csproj) (revision 257d05c151e5c8e1f661870752d8a3783633924b) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Core.Plugins.CommonTools.Gui.csproj (.../Core.Plugins.CommonTools.Gui.csproj) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -67,7 +67,10 @@ Properties\GlobalAssembly.cs + + + @@ -93,6 +96,8 @@ + + @@ -151,8 +156,6 @@ - - Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/TextDocumentView.cs =================================================================== diff -u -r65c12731b5bc4f7dd185b779c801b9ee319e4e3a -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/TextDocumentView.cs (.../TextDocumentView.cs) (revision 65c12731b5bc4f7dd185b779c801b9ee319e4e3a) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/TextDocumentView.cs (.../TextDocumentView.cs) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -10,7 +10,6 @@ { private bool textModified; private bool settingContent; - private string characters = ""; private TextDocument textDocument; public TextDocumentView() @@ -78,7 +77,6 @@ textDocument.Content = textBox.Text; - characters = ""; settingContent = false; textModified = false; @@ -104,7 +102,6 @@ textDocument.Content = textBox.Text; - characters = ""; timer.Stop(); settingContent = false; @@ -116,17 +113,11 @@ if (ModifierKeys != Keys.Control) { if (e.KeyChar == (char) Keys.Return) - { - characters += ""; - } + {} else if (e.KeyChar == '\b' || e.KeyChar == (char) Keys.Delete) - { - characters += ""; - } + {} else - { - characters += e.KeyChar; - } + {} } OnKeyPress(e); } @@ -136,18 +127,12 @@ if (ModifierKeys == Keys.Control) { if (e.KeyCode == Keys.V) - { - characters += ""; - } + {} if (e.KeyCode == Keys.X) - { - characters += ""; - } + {} } else if (e.KeyCode == Keys.Delete) - { - characters += ""; - } + {} OnKeyUp(e); } Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDateTimeProperties.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDateTimeProperties.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDateTimeProperties.cs (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -0,0 +1,43 @@ +using System; +using Core.Common.Controls.Swf.Charting; +using Core.Common.Utils.Attributes; +using Core.Plugins.CommonTools.Gui.Properties; + +namespace Core.Plugins.CommonTools.Gui.Property.Charting +{ + public class ChartAxisDateTimeProperties : ChartAxisProperties + { + public ChartAxisDateTimeProperties(IChartAxis chartAxis) + : base(chartAxis) {} + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Maximum_DisplayName")] + [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Maximum_Description")] + public DateTime Maximum + { + get + { + return DateTime.FromOADate(chartAxis.Maximum); + } + set + { + chartAxis.Maximum = value.ToOADate(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Minimum_DisplayName")] + [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Minimum_Description")] + public DateTime Minimum + { + get + { + return DateTime.FromOADate(chartAxis.Minimum); + } + set + { + chartAxis.Minimum = value.ToOADate(); + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDoubleProperties.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDoubleProperties.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisDoubleProperties.cs (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -0,0 +1,56 @@ +using Core.Common.Controls.Swf.Charting; +using Core.Common.Utils.Attributes; +using Core.Plugins.CommonTools.Gui.Properties; + +namespace Core.Plugins.CommonTools.Gui.Property.Charting +{ + public class ChartAxisDoubleProperties : ChartAxisProperties + { + public ChartAxisDoubleProperties(IChartAxis chartAxis) : base(chartAxis) {} + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Maximum_DisplayName")] + [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Maximum_Description")] + public double Maximum + { + get + { + return chartAxis.Maximum; + } + set + { + chartAxis.Maximum = value; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Minimum_DisplayName")] + [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Minimum_Description")] + public double Minimum + { + get + { + return chartAxis.Minimum; + } + set + { + chartAxis.Minimum = value; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Logarithmic_DisplayName")] + [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Logarithmic_Description")] + public bool Logaritmic + { + get + { + return chartAxis.Logaritmic; + } + set + { + chartAxis.Logaritmic = value; + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisProperties.cs =================================================================== diff -u -r10b304d4b5cb2283801cdb16204baf2a42ab5967 -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisProperties.cs (.../ChartAxisProperties.cs) (revision 10b304d4b5cb2283801cdb16204baf2a42ab5967) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartAxisProperties.cs (.../ChartAxisProperties.cs) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -1,5 +1,4 @@ -using System; -using System.ComponentModel; +using System.ComponentModel; using System.Drawing; using Core.Common.Controls.Swf.Charting; using Core.Common.Utils.Attributes; @@ -114,90 +113,4 @@ return Title; } } - - public class ChartAxisDoubleProperties : ChartAxisProperties - { - public ChartAxisDoubleProperties(IChartAxis chartAxis) : base(chartAxis) {} - - [ResourcesCategory(typeof(Resources), "Categories_General")] - [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Maximum_DisplayName")] - [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Maximum_Description")] - public double Maximum - { - get - { - return chartAxis.Maximum; - } - set - { - chartAxis.Maximum = value; - } - } - - [ResourcesCategory(typeof(Resources), "Categories_General")] - [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Minimum_DisplayName")] - [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Minimum_Description")] - public double Minimum - { - get - { - return chartAxis.Minimum; - } - set - { - chartAxis.Minimum = value; - } - } - - [ResourcesCategory(typeof(Resources), "Categories_General")] - [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Logarithmic_DisplayName")] - [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Logarithmic_Description")] - public bool Logaritmic - { - get - { - return chartAxis.Logaritmic; - } - set - { - chartAxis.Logaritmic = value; - } - } - } - - public class ChartAxisDateTimeProperties : ChartAxisProperties - { - public ChartAxisDateTimeProperties(IChartAxis chartAxis) - : base(chartAxis) {} - - [ResourcesCategory(typeof(Resources), "Categories_General")] - [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Maximum_DisplayName")] - [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Maximum_Description")] - public DateTime Maximum - { - get - { - return DateTime.FromOADate(chartAxis.Maximum); - } - set - { - chartAxis.Maximum = value.ToOADate(); - } - } - - [ResourcesCategory(typeof(Resources), "Categories_General")] - [ResourcesDisplayName(typeof(Resources), "ChartAxisProperties_Minimum_DisplayName")] - [ResourcesDescription(typeof(Resources), "ChartAxisProperties_Minimum_Description")] - public DateTime Minimum - { - get - { - return DateTime.FromOADate(chartAxis.Minimum); - } - set - { - chartAxis.Minimum = value.ToOADate(); - } - } - } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartFontPropertiesConverter.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartFontPropertiesConverter.cs (.../ChartFontPropertiesConverter.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Property/Charting/ChartFontPropertiesConverter.cs (.../ChartFontPropertiesConverter.cs) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28) @@ -7,8 +7,7 @@ { public class ChartFontPropertiesConverter : FontConverter { - private static readonly string[] AllowedProperties = new[] - { + private static readonly string[] AllowedProperties = { "Size", "Bold", "Italic", Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Resources/function_coverage.png =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 Binary files differ Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Resources/function_coverage1.png =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 Binary files differ