Implemented GetAllSettings generator to render all settings

This commit is contained in:
tsommer committed 2022-07-26 19:45:18 +02:00
1 parent 83cc7644d1
commit e91d8fe2eb
2 files changed
+7 -2

No files matched your search

@@ -79,4 +79,9 @@ public partial class Setting : UserControl
Dock = DockStyle.Top,
};
}
public static IEnumerable<Task<Setting>> GetAllSettings()
{
yield return ShowDeepLSettingAsync();
}
}
@@ -7,8 +7,8 @@ public partial class Settings : UserControl
this.InitializeComponent();
this.Load += async (sender, args) =>
{
var deepL = await Setting.ShowDeepLSettingAsync();
this.panelSettings.Controls.Add(deepL);
foreach (var setting in Setting.GetAllSettings())
this.panelSettings.Controls.Add(await setting);
};
}
}