Ejemplo n.º 1
0
 public static void ShowWindow(string downloadFileUrl, string fileTitle, Action<ContainerWindow, bool, string, string> downloadComplete) {
     Execute.OnUIThread(() => {
         ContainerWindow.ShowWindow(new ContainerWindowViewModel {
             IconName = "Icon_Download",
             CloseVisible = System.Windows.Visibility.Visible,
         }, ucFactory: (window) => {
             FileDownloaderViewModel vm = new FileDownloaderViewModel(downloadFileUrl, (isSuccess, message, saveFileFullName) => {
                 downloadComplete(window, isSuccess, message, saveFileFullName);
             });
             return new FileDownloader(vm);
         }, fixedSize: true);
     });
 }
Ejemplo n.º 2
0
 public static void ShowWindow(
     string downloadFileUrl, string fileTitle,
     // window, isSuccess, message, saveFileFullName, etagValue
     Action <ContainerWindow, bool, string, string> downloadComplete)
 {
     UIThread.Execute(() => {
         ContainerWindow.ShowWindow(new ContainerWindowViewModel {
             Title        = "下载 - " + fileTitle,
             IconName     = "Icon_Download",
             Height       = 200,
             Width        = 400,
             CloseVisible = System.Windows.Visibility.Visible,
         }, ucFactory: (window) => {
             FileDownloaderViewModel vm = new FileDownloaderViewModel(downloadFileUrl, (isSuccess, message, saveFileFullName) => {
                 downloadComplete(window, isSuccess, message, saveFileFullName);
             });
             return(new FileDownloader(vm));
         }, fixedSize: true);
     });
 }
Ejemplo n.º 3
0
 public FileDownloader(FileDownloaderViewModel vm)
 {
     this.DataContext = vm;
     InitializeComponent();
 }
Ejemplo n.º 4
0
 public FileDownloader(FileDownloaderViewModel vm)
 {
     this.DataContext = vm;
     InitializeComponent();
     ResourceDictionarySet.Instance.FillResourceDic(this, this.Resources);
 }