Optimizations
This commit is contained in:
parent
b86e057122
commit
506a21e792
@ -52,19 +52,14 @@ public partial class Setting : UserControl
|
||||
};
|
||||
|
||||
// Setup the change event handler:
|
||||
dropdown.SelectedValueChanged += async (sender, args) =>
|
||||
{
|
||||
var newSetting = dropdown.SelectedIndex switch
|
||||
dropdown.SelectedValueChanged += async (sender, args) => await AppSettings.SetDeepLMode(dropdown.SelectedIndex switch
|
||||
{
|
||||
0 => SettingDeepL.DISABLED,
|
||||
1 => SettingDeepL.USE_FREE_ACCOUNT,
|
||||
2 => SettingDeepL.USE_PRO_ACCOUNT,
|
||||
|
||||
_ => SettingDeepL.DISABLED,
|
||||
};
|
||||
|
||||
await AppSettings.SetDeepLMode(newSetting);
|
||||
};
|
||||
});
|
||||
|
||||
// Apply the desired layout:
|
||||
dropdown.Dock = DockStyle.Fill;
|
||||
|
Loading…
Reference in New Issue
Block a user