mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
33 lines
957 B
C#
33 lines
957 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Flow.Launcher.Plugin.Calculator.ViewModels
|
|
{
|
|
public class SettingsViewModel : BaseModel
|
|
{
|
|
public SettingsViewModel(Settings settings)
|
|
{
|
|
Settings = settings;
|
|
DecimalSeparatorLocalized.UpdateLabels(AllDecimalSeparator);
|
|
}
|
|
|
|
public Settings Settings { get; init; }
|
|
|
|
public 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();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|