Moved the dock setting into constructor
This commit is contained in:
2 files changed
+5
-10
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
namespace UI_WinForms.Components
|
namespace UI_WinForms.Components
|
||||||
{
|
{
|
||||||
partial class Setting
|
sealed partial class Setting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using UI_WinForms.Resources;
|
|||||||
|
|
||||||
namespace UI_WinForms.Components;
|
namespace UI_WinForms.Components;
|
||||||
|
|
||||||
public partial class Setting : UserControl
|
public sealed partial class Setting : UserControl
|
||||||
{
|
{
|
||||||
public Setting()
|
public Setting()
|
||||||
{
|
{
|
||||||
@@ -14,6 +14,7 @@ public partial class Setting : UserControl
|
|||||||
private Setting(SettingUIData settingMetaData)
|
private Setting(SettingUIData settingMetaData)
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
this.Dock = DockStyle.Top;
|
||||||
this.labelIcon.Image = settingMetaData.Icon;
|
this.labelIcon.Image = settingMetaData.Icon;
|
||||||
this.labelSettingName.Text = settingMetaData.SettingName();
|
this.labelSettingName.Text = settingMetaData.SettingName();
|
||||||
this.labelExplanation.Text = settingMetaData.SettingExplanation();
|
this.labelExplanation.Text = settingMetaData.SettingExplanation();
|
||||||
@@ -85,10 +86,7 @@ public partial class Setting : UserControl
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Setting(settingData)
|
return new Setting(settingData);
|
||||||
{
|
|
||||||
Dock = DockStyle.Top,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<Setting> ShowDeepLAPIKeySettingAsync()
|
private static async Task<Setting> ShowDeepLAPIKeySettingAsync()
|
||||||
@@ -108,10 +106,7 @@ public partial class Setting : UserControl
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Setting(settingData)
|
return new Setting(settingData);
|
||||||
{
|
|
||||||
Dock = DockStyle.Top,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<Task<Setting>> GetAllSettings()
|
public static IEnumerable<Task<Setting>> GetAllSettings()
|
||||||
|
|||||||
Reference in new issue
Block a user