public ModDatabaseModViewModel(ModDatabaseMod mod, ModDatabase database)
        {
            this.mod = mod;
            this.timer = new Timer();
            this.database = database;
            this.saver = new DownloadedModSaver();
            this.extractor = new ModExtracter();

            DownloadModCommand = new Command(DownloadMod, x => !IsDownloading);

            timer.AutoReset = false;
            timer.Elapsed += (o, e) =>
            {
                ModHasBeenDownloaded = false;
                timer.Stop();
            };
            timer.Interval = TimeSpan.FromSeconds(5).TotalMilliseconds;
        }
예제 #2
0
        public ModDatabaseModViewModel(ModDatabaseMod mod, ModDatabase database)
        {
            this.mod       = mod;
            this.timer     = new Timer();
            this.database  = database;
            this.saver     = new DownloadedModSaver();
            this.extractor = new ModExtracter();

            DownloadModCommand = new Command(DownloadMod, x => !IsDownloading);

            timer.AutoReset = false;
            timer.Elapsed  += (o, e) =>
            {
                ModHasBeenDownloaded = false;
                timer.Stop();
            };
            timer.Interval = TimeSpan.FromSeconds(5).TotalMilliseconds;
        }