} // уведомления в окне public LoginUserControls() { InitializeComponent(); this.Manager = new NotificationMessageManager(); NotifyManager.Manager = this.Manager; App.Language = WaterBalance.Properties.Settings.Default.DefaultLanguage; } // конструктор
public ShellViewModel(ILogger <ShellViewModel> logger, INavigationService navigationService, NotificationMessageManager manager) { this.logger = logger; NavigationService = navigationService; Manager = manager; InitializeCommands(); }
/// <summary> /// Constructor /// </summary> public AboutViewModel(NotificationMessageManager manager) { _manager = manager; Version = Constants.AppVersion; Copyright = Constants.Copyright; var subjectType = GetType(); var subjectAssembly = subjectType.Assembly; using (var stream = subjectAssembly.GetManifestResourceStream(@"Popcorn.Markdown.Project.md")) { if (stream != null) { using (var reader = new StreamReader(stream)) { Project = reader.ReadToEnd(); } } } using (var stream = subjectAssembly.GetManifestResourceStream(@"Popcorn.Markdown.Legal.md")) { if (stream != null) { using (var reader = new StreamReader(stream)) { Legal = reader.ReadToEnd(); } } } ShowLicenseCommand = new RelayCommand(async() => { await Messenger.Default.SendAsync(new ShowLicenseDialogMessage()); }); }
/// <summary> /// Initializes a new instance of the ApplicationSettingsViewModel class. /// </summary> /// <param name="userService">User service</param> /// <param name="subtitlesService">Subtitles service</param> /// <param name="cacheService">Cache service</param> /// <param name="manager">Notification manager</param> public ApplicationSettingsViewModel(IUserService userService, ISubtitlesService subtitlesService, ICacheService cacheService, NotificationMessageManager manager) { _cacheService = cacheService; _manager = manager; _userService = userService; _subtitlesService = subtitlesService; Version = Constants.AppVersion; RegisterCommands(); }
/// <summary> /// Initializes a new instance of the WindowViewModel class. /// </summary> /// <param name="applicationService">Instance of Application state</param> /// <param name="userService">Instance of movie history service</param> /// <param name="subtitlesService">Instance of subtitles service</param> /// <param name="cacheService">Instance of cache service</param> /// <param name="manager">The notification manager</param> public WindowViewModel(IApplicationService applicationService, IUserService userService, ISubtitlesService subtitlesService, ICacheService cacheService, NotificationMessageManager manager) { _cacheService = cacheService; _manager = manager; _subtitlesService = subtitlesService; _userService = userService; _dialogCoordinator = DialogCoordinator.Instance; _applicationService = applicationService; RegisterMessages(); RegisterCommands(); AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; }
private NotificationInteraction() { _manager = new NotificationMessageManager(); }
} // менеджер уведомлений public RegisterUserControls() { InitializeComponent(); this.Manager = new NotificationMessageManager(); NotifyManager.Manager = this.Manager; } // конструктор
public NotificationService(ILogger <NotificationService> logger, NotificationMessageManager manager) { Logger = logger; Manager = manager; }