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); }); }
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); }); }
public FileDownloader(FileDownloaderViewModel vm) { this.DataContext = vm; InitializeComponent(); }
public FileDownloader(FileDownloaderViewModel vm) { this.DataContext = vm; InitializeComponent(); ResourceDictionarySet.Instance.FillResourceDic(this, this.Resources); }