Fixed WinForms designer issue

This commit is contained in:
tsommer committed 2022-07-11 17:58:37 +02:00
1 parent 3dfaccc99f
commit f1fc782506
2 files changed
+4 -2

No files matched your search

@@ -13,7 +13,9 @@ public partial class SectionTree : UserControl
public SectionTree()
{
this.InitializeComponent();
if(this.DesignMode)
// Check if we are in the designer:
if(Program.SERVICE_PROVIDER is null)
return;
// Get the DI context from the main form:
+1 -1
View File
@@ -8,7 +8,7 @@ namespace UI_WinForms;
internal static class Program
{
internal const string VERSION = "v0.1.0";
internal static IServiceProvider SERVICE_PROVIDER = null!;
internal static IServiceProvider? SERVICE_PROVIDER;
[STAThread]
private static void Main()