Files
@ 5e28ba3945f7
Branch filter:
Location: ATITD-Tools/Desert-Paint-Codex/ViewModels/MessageBoxViewModel.cs - annotation
5e28ba3945f7
1.5 KiB
text/x-csharp
Recipe count is now a ulong instead of an int so it can show values > 2.47 billion. Also, don't allow clearing the recipe list while the recipe generator is running.
40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 40eaee10ae56 | using Avalonia.Media;
using ReactiveUI;
namespace DesertPaintCodex.ViewModels
{
public class MessageBoxViewModel : ViewModelBase
{
private string? _title;
public string? Title { get => _title; private set => this.RaiseAndSetIfChanged(ref _title, value); }
private string? _message;
public string? Message { get => _message; private set => this.RaiseAndSetIfChanged(ref _message, value); }
private string? _optionAText;
public string? OptionAText { get => _optionAText; private set => this.RaiseAndSetIfChanged(ref _optionAText, value); }
private string? _optionBText;
public string? OptionBText { get => _optionBText; private set => this.RaiseAndSetIfChanged(ref _optionBText, value); }
private string? _optionCText;
public string? OptionCText { get => _optionCText; private set => this.RaiseAndSetIfChanged(ref _optionCText, value); }
public MessageBoxViewModel() : this("A Message For You", "This is a test message for use in developer mode", "Ok") {}
public MessageBoxViewModel(string title, string message, string optionA, string? optionB = null, string? optionC = null)
{
Title = title;
Message = message;
PickOption = ReactiveCommand.Create((string value) => int.Parse(value));
OptionAText = optionA;
OptionBText = optionB;
OptionCText = optionC;
}
public ReactiveCommand<string, int> PickOption { get; }
}
}
|