Exemple #1
0
        public static MightyDownloadDocWindow Open(WindowState state, MightyDocVersion docVersion)
        {
            var window = GetWindow <MightyDownloadDocWindow>();

            window.m_windowState = state;
            window.m_docVersion  = docVersion;
            window.Show();
            return(window);
        }
Exemple #2
0
        private static void DownloadDocAtPath(string path, MightyDocVersion docVersion)
        {
            using (var client = new MightyWebClient())
            {
                client.Path                     = path;
                client.DocVersion               = docVersion;
                client.DownloadFileCompleted   += OnDownloadDocCompleted;
                client.DownloadProgressChanged += OnDownloadProgressChanged;
                client.DownloadFileAsync(new Uri(docVersion.docURL), path);

                DownloadingWindowUtilities.Open();
            }
        }
Exemple #3
0
        public static void DownloadDocFromVersion(MightyDocVersion docVersion)
        {
            if (!docVersion.isValid)
            {
                return;
            }

            var path = OpenSavePanel();

            if (!string.IsNullOrWhiteSpace(path))
            {
                DownloadDocAtPath(path, docVersion);
            }
        }