diff --git a/src/LogExpert.UI/Controls/BufferedDataGridView.cs b/src/LogExpert.UI/Controls/BufferedDataGridView.cs index c52e73bc..83dd2575 100644 --- a/src/LogExpert.UI/Controls/BufferedDataGridView.cs +++ b/src/LogExpert.UI/Controls/BufferedDataGridView.cs @@ -10,7 +10,7 @@ namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class BufferedDataGridView : DataGridView +internal partial class BufferedDataGridView : DataGridView { #region Fields diff --git a/src/LogExpert.UI/Controls/ColorComboBox.cs b/src/LogExpert.UI/Controls/ColorComboBox.cs index 2cc8dcd1..71feb634 100644 --- a/src/LogExpert.UI/Controls/ColorComboBox.cs +++ b/src/LogExpert.UI/Controls/ColorComboBox.cs @@ -4,7 +4,7 @@ namespace LogExpert.UI.Controls; [SupportedOSPlatform("windows")] -public class ColorComboBox : ComboBox +internal class ColorComboBox : ComboBox { #region Fields diff --git a/src/LogExpert.UI/Controls/DateTimeDragControl.cs b/src/LogExpert.UI/Controls/DateTimeDragControl.cs index 676e9f86..0d4dd777 100644 --- a/src/LogExpert.UI/Controls/DateTimeDragControl.cs +++ b/src/LogExpert.UI/Controls/DateTimeDragControl.cs @@ -15,7 +15,7 @@ namespace LogExpert.Dialogs; /// The control raises events (ValueChanged, ValueDragged) when the date/time changes so that owner can react accordingly. /// [SupportedOSPlatform("windows")] -public partial class DateTimeDragControl : UserControl +internal partial class DateTimeDragControl : UserControl { #region Fields diff --git a/src/LogExpert.UI/Controls/KnobControl.cs b/src/LogExpert.UI/Controls/KnobControl.cs index b63eb5c4..f0893f18 100644 --- a/src/LogExpert.UI/Controls/KnobControl.cs +++ b/src/LogExpert.UI/Controls/KnobControl.cs @@ -5,7 +5,7 @@ namespace LogExpert.UI.Controls; [SupportedOSPlatform("windows")] -public partial class KnobControl : UserControl +internal partial class KnobControl : UserControl { #region Fields diff --git a/src/LogExpert.UI/Controls/LogCellEditingControl.cs b/src/LogExpert.UI/Controls/LogCellEditingControl.cs index 316ed197..024bd30c 100644 --- a/src/LogExpert.UI/Controls/LogCellEditingControl.cs +++ b/src/LogExpert.UI/Controls/LogCellEditingControl.cs @@ -3,7 +3,7 @@ namespace LogExpert.UI.Controls; [SupportedOSPlatform("windows")] -public class LogCellEditingControl : DataGridViewTextBoxEditingControl +internal class LogCellEditingControl : DataGridViewTextBoxEditingControl { #region Public methods diff --git a/src/LogExpert.UI/Controls/LogGridCell.cs b/src/LogExpert.UI/Controls/LogGridCell.cs index fe870e1b..e9954a17 100644 --- a/src/LogExpert.UI/Controls/LogGridCell.cs +++ b/src/LogExpert.UI/Controls/LogGridCell.cs @@ -3,7 +3,7 @@ namespace LogExpert.UI.Controls; -public class LogGridCell : DataGridViewTextBoxCell +internal class LogGridCell : DataGridViewTextBoxCell { #region Properties diff --git a/src/LogExpert.UI/Controls/LogTextColumn.cs b/src/LogExpert.UI/Controls/LogTextColumn.cs index 3f2e44b7..c0054b30 100644 --- a/src/LogExpert.UI/Controls/LogTextColumn.cs +++ b/src/LogExpert.UI/Controls/LogTextColumn.cs @@ -2,7 +2,7 @@ namespace LogExpert.UI.Controls; -public class LogTextColumn : DataGridViewColumn +internal class LogTextColumn : DataGridViewColumn { #region cTor diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index 34e04cc6..b1d52dbb 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -25,7 +25,7 @@ namespace LogExpert.UI.Controls.LogWindow; //TODO: Implemented 4 interfaces explicitly. Find them by searching: ILogWindow. [SupportedOSPlatform("windows")] -public partial class LogWindow : DockContent, ILogPaintContextUI, ILogView, ILogWindow +internal partial class LogWindow : DockContent, ILogPaintContextUI, ILogView, ILogWindow { #region Fields diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindowPublic.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindowPublic.cs index 9fce6a8c..03c37a77 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindowPublic.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindowPublic.cs @@ -1,7 +1,6 @@ using System.Text; using LogExpert.Core.Classes; -using LogExpert.Core.Classes.Bookmark; using LogExpert.Core.Classes.Columnizer; using LogExpert.Core.Classes.Filter; using LogExpert.Core.Classes.Highlight; diff --git a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs index 8fe836d7..4a46be2a 100644 --- a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs +++ b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs @@ -12,7 +12,7 @@ namespace LogExpert.UI.Controls.LogWindow; /// /// Delivers the range (from..to) that matches the current range filter settings starting from a given line. /// -public class RangeFinder(FilterParams filterParams, ColumnizerCallback callback) +internal class RangeFinder(FilterParams filterParams, ColumnizerCallback callback) { #region Fields diff --git a/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs b/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs index 5cf5a90c..fe51937b 100644 --- a/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs +++ b/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs @@ -5,7 +5,7 @@ namespace LogExpert.UI.Controls.LogWindow; /// /// Holds all windows which are in sync via timestamp /// -public class TimeSyncList +internal class TimeSyncList { #region Fields diff --git a/src/LogExpert.UI/Dialogs/AboutBox.cs b/src/LogExpert.UI/Dialogs/AboutBox.cs index 632dd07c..471d836f 100644 --- a/src/LogExpert.UI/Dialogs/AboutBox.cs +++ b/src/LogExpert.UI/Dialogs/AboutBox.cs @@ -1,4 +1,4 @@ -using LogExpert.Core.Classes; +using LogExpert.Core.Classes; using Newtonsoft.Json; @@ -9,7 +9,7 @@ namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class AboutBox : Form +internal partial class AboutBox : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs index ece0c852..7949c604 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class BookmarkCommentDlg : Form +internal partial class BookmarkCommentDlg : Form { #region cTor diff --git a/src/LogExpert.UI/Dialogs/BookmarkWindow.cs b/src/LogExpert.UI/Dialogs/BookmarkWindow.cs index 0ee8d848..c347a4c6 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkWindow.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkWindow.cs @@ -16,7 +16,7 @@ namespace LogExpert.Dialogs; //TODO can be moved to Logexpert.UI if the PaintHelper has been refactored [SupportedOSPlatform("windows")] -public partial class BookmarkWindow : DockContent, ISharedToolWindow, IBookmarkView +internal partial class BookmarkWindow : DockContent, ISharedToolWindow, IBookmarkView { #region Fields diff --git a/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs b/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs index bee7a594..229f18e8 100644 --- a/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs +++ b/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs @@ -4,7 +4,7 @@ namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class ChooseIconDlg : Form +internal partial class ChooseIconDlg : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/FilterColumnChooser.cs b/src/LogExpert.UI/Dialogs/FilterColumnChooser.cs index 4a62edb8..1aea2b15 100644 --- a/src/LogExpert.UI/Dialogs/FilterColumnChooser.cs +++ b/src/LogExpert.UI/Dialogs/FilterColumnChooser.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Classes.Filter; +using LogExpert.Core.Classes.Filter; using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class FilterColumnChooser : Form +internal partial class FilterColumnChooser : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/GotoLineDialog.cs b/src/LogExpert.UI/Dialogs/GotoLineDialog.cs index 123b1ca1..8b7d0b36 100644 --- a/src/LogExpert.UI/Dialogs/GotoLineDialog.cs +++ b/src/LogExpert.UI/Dialogs/GotoLineDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class GotoLineDialog : Form +internal partial class GotoLineDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/ImportSettingsDialog.cs b/src/LogExpert.UI/Dialogs/ImportSettingsDialog.cs index 5d66a75b..e7200fb4 100644 --- a/src/LogExpert.UI/Dialogs/ImportSettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/ImportSettingsDialog.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Config; +using LogExpert.Core.Config; using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class ImportSettingsDialog : Form +internal partial class ImportSettingsDialog : Form { #region cTor diff --git a/src/LogExpert.UI/Dialogs/KeywordActionDlg.cs b/src/LogExpert.UI/Dialogs/KeywordActionDlg.cs index b34dca5b..dbc508f0 100644 --- a/src/LogExpert.UI/Dialogs/KeywordActionDlg.cs +++ b/src/LogExpert.UI/Dialogs/KeywordActionDlg.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Classes.Highlight; +using LogExpert.Core.Classes.Highlight; using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class KeywordActionDlg : Form +internal partial class KeywordActionDlg : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs index 8a150e27..fa1e3b01 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs @@ -12,7 +12,7 @@ namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class HighlightDialog : Form +internal partial class HighlightDialog : Form { private static readonly ILogger _logger = LogManager.GetCurrentClassLogger(); diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index 43742412..6ae4d6e3 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -16,7 +16,7 @@ namespace LogExpert.UI.Controls.LogTabWindow; // Data shared over all LogTabWindow instances //TODO: Can we get rid of this class? [SupportedOSPlatform("windows")] -public partial class LogTabWindow : Form, ILogTabWindow +internal partial class LogTabWindow : Form, ILogTabWindow { #region Fields @@ -198,7 +198,7 @@ public void ChangeTheme (Control.ControlCollection container) { for (var x = 0; x < item.DropDownItems.Count; x++) { - ToolStripItem children = item.DropDownItems[x]; + var children = item.DropDownItems[x]; children.ForeColor = ColorMode.ForeColor; children.BackColor = ColorMode.MenuBackgroundColor; @@ -206,7 +206,7 @@ public void ChangeTheme (Control.ControlCollection container) { for (var y = 0; y < toolstripDropDownItem.DropDownItems.Count; y++) { - ToolStripItem subChildren = toolstripDropDownItem.DropDownItems[y]; + var subChildren = toolstripDropDownItem.DropDownItems[y]; subChildren.ForeColor = ColorMode.ForeColor; subChildren.BackColor = ColorMode.MenuBackgroundColor; } @@ -237,7 +237,7 @@ public void ChangeTheme (Control.ControlCollection container) // Tabs menu for (var y = 0; y < tabContextMenuStrip.Items.Count; y++) { - ToolStripItem item = tabContextMenuStrip.Items[y]; + var item = tabContextMenuStrip.Items[y]; item.ForeColor = ColorMode.ForeColor; item.BackColor = ColorMode.MenuBackgroundColor; } diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowEventHandlers.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowEventHandlers.cs index 3b0dc376..16e7ed7e 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowEventHandlers.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowEventHandlers.cs @@ -9,14 +9,14 @@ using LogExpert.Core.Entities; using LogExpert.Core.EventArguments; using LogExpert.Dialogs; -using LogExpert.UI.Controls.LogWindow; using LogExpert.UI.Dialogs; +using LogExpert.UI.Extensions.LogWindow; using WeifenLuo.WinFormsUI.Docking; namespace LogExpert.UI.Controls.LogTabWindow; -public partial class LogTabWindow +internal partial class LogTabWindow { #region Events handler diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPrivate.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPrivate.cs index 68fcff65..8ad87e27 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPrivate.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPrivate.cs @@ -21,7 +21,7 @@ namespace LogExpert.UI.Controls.LogTabWindow; -public partial class LogTabWindow +internal partial class LogTabWindow { #region Private Methods diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPublic.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPublic.cs index eb4745ac..25000414 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPublic.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindowPublic.cs @@ -15,7 +15,7 @@ namespace LogExpert.UI.Controls.LogTabWindow; -public partial class LogTabWindow +internal partial class LogTabWindow { #region Public methods diff --git a/src/LogExpert.UI/Dialogs/MultiFileMaskDialog.cs b/src/LogExpert.UI/Dialogs/MultiFileMaskDialog.cs index 8b2203cf..6bbf4b12 100644 --- a/src/LogExpert.UI/Dialogs/MultiFileMaskDialog.cs +++ b/src/LogExpert.UI/Dialogs/MultiFileMaskDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class MultiFileMaskDialog : Form +internal partial class MultiFileMaskDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/MultiLoadRequestDialog.cs b/src/LogExpert.UI/Dialogs/MultiLoadRequestDialog.cs index b53360fd..0e311a0e 100644 --- a/src/LogExpert.UI/Dialogs/MultiLoadRequestDialog.cs +++ b/src/LogExpert.UI/Dialogs/MultiLoadRequestDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class MultiLoadRequestDialog : Form +internal partial class MultiLoadRequestDialog : Form { #region cTor diff --git a/src/LogExpert.UI/Dialogs/OpenUriDialog.cs b/src/LogExpert.UI/Dialogs/OpenUriDialog.cs index 290a2471..0b9f8cd7 100644 --- a/src/LogExpert.UI/Dialogs/OpenUriDialog.cs +++ b/src/LogExpert.UI/Dialogs/OpenUriDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class OpenUriDialog : Form +internal partial class OpenUriDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/ParamRequesterDialog.cs b/src/LogExpert.UI/Dialogs/ParamRequesterDialog.cs index ef272593..263a8a71 100644 --- a/src/LogExpert.UI/Dialogs/ParamRequesterDialog.cs +++ b/src/LogExpert.UI/Dialogs/ParamRequesterDialog.cs @@ -3,7 +3,7 @@ namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class ParamRequesterDialog : Form +internal partial class ParamRequesterDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/ProjectLoadDlg.cs b/src/LogExpert.UI/Dialogs/ProjectLoadDlg.cs index 95ca661d..5d268884 100644 --- a/src/LogExpert.UI/Dialogs/ProjectLoadDlg.cs +++ b/src/LogExpert.UI/Dialogs/ProjectLoadDlg.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Enums; +using LogExpert.Core.Enums; using System.Runtime.Versioning; namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class ProjectLoadDlg : Form +internal partial class ProjectLoadDlg : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs b/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs index 64c99a9f..ac7df7c5 100644 --- a/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs +++ b/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs @@ -4,7 +4,7 @@ namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class RegexHelperDialog : Form +internal partial class RegexHelperDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/SearchDialog.cs b/src/LogExpert.UI/Dialogs/SearchDialog.cs index f1e09da9..9ae87f17 100644 --- a/src/LogExpert.UI/Dialogs/SearchDialog.cs +++ b/src/LogExpert.UI/Dialogs/SearchDialog.cs @@ -7,7 +7,7 @@ namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] -public partial class SearchDialog : Form +internal partial class SearchDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/SearchProgressDialog.cs b/src/LogExpert.UI/Dialogs/SearchProgressDialog.cs index 5fd7a6be..5d1f8deb 100644 --- a/src/LogExpert.UI/Dialogs/SearchProgressDialog.cs +++ b/src/LogExpert.UI/Dialogs/SearchProgressDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class SearchProgressDialog : Form +internal partial class SearchProgressDialog : Form { #region Fields diff --git a/src/LogExpert.UI/Dialogs/TabRenameDialog.cs b/src/LogExpert.UI/Dialogs/TabRenameDialog.cs index 3a7a5391..2f2455db 100644 --- a/src/LogExpert.UI/Dialogs/TabRenameDialog.cs +++ b/src/LogExpert.UI/Dialogs/TabRenameDialog.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] -public partial class TabRenameDialog : Form +internal partial class TabRenameDialog : Form { #region cTor diff --git a/src/LogExpert.UI/Entities/WindowFileEntry.cs b/src/LogExpert.UI/Entities/WindowFileEntry.cs index 761c5c40..842dfd41 100644 --- a/src/LogExpert.UI/Entities/WindowFileEntry.cs +++ b/src/LogExpert.UI/Entities/WindowFileEntry.cs @@ -7,7 +7,7 @@ namespace LogExpert.UI.Entities; /// /// Represents a log file and its window. Used as a kind of handle for menus or list of open files. /// -public class WindowFileEntry (LogWindow logWindow) +internal class WindowFileEntry (LogWindow logWindow) { #region Fields diff --git a/src/LogExpert.Core/Classes/Bookmark/BookmarkExporter.cs b/src/LogExpert.UI/Extensions/BookmarkExporter.cs similarity index 84% rename from src/LogExpert.Core/Classes/Bookmark/BookmarkExporter.cs rename to src/LogExpert.UI/Extensions/BookmarkExporter.cs index 2100f803..fbf2f660 100644 --- a/src/LogExpert.Core/Classes/Bookmark/BookmarkExporter.cs +++ b/src/LogExpert.UI/Extensions/BookmarkExporter.cs @@ -1,6 +1,8 @@ -namespace LogExpert.Core.Classes.Bookmark; +using LogExpert.Core.Entities; -public static class BookmarkExporter +namespace LogExpert.UI.Extensions; + +internal static class BookmarkExporter { #region Fields @@ -10,13 +12,13 @@ public static class BookmarkExporter #region Public methods - public static void ExportBookmarkList (SortedList bookmarkList, string logfileName, + public static void ExportBookmarkList (SortedList bookmarkList, string logfileName, string fileName) { FileStream fs = new(fileName, FileMode.Create, FileAccess.Write); StreamWriter writer = new(fs); writer.WriteLine("Log file name;Line number;Comment"); - foreach (Entities.Bookmark bookmark in bookmarkList.Values) + foreach (var bookmark in bookmarkList.Values) { var line = $"{logfileName};{bookmark.LineNum};{bookmark.Text.Replace(replacementForNewLine, @"\" + replacementForNewLine, StringComparison.OrdinalIgnoreCase).Replace("\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase)}"; writer.WriteLine(line); @@ -25,7 +27,7 @@ public static void ExportBookmarkList (SortedList bookma fs.Close(); } - public static void ImportBookmarkList (string logfileName, string fileName, SortedList bookmarkList) + public static void ImportBookmarkList (string logfileName, string fileName, SortedList bookmarkList) { using FileStream fs = new(fileName, FileMode.Open, FileAccess.Read); using StreamReader reader = new(fs); @@ -51,7 +53,7 @@ public static void ImportBookmarkList (string logfileName, string fileName, Sort if (int.TryParse(lineStr, out var lineNum)) { - Entities.Bookmark bookmark = new(lineNum, comment); + Bookmark bookmark = new(lineNum, comment); bookmarkList.Add(lineNum, bookmark); } else diff --git a/src/LogExpert.UI/Extensions/ComboBoxExtensions.cs b/src/LogExpert.UI/Extensions/ComboBoxExtensions.cs index 90d7d31e..9cd24a7a 100644 --- a/src/LogExpert.UI/Extensions/ComboBoxExtensions.cs +++ b/src/LogExpert.UI/Extensions/ComboBoxExtensions.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Extensions; [SupportedOSPlatform("windows")] -public static class ComboBoxExtensions +internal static class ComboBoxExtensions { /// public static int GetMaxTextWidth(this ComboBox comboBox) diff --git a/src/LogExpert.UI/Extensions/Forms/LineToolStripSeparatorExtension.cs b/src/LogExpert.UI/Extensions/Forms/LineToolStripSeparatorExtension.cs index 4c30c9a4..69fb69c6 100644 --- a/src/LogExpert.UI/Extensions/Forms/LineToolStripSeparatorExtension.cs +++ b/src/LogExpert.UI/Extensions/Forms/LineToolStripSeparatorExtension.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Config; +using LogExpert.Core.Config; using System.Runtime.Versioning; namespace LogExpert.UI.Extensions.Forms; [SupportedOSPlatform("windows")] -public class LineToolStripSeparatorExtension : ToolStripSeparator +internal class LineToolStripSeparatorExtension : ToolStripSeparator { public LineToolStripSeparatorExtension() { diff --git a/src/LogExpert.UI/Extensions/Forms/MenuSelectedColors.cs b/src/LogExpert.UI/Extensions/Forms/MenuSelectedColors.cs index 5e6a81bd..bc3544e5 100644 --- a/src/LogExpert.UI/Extensions/Forms/MenuSelectedColors.cs +++ b/src/LogExpert.UI/Extensions/Forms/MenuSelectedColors.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Config; +using LogExpert.Core.Config; using System.Runtime.Versioning; namespace LogExpert.UI.Extensions.Forms; [SupportedOSPlatform("windows")] -public class MenuSelectedColors : ProfessionalColorTable +internal class MenuSelectedColors : ProfessionalColorTable { public override Color ImageMarginGradientBegin => ColorMode.MenuBackgroundColor; diff --git a/src/LogExpert.UI/Extensions/Forms/MenuStripExtension.cs b/src/LogExpert.UI/Extensions/Forms/MenuStripExtension.cs index 1d4d16ca..e54a1796 100644 --- a/src/LogExpert.UI/Extensions/Forms/MenuStripExtension.cs +++ b/src/LogExpert.UI/Extensions/Forms/MenuStripExtension.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Extensions.Forms; [SupportedOSPlatform("windows")] -public class ExtendedMenuStripRenderer : ToolStripProfessionalRenderer +internal class ExtendedMenuStripRenderer : ToolStripProfessionalRenderer { public ExtendedMenuStripRenderer() : base(new MenuSelectedColors()) { } } diff --git a/src/LogExpert.UI/Extensions/Forms/MenuToolStripSeparatorExtension.cs b/src/LogExpert.UI/Extensions/Forms/MenuToolStripSeparatorExtension.cs index 82e44e39..3f5f26f1 100644 --- a/src/LogExpert.UI/Extensions/Forms/MenuToolStripSeparatorExtension.cs +++ b/src/LogExpert.UI/Extensions/Forms/MenuToolStripSeparatorExtension.cs @@ -1,11 +1,11 @@ -using LogExpert.Core.Config; +using LogExpert.Core.Config; using System.Runtime.Versioning; namespace LogExpert.UI.Extensions.Forms; [SupportedOSPlatform("windows")] -public class MenuToolStripSeparatorExtension : ToolStripSeparator +internal class MenuToolStripSeparatorExtension : ToolStripSeparator { public MenuToolStripSeparatorExtension() { diff --git a/src/LogExpert.UI/Extensions/Forms/ToolStripRendererExtension.cs b/src/LogExpert.UI/Extensions/Forms/ToolStripRendererExtension.cs index 5b85f845..191d5988 100644 --- a/src/LogExpert.UI/Extensions/Forms/ToolStripRendererExtension.cs +++ b/src/LogExpert.UI/Extensions/Forms/ToolStripRendererExtension.cs @@ -1,9 +1,9 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Extensions.Forms; [SupportedOSPlatform("windows")] -public class ToolStripRendererExtension : ToolStripSystemRenderer +internal class ToolStripRendererExtension : ToolStripSystemRenderer { public ToolStripRendererExtension() { } diff --git a/src/LogExpert.UI/Controls/LogWindow/AbstractLogTabWindow.cs b/src/LogExpert.UI/Extensions/LogWindow/AbstractLogTabWindow.cs similarity index 67% rename from src/LogExpert.UI/Controls/LogWindow/AbstractLogTabWindow.cs rename to src/LogExpert.UI/Extensions/LogWindow/AbstractLogTabWindow.cs index 2a7caae9..664f4279 100644 --- a/src/LogExpert.UI/Controls/LogWindow/AbstractLogTabWindow.cs +++ b/src/LogExpert.UI/Extensions/LogWindow/AbstractLogTabWindow.cs @@ -1,9 +1,9 @@ using System.Runtime.Versioning; using LogExpert.Core.Interface; -using LogExpert.UI.Dialogs.LogTabWindow; +using LogExpert.UI.Controls.LogTabWindow; -namespace LogExpert.UI.Controls.LogWindow; +namespace LogExpert.UI.Extensions.LogWindow; public abstract class AbstractLogTabWindow () { @@ -12,6 +12,6 @@ public abstract class AbstractLogTabWindow () [SupportedOSPlatform("windows")] public static ILogTabWindow Create (string[] fileNames, int instanceNumber, bool showInstanceNumbers, IConfigManager configManager) { - return new LogTabWindow.LogTabWindow(fileNames, instanceNumber, showInstanceNumbers, configManager); + return new LogTabWindow(fileNames, instanceNumber, showInstanceNumbers, configManager); } } \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/StaticLogTabWindowData.cs b/src/LogExpert.UI/Extensions/LogWindow/StaticLogTabWindowData.cs similarity index 79% rename from src/LogExpert.UI/Controls/LogWindow/StaticLogTabWindowData.cs rename to src/LogExpert.UI/Extensions/LogWindow/StaticLogTabWindowData.cs index 88e8e1bf..cc356eb6 100644 --- a/src/LogExpert.UI/Controls/LogWindow/StaticLogTabWindowData.cs +++ b/src/LogExpert.UI/Extensions/LogWindow/StaticLogTabWindowData.cs @@ -1,6 +1,6 @@ using LogExpert.Core.Interface; -namespace LogExpert.UI.Dialogs.LogTabWindow; +namespace LogExpert.UI.Extensions.LogWindow; public class StaticLogTabWindowData { diff --git a/src/LogExpert.UI/Interface/ILogPaintContextUI.cs b/src/LogExpert.UI/Interface/ILogPaintContextUI.cs index 39557972..e4465748 100644 --- a/src/LogExpert.UI/Interface/ILogPaintContextUI.cs +++ b/src/LogExpert.UI/Interface/ILogPaintContextUI.cs @@ -1,4 +1,4 @@ -using LogExpert.Core.Classes.Highlight; +using LogExpert.Core.Classes.Highlight; using LogExpert.Core.Entities; using LogExpert.Core.Interface; @@ -7,7 +7,7 @@ namespace LogExpert.UI.Interface; /// /// Declares methods that are needed for drawing log lines. Used by PaintHelper. /// -public interface ILogPaintContextUI : ILogPaintContext +internal interface ILogPaintContextUI : ILogPaintContext { #region Properties diff --git a/src/LogExpert/Classes/LogExpertProxy.cs b/src/LogExpert/Classes/LogExpertProxy.cs index bf122209..d85448fb 100644 --- a/src/LogExpert/Classes/LogExpertProxy.cs +++ b/src/LogExpert/Classes/LogExpertProxy.cs @@ -1,13 +1,11 @@ -using LogExpert.Config; +using System.Windows.Forms; + +using LogExpert.Config; using LogExpert.Core.Interface; -using LogExpert.UI.Controls.LogWindow; +using LogExpert.UI.Extensions.LogWindow; using NLog; -using System; -using System.Collections.Generic; -using System.Windows.Forms; - namespace LogExpert.Classes; internal class LogExpertProxy : ILogExpertProxy diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 95fa7dfe..0bd88b9b 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -1,26 +1,26 @@ -using LogExpert.Classes; +using System.Diagnostics; +using System.IO.Pipes; +using System.Reflection; +using System.Security; +using System.Security.Principal; +using System.Text; +using System.Windows.Forms; + +using LogExpert.Classes; using LogExpert.Classes.CommandLine; using LogExpert.Config; using LogExpert.Core.Classes.IPC; using LogExpert.Core.Config; using LogExpert.Core.Interface; using LogExpert.Dialogs; -using LogExpert.UI.Controls.LogWindow; using LogExpert.UI.Dialogs; +using LogExpert.UI.Extensions.LogWindow; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NLog; -using System.Diagnostics; -using System.IO.Pipes; -using System.Reflection; -using System.Security; -using System.Security.Principal; -using System.Text; -using System.Windows.Forms; - namespace LogExpert; internal static class Program @@ -126,6 +126,7 @@ private static void Main(string[] args) MessageBox.Show($"Cannot open connection to first instance ({errMsg})", "LogExpert"); } + //TODO: Remove this from here? Why is it called from the Main project and not from the main window? if (settings.Preferences.AllowOnlyOneInstance && settings.Preferences.ShowErrorMessageAllowOnlyOneInstances) { AllowOnlyOneInstanceErrorDialog a = new();