more details
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.git
|
.git
|
||||||
.vs
|
.vs
|
||||||
ServiceMonitor/obj/*
|
|
||||||
*.user
|
*.user
|
||||||
|
ServiceMonitor/obj/*
|
||||||
|
ServiceMonitor/bin/*
|
||||||
|
|||||||
@@ -57,4 +57,9 @@ public sealed class ApplicationDescriptor
|
|||||||
public ApplicationRealm Realm { get; }
|
public ApplicationRealm Realm { get; }
|
||||||
|
|
||||||
public ApplicationType Type { get; }
|
public ApplicationType Type { get; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}-{1}", Realm.Name.ToLower(), Type.ToString().ToLower());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using WeifenLuo.WinFormsUI.Docking;
|
using WeifenLuo.WinFormsUI.Docking;
|
||||||
|
|
||||||
namespace ServiceMonitor
|
namespace ServiceMonitor;
|
||||||
{
|
|
||||||
public partial class MainForm : Form
|
public partial class MainForm : Form
|
||||||
{
|
{
|
||||||
public MainForm()
|
public MainForm()
|
||||||
@@ -10,5 +10,12 @@ namespace ServiceMonitor
|
|||||||
|
|
||||||
_dockPanel.Theme = new VS2015BlueTheme();
|
_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,5 +1,5 @@
|
|||||||
namespace ServiceMonitor
|
namespace ServiceMonitor;
|
||||||
{
|
|
||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14,4 +14,3 @@ namespace ServiceMonitor
|
|||||||
Application.Run(new MainForm());
|
Application.Run(new MainForm());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -8,4 +8,9 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="DockPanelSuite" Version="3.1.1" />
|
||||||
|
<PackageReference Include="DockPanelSuite.ThemeVS2015" Version="3.1.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user