프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MarkusAutoUpdate / src / NetSparkle / Interfaces / IDownloadProgress.cs @ d8f5045e

이력 | 보기 | 이력해설 | 다운로드 (2.16 KB)

1
using System.Net;
2
using System;
3
using NetSparkleUpdater.Events;
4

    
5
namespace NetSparkleUpdater.Interfaces
6
{
7
    /// <summary>
8
    /// Interface for UI element that shows the progress bar
9
    /// and a method to install and relaunch the appliction
10
    /// </summary>
11
    public interface IDownloadProgress
12
    {
13
        /// <summary>
14
        /// Event to fire when the download UI is complete; tells you 
15
        /// if the install process should happen or not
16
        /// </summary>
17
        event DownloadInstallEventHandler DownloadProcessCompleted;
18

    
19
        /// <summary>
20
        /// Enable or disable the download and install button (such as when your "Can I gracefully close the window?" function is async and you don't
21
        /// want your user to click the button multiple times)
22
        /// </summary>
23
        /// <param name="shouldBeEnabled">True if the button should be enabled; false otherwise</param>
24
        void SetDownloadAndInstallButtonEnabled(bool shouldBeEnabled);
25

    
26
        /// <summary>
27
        /// Show the UI for download progress
28
        /// </summary>
29
        /// <returns>True if download was successful; false otherwise</returns>
30
        void Show(bool isOnMainThread);
31

    
32
        /// <summary>
33
        /// Called when the download progress changes
34
        /// </summary>
35
        /// <param name="sender">sender of the progress update</param>
36
        /// <param name="args">used to deliver info on download progress (e.g. 
37
        /// total bytes downloaded)</param>
38
        void OnDownloadProgressChanged(object sender, ItemDownloadProgressEventArgs args);
39

    
40
        /// <summary>
41
        /// Close the download progress UI
42
        /// </summary>
43
        void Close();
44

    
45
        /// <summary>
46
        /// Update UI to show file is downloaded and signature check result
47
        /// </summary>
48
        void FinishedDownloadingFile(bool isDownloadedFileValid);
49

    
50
        /// <summary>
51
        /// Show an error message in the download progress window if possible.
52
        /// </summary>
53
        /// <param name="errorMessage">Error message to display</param>
54
        /// <returns>True if message displayed; false otherwise</returns>
55
        bool DisplayErrorMessage(string errorMessage);
56
    }
57
}
클립보드 이미지 추가 (최대 크기: 500 MB)