/// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// <param name="downloadReportCommand">
        /// The download report command.
        /// </param>
        /// <param name="ignoreCommand">
        /// The ignore command.
        /// </param>
        /// <param name="openUriCommand">
        /// The open uri command.
        /// </param>
        /// <param name="clipboardCommand">
        /// The clipboard command.
        /// </param>
        /// <param name="daily">
        /// The daily.
        /// </param>
        /// <param name="monthly">
        /// The monthly.
        /// </param>
        /// <param name="settingsViewModel">Settings viewmodel.</param>
        public MainViewModel(
            IDownloadReportCommand downloadReportCommand,
            IBaseCommand ignoreCommand,
            OpenUriCommand openUriCommand,
            IBaseCommand clipboardCommand,
            DailyViewModel daily,
            MonthlyViewModel monthly,
            SettingsViewModel settingsViewModel)
        {
            downloadReportCommand.ReportDownloaded += this.ReportDownloaded;
            downloadReportCommand.Executing        += (sender, args) =>
            {
                this.IsBusy = true;
            };
            this.DownloadReportCommand = downloadReportCommand;

            ignoreCommand.Executed += (sender, args) =>
            {
                this.Error = null;
            };
            this.IgnoreCommand = ignoreCommand;

            this.OpenUriCommand   = openUriCommand;
            this.ClipboardCommand = clipboardCommand;

            this.daily    = daily;
            this.monthly  = monthly;
            this.settings = settingsViewModel;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// <param name="downloadReportCommand">
        /// The download report command.
        /// </param>
        /// <param name="ignoreCommand">
        /// The ignore command.
        /// </param>
        /// <param name="openUriCommand">
        /// The open uri command.
        /// </param>
        /// <param name="clipboardCommand">
        /// The clipboard command.
        /// </param>
        /// <param name="daily">
        /// The daily.
        /// </param>
        /// <param name="monthly">
        /// The monthly.
        /// </param>
        /// <param name="settingsViewModel">Settings viewmodel.</param>
        public MainViewModel(
            IDownloadReportCommand downloadReportCommand,
            IBaseCommand ignoreCommand,
            OpenUriCommand openUriCommand,
            IBaseCommand clipboardCommand,
            DailyViewModel daily,
            MonthlyViewModel monthly,
            SettingsViewModel settingsViewModel)
        {
            downloadReportCommand.ReportDownloaded += this.ReportDownloaded;
            downloadReportCommand.Executing += (sender, args) =>
                {
                    this.IsBusy = true;
                };
            this.DownloadReportCommand = downloadReportCommand;

            ignoreCommand.Executed += (sender, args) =>
                {
                    this.Error = null;
                };
            this.IgnoreCommand = ignoreCommand;

            this.OpenUriCommand = openUriCommand;
            this.ClipboardCommand = clipboardCommand;

            this.daily = daily;
            this.monthly = monthly;
            this.settings = settingsViewModel;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MonthlyViewModel"/> class.
 /// </summary>
 /// <param name="downloadReportCommand">
 /// The download report command.
 /// </param>
 public MonthlyViewModel(IDownloadReportCommand downloadReportCommand)
 {
     downloadReportCommand.ReportDownloaded += this.DownloadCompleted;
     this.TransferUnit = TransferUnit.Gigabytes;
     this.XValues      = "Months";
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DailyViewModel"/> class.
 /// </summary>
 /// <param name="downloadReportCommand">
 /// The download report command.
 /// </param>
 public DailyViewModel(IDownloadReportCommand downloadReportCommand)
 {
     downloadReportCommand.ReportDownloaded += this.DownloadCompleted;
     this.TransferUnit = TransferUnit.Megabytes;
     this.XValues      = "Days";
 }