more details

This commit is contained in:
2025-12-26 20:38:57 +01:00
parent af1beeaa2c
commit c4be7c121d
7 changed files with 105 additions and 23 deletions

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.git
.vs
ServiceMonitor/obj/*
*.user
ServiceMonitor/obj/*
ServiceMonitor/bin/*

View File

@@ -57,4 +57,9 @@ public sealed class ApplicationDescriptor
public ApplicationRealm Realm { get; }
public ApplicationType Type { get; }
public override string ToString()
{
return string.Format("{0}-{1}", Realm.Name.ToLower(), Type.ToString().ToLower());
}
}

View File

@@ -1,14 +1,21 @@
using WeifenLuo.WinFormsUI.Docking;
namespace ServiceMonitor
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
namespace ServiceMonitor;
_dockPanel.Theme = new VS2015BlueTheme();
}
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
_dockPanel.Theme = new VS2015BlueTheme();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
ProcessDockContent content = new ProcessDockContent(ApplicationDescriptor.CzechWorker);
content.Show(_dockPanel, DockState.Document);
}
}

View File

@@ -0,0 +1,37 @@
namespace ServiceMonitor
{
partial class ProcessDockContent
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@@ -0,0 +1,28 @@
using WeifenLuo.WinFormsUI.Docking;
namespace ServiceMonitor;
public partial class ProcessDockContent : DockContent
{
public ProcessDockContent()
{
if (!DesignMode)
{
throw new Exception("Only for design mode");
}
InitializeComponent();
Descriptor = null!;
}
public ProcessDockContent(ApplicationDescriptor descriptor)
{
Descriptor = descriptor;
Text = descriptor.ToString();
CloseButtonVisible = true;
}
public ApplicationDescriptor Descriptor { get; }
}

View File

@@ -1,17 +1,16 @@
namespace ServiceMonitor
namespace ServiceMonitor;
internal static class Program
{
internal static class Program
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new MainForm());
}
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new MainForm());
}
}

View File

@@ -8,4 +8,9 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DockPanelSuite" Version="3.1.1" />
<PackageReference Include="DockPanelSuite.ThemeVS2015" Version="3.1.1" />
</ItemGroup>
</Project>