Skip to content

Commit 96ce37d

Browse files
author
Michael Wangler
committed
Added welcome page and encoding option
* Fixed Issue #2 by adding encoding option to log receivers * Added new welcome page * Updated external libraries * Added basic support for theming (more to come)
1 parent b3129ff commit 96ce37d

File tree

78 files changed

+6074
-3801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6074
-3801
lines changed

src/GuiLibrary/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
# 2 space indentation
10+
[*.cs]
11+
indent_style = space
12+
indent_size = 2

src/GuiLibrary/Controls/ListBoxEx.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ protected override void OnSelectedIndexChanged(EventArgs e)
434434
{
435435
base.OnSelectedIndexChanged(e);
436436

437+
if (SelectedIndex <= 0)
438+
{
439+
return;
440+
}
441+
437442
if (Items[SelectedIndex] is Seperator && Items.Count > SelectedIndex)
438443
{
439444
++SelectedIndex;

src/GuiLibrary/Dialogs/DialogForm.cs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using Com.Couchcoding.GuiLibrary.Helper;
3232
using System.ComponentModel;
3333
using System.Drawing;
34+
using System.Drawing.Drawing2D;
3435
using System.Windows.Forms;
3536

3637
namespace Com.Couchcoding.GuiLibrary.Dialogs
@@ -351,24 +352,28 @@ protected virtual void DrawDialogBackground(Graphics grfx)
351352
{
352353
grfx.FillRectangle(headerBrush, new Rectangle(
353354
0
354-
, 0
355-
, ClientRectangle.Width
356-
, headerHeight));
355+
, 0
356+
, ClientRectangle.Width
357+
, headerHeight));
357358
}
358359

359-
ControlPaint.DrawVisualStyleBorder(
360-
grfx
361-
, new Rectangle(
362-
-SystemInformation.BorderSize.Width
363-
, -SystemInformation.BorderSize.Height
364-
, ClientRectangle.Width + SystemInformation.BorderSize.Width + SystemInformation.BorderSize.Width
365-
, headerHeight - 1));
360+
Rectangle shadowRect = new Rectangle(0, headerHeight - 2, Width, 2);
361+
362+
if (shadowRect.Width > 0 && shadowRect.Height > 0)
363+
{
364+
using (LinearGradientBrush shadowBrush = new LinearGradientBrush(shadowRect, SystemColors.ControlDark, ContentColor, LinearGradientMode.Vertical))
365+
{
366+
// Set the wrap mode to tile flip x to fix flickering on resize.
367+
shadowBrush.WrapMode = WrapMode.TileFlipX;
368+
369+
grfx.FillRectangle(shadowBrush, shadowRect);
370+
}
371+
}
366372
}
367373

368374
if (mDialogImage != null)
369375
{
370-
grfx.DrawImage(
371-
mDialogImage
376+
grfx.DrawImage(mDialogImage
372377
, new Rectangle(
373378
ClientRectangle.Width - mDialogImage.Width
374379
, (headerHeight - mDialogImage.Height) >> 1

src/GuiLibrary/GuiLibrary.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@
103103
<Compile Include="Interop\Win32.cs" />
104104
<Compile Include="Properties\AssemblyInfo.cs" />
105105
</ItemGroup>
106-
<ItemGroup />
106+
<ItemGroup>
107+
<None Include=".editorconfig" />
108+
</ItemGroup>
107109
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
108110
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
109111
Other similar extension points exist, see Microsoft.Common.targets.

src/GuiLibrary/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.3.3.0")]
35-
[assembly: AssemblyFileVersion("1.3.3.0")]
34+
[assembly: AssemblyVersion("1.4.3.0")]
35+
[assembly: AssemblyFileVersion("1.4.3.0")]

src/Logbert.sln

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2026
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logbert", "Logbert\Logbert.csproj", "{EE81C506-55E4-417E-B1D6-09453F89C7CD}"
77
EndProject
@@ -34,4 +34,7 @@ Global
3434
GlobalSection(SolutionProperties) = preSolution
3535
HideSolutionNode = FALSE
3636
EndGlobalSection
37+
GlobalSection(ExtensibilityGlobals) = postSolution
38+
SolutionGuid = {C17846E6-AD94-462A-87DE-C461EB49FC37}
39+
EndGlobalSection
3740
EndGlobal

src/Logbert/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
# 2 space indentation
10+
[*.cs]
11+
indent_style = space
12+
indent_size = 2

src/Logbert/App.config

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,48 @@
504504
<setting name="PnlSyslogUdpSettingsTimestampFormat" serializeAs="String">
505505
<value>MMM d HH:mm:ss</value>
506506
</setting>
507+
<setting name="ApplicationTheme" serializeAs="String">
508+
<value>Visual Studio Light</value>
509+
</setting>
510+
<setting name="PnlSyslogFileSettingsEncoding" serializeAs="String">
511+
<value>1252</value>
512+
</setting>
513+
<setting name="PnlSyslogUdpSettingsEncoding" serializeAs="String">
514+
<value>1252</value>
515+
</setting>
516+
<setting name="PnlNLogUdpSettingsEncoding" serializeAs="String">
517+
<value>1252</value>
518+
</setting>
519+
<setting name="PnlNLogTcpSettingsEncoding" serializeAs="String">
520+
<value>1252</value>
521+
</setting>
522+
<setting name="PnlNLogFileSettingsEncoding" serializeAs="String">
523+
<value>1252</value>
524+
</setting>
525+
<setting name="PnlNLogDirSettingsEncoding" serializeAs="String">
526+
<value>1252</value>
527+
</setting>
528+
<setting name="PnlLog4NetFileSettingsEncoding" serializeAs="String">
529+
<value>1252</value>
530+
</setting>
531+
<setting name="PnlLog4NetDirSettingsEncoding" serializeAs="String">
532+
<value>1252</value>
533+
</setting>
534+
<setting name="PnlLog4NetUdpSettingsEncoding" serializeAs="String">
535+
<value>1252</value>
536+
</setting>
537+
<setting name="PnlCustomFileSettingsEncoding" serializeAs="String">
538+
<value>1252</value>
539+
</setting>
540+
<setting name="PnlCustomDirSettingsEncoding" serializeAs="String">
541+
<value>1252</value>
542+
</setting>
543+
<setting name="PnlCustomUdpSettingsEncoding" serializeAs="String">
544+
<value>1252</value>
545+
</setting>
546+
<setting name="PnlCustomTcpSettingsEncoding" serializeAs="String">
547+
<value>1252</value>
548+
</setting>
507549
</Com.Couchcoding.Logbert.Properties.Settings>
508550
</userSettings>
509551
<applicationSettings>

src/Logbert/Controls/CustomDetailsControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public partial class CustomDetailsControl : UserControl, ILogPresenter
7979
#region Public Properties
8080

8181
/// <summary>
82-
/// Gets the count of currently displayed <see cref=LogMessage"/>s.
82+
/// Gets the count of currently displayed <see cref="LogMessage"/>s.
8383
/// </summary>
8484
public int DisplayedLogMessagesCount
8585
{

0 commit comments

Comments
 (0)