Ejemplo n.º 1
0
        //--------------------------------------------------------------
        #region Creation & Cleanup
        //--------------------------------------------------------------

        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel"/> class.
        /// </summary>
        /// <param name="aboutService">The <see cref="IAboutService"/>.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="aboutService"/> is <see langword="null"/>.
        /// </exception>
        public AboutViewModel(IAboutService aboutService)
        {
            if (aboutService == null)
                throw new ArgumentNullException(nameof(aboutService));

            AboutService = aboutService;
            DisplayName = Invariant($"About {AboutService.ApplicationName}");
            CloseAboutDialogCommand = new DelegateCommand(() => Conductor.DeactivateItemAsync(this, true));
            CopyToClipboardCommand = new DelegateCommand(() => AboutService.CopyInformationToClipboard());
        }
Ejemplo n.º 2
0
        //--------------------------------------------------------------
        #region Creation & Cleanup
        //--------------------------------------------------------------

        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel"/> class.
        /// </summary>
        /// <param name="aboutService">The <see cref="IAboutService"/>.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="aboutService"/> is <see langword="null"/>.
        /// </exception>
        public AboutViewModel(IAboutService aboutService)
        {
            if (aboutService == null)
            {
                throw new ArgumentNullException(nameof(aboutService));
            }

            AboutService            = aboutService;
            DisplayName             = Invariant($"About {AboutService.ApplicationName}");
            CloseAboutDialogCommand = new DelegateCommand(() => Conductor.DeactivateItemAsync(this, true));
            CopyToClipboardCommand  = new DelegateCommand(() => AboutService.CopyInformationToClipboard());
        }