Exemplo n.º 1
0
 }                                                       // уведомления в окне
 public LoginUserControls()
 {
     InitializeComponent();
     this.Manager          = new NotificationMessageManager();
     NotifyManager.Manager = this.Manager;
     App.Language          = WaterBalance.Properties.Settings.Default.DefaultLanguage;
 } // конструктор
Exemplo n.º 2
0
 public ShellViewModel(ILogger <ShellViewModel> logger, INavigationService navigationService, NotificationMessageManager manager)
 {
     this.logger       = logger;
     NavigationService = navigationService;
     Manager           = manager;
     InitializeCommands();
 }
Exemplo n.º 3
0
        /// <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());
            });
        }
Exemplo n.º 4
0
 /// <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();
 }
Exemplo n.º 5
0
 /// <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();
 }
Exemplo n.º 7
0
 }                                                       // менеджер уведомлений
 public RegisterUserControls()
 {
     InitializeComponent();
     this.Manager          = new NotificationMessageManager();
     NotifyManager.Manager = this.Manager;
 } // конструктор
 public NotificationService(ILogger <NotificationService> logger, NotificationMessageManager manager)
 {
     Logger  = logger;
     Manager = manager;
 }