more details
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.git
|
||||
.vs
|
||||
ServiceMonitor/obj/*
|
||||
*.user
|
||||
ServiceMonitor/obj/*
|
||||
ServiceMonitor/bin/*
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
37
ServiceMonitor/ProcessDockContent.Designer.cs
generated
Normal file
37
ServiceMonitor/ProcessDockContent.Designer.cs
generated
Normal 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
|
||||
}
|
||||
}
|
||||
28
ServiceMonitor/ProcessDockContent.cs
Normal file
28
ServiceMonitor/ProcessDockContent.cs
Normal 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; }
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user