Skip to content

Commit 60855e2

Browse files
committed
Fixed multiline parsing and updated copyright
* Fixed issue #3: The custom file and directory receiver supports now multiline reading. * Updated copyright year to 2019. * Some minor UI improvements.
1 parent 5fdf265 commit 60855e2

File tree

11 files changed

+232
-211
lines changed

11 files changed

+232
-211
lines changed

src/Couchcoding.Logbert.Gui/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyConfiguration("")]
1010
[assembly: AssemblyCompany("Couchcoding")]
1111
[assembly: AssemblyProduct("Logbert Control Library")]
12-
[assembly: AssemblyCopyright("Copyright © 2018 Couchcoding")]
12+
[assembly: AssemblyCopyright("Copyright © 2019 Couchcoding")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.5.0.0")]
35-
[assembly: AssemblyFileVersion("1.5.0.0")]
34+
[assembly: AssemblyVersion("1.5.2.0")]
35+
[assembly: AssemblyFileVersion("1.5.2.0")]

src/Couchcoding.Logbert.Theme/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyConfiguration("")]
1010
[assembly: AssemblyCompany("Couchcoding")]
1111
[assembly: AssemblyProduct("Logbert Theme Library")]
12-
[assembly: AssemblyCopyright("Copyright © 2018 Couchcoding")]
12+
[assembly: AssemblyCopyright("Copyright © 2019 Couchcoding")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.5.0.0")]
35-
[assembly: AssemblyFileVersion("1.5.0.0")]
34+
[assembly: AssemblyVersion("1.5.2.0")]
35+
[assembly: AssemblyFileVersion("1.5.2.0")]

src/Logbert/Dialogs/Docking/FrmWelcome.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,25 @@ public FrmWelcome(MainForm mainForm)
9898
lstLogger.Items.Add(new CustomTcpReceiver());
9999
lstLogger.Items.Add(new CustomFileReceiver());
100100
lstLogger.Items.Add(new CustomDirReceiver());
101-
102-
RebuildMruList();
103-
104-
MruManager.MruListChanged += (_, __) => RebuildMruList();
105101
}
106102

107103
#endregion
108104

109105
#region Private Methods
110106

107+
/// <summary>
108+
/// Raises the <see cref="E:System.Windows.Forms.Form.Shown"/> event.
109+
/// </summary>
110+
/// <param name="e">A <see cref="T:System.EventArgs"/> that contains the event data. </param>
111+
protected override void OnShown(EventArgs e)
112+
{
113+
base.OnShown(e);
114+
115+
RebuildMruList();
116+
117+
MruManager.MruListChanged += (_, __) => RebuildMruList();
118+
}
119+
111120
/// <summary>Calculates the scroll offset to the specified child control. </summary>
112121
/// <returns>The upper-left hand <see cref="T:System.Drawing.Point" /> of the display area relative to the client area required to scroll the control into view.</returns>
113122
/// <param name="activeControl">The child control to scroll into view. </param>
@@ -194,7 +203,9 @@ private void RebuildMruList()
194203
DisabledLinkColor = ThemeManager.CurrentApplicationTheme.ColorPalette.ContentForegroundDimmed,
195204
LinkBehavior = LinkBehavior.HoverUnderline,
196205
Padding = new Padding(0, 0, 0, 10),
197-
AutoSize = true
206+
AutoSize = false,
207+
Width = flRecentFiles.Width - (flRecentFiles.Padding.Left + flRecentFiles.Padding.Right),
208+
Height = 26
198209
};
199210

200211
recentFileLink.LinkClicked += RecentFileClicked;

src/Logbert/Dialogs/FrmAbout.Designer.cs

Lines changed: 185 additions & 186 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Logbert/Dialogs/FrmAbout.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<data name="txtLicense.Text" xml:space="preserve">
121121
<value>The MIT License (MIT)
122122

123-
Copyright (c) 2018 Couchcoding
123+
Copyright (c) 2019 Couchcoding
124124

125125
Permission is hereby granted, free of charge, to any person obtaining a copy
126126
of this software and associated documentation files (the "Software"), to deal

src/Logbert/Logging/LogMessageCustom.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private bool ParseData(string data)
126126
{
127127
for (int i = 0; i < mColumnizer.Columns.Count; ++i)
128128
{
129-
Match mtc = Regex.Match(data, mColumnizer.Columns[i].Expression);
129+
Match mtc = Regex.Match(data, mColumnizer.Columns[i].Expression, RegexOptions.Multiline);
130130

131131
if (!mtc.Success && !mColumnizer.Columns[i].Optional)
132132
{

src/Logbert/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Couchcoding")]
1212
[assembly: AssemblyProduct("Logbert")]
13-
[assembly: AssemblyCopyright("Copyright © 2018 Couchcoding")]
13+
[assembly: AssemblyCopyright("Copyright © 2019 Couchcoding")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -29,6 +29,6 @@
2929
// Build Number
3030
// Revision
3131
//
32-
[assembly: AssemblyVersion("1.5.1.0")]
33-
[assembly: AssemblyFileVersion("1.5.1.0")]
32+
[assembly: AssemblyVersion("1.5.2.0")]
33+
[assembly: AssemblyFileVersion("1.5.2.0")]
3434
[assembly: NeutralResourcesLanguageAttribute("")]

src/Logbert/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Logbert/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<value>..\Resources\action_add_16xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126126
</data>
127127
<data name="strAboutDlgCopyright" xml:space="preserve">
128-
<value>Copyright 2018 Couchcoding. All Right Reserved.</value>
128+
<value>Copyright 2019 Couchcoding. All Right Reserved.</value>
129129
</data>
130130
<data name="strColumnizerConfigurationEnterColumnNameAndExpression" xml:space="preserve">
131131
<value>Please enter a name and an expression for each configure column.</value>

src/Logbert/Receiver/CustomReceiver/CustomDirReceiver/CustomDirReceiver.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,21 @@ private void ReadNewLogMessagesFromFile()
265265
mLastFileOffset
266266
, SeekOrigin.Begin);
267267

268-
string line;
268+
string currentLine;
269+
string messageLines = string.Empty;
270+
269271
List<LogMessage> messages = new List<LogMessage>();
270272

271-
while ((line = mFileReader.ReadLine()) != null)
273+
while ((currentLine = mFileReader.ReadLine()) != null)
272274
{
273275
LogMessageCustom cstmLgMsg;
274276

275277
try
276278
{
279+
messageLines += currentLine;
280+
277281
cstmLgMsg = new LogMessageCustom(
278-
line
282+
messageLines
279283
, mLogNumber + 1
280284
, mColumnizer);
281285
}
@@ -285,6 +289,8 @@ private void ReadNewLogMessagesFromFile()
285289
continue;
286290
}
287291

292+
messageLines = string.Empty;
293+
288294
mLogNumber++;
289295
messages.Add(cstmLgMsg);
290296
}

0 commit comments

Comments
 (0)