-
-
Notifications
You must be signed in to change notification settings - Fork 608
Expand file tree
/
Copy pathSettingsViewModel.cs
More file actions
26 lines (21 loc) · 742 Bytes
/
SettingsViewModel.cs
File metadata and controls
26 lines (21 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Generic;
using System.Linq;
namespace Flow.Launcher.Plugin.Calculator.ViewModels;
public class SettingsViewModel(Settings settings) : BaseModel
{
public Settings Settings { get; init; } = settings;
public static IEnumerable<int> MaxDecimalPlacesRange => Enumerable.Range(1, 20);
public List<DecimalSeparatorLocalized> AllDecimalSeparator { get; } = DecimalSeparatorLocalized.GetValues();
public DecimalSeparator SelectedDecimalSeparator
{
get => Settings.DecimalSeparator;
set
{
if (Settings.DecimalSeparator != value)
{
Settings.DecimalSeparator = value;
OnPropertyChanged();
}
}
}
}