mekasu0124

Untitled

Feb 24th, 2024
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. using Diary.ViewModels;
  2. using System.Threading;
  3. using ReactiveUI;
  4.  
  5. namespace SplashScreen.ViewModels
  6. {
  7.     internal class SplashViewModel : ViewModelBase
  8.     {
  9.         #region PrivateColorsForScreen
  10.         private string _background = "";
  11.         private string _foreground = "";
  12.         private string _border = "";
  13.         public string Background
  14.         {
  15.             get => _background;
  16.             set => this.RaiseAndSetIfChanged(ref _background, value);
  17.         }
  18.         public string Foreground
  19.         {
  20.             get => _foreground;
  21.             set => this.RaiseAndSetIfChanged(ref _foreground, value);
  22.         }
  23.         public string Border
  24.         {
  25.             get => _border;
  26.             set => this.RaiseAndSetIfChanged(ref _border, value);
  27.         }
  28.         #endregion
  29.  
  30.         private string _startUpMessage = "";
  31.         public string StartUpMessage
  32.         {
  33.             get => _startUpMessage;
  34.             set => this.RaiseAndSetIfChanged(ref _startUpMessage, value);
  35.         }
  36.  
  37.         public SplashViewModel()
  38.         {
  39.             StartUpMessage = "Application Is Loading . . .";
  40.         }
  41.  
  42.         private CancellationTokenSource _cts = new CancellationTokenSource();
  43.         public CancellationToken cancellationToken => _cts.Token;
  44.  
  45.         public void Cancel()
  46.         {
  47.             _cts.Cancel();
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment