Fixed WinForms designer issue
This commit is contained in:
parent
3dfaccc99f
commit
f1fc782506
@ -13,7 +13,9 @@ public partial class SectionTree : UserControl
|
|||||||
public SectionTree()
|
public SectionTree()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
if(this.DesignMode)
|
|
||||||
|
// Check if we are in the designer:
|
||||||
|
if(Program.SERVICE_PROVIDER is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Get the DI context from the main form:
|
// Get the DI context from the main form:
|
||||||
|
@ -8,7 +8,7 @@ namespace UI_WinForms;
|
|||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
internal const string VERSION = "v0.1.0";
|
internal const string VERSION = "v0.1.0";
|
||||||
internal static IServiceProvider SERVICE_PROVIDER = null!;
|
internal static IServiceProvider? SERVICE_PROVIDER;
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main()
|
private static void Main()
|
||||||
|
Loading…
Reference in New Issue
Block a user