Ejemplo n.º 1
0
        internal bool GetItems(out MedocDownloadItem[] items)
        {
            items = null;

            HtmlNodeCollection downloadsItems = DownloadsItems();

            if (downloadsItems == null)
            {
                Log.Write(LogLevel.EXPERT, "MedocAPI: Cannot get items from the download-items");
                return(false);
            }

            items = new MedocDownloadItem[downloadsItems.Count];

            int i = 0;

            foreach (HtmlNode node in downloadsItems)
            {
                MedocDownloadItem item = new MedocDownloadItem();
                item.version   = GetVersion(node);
                item.link      = GetDownload(node);
                item.changelog = GetChangelog(node);

                items[i] = item;
                i++;
            }

            return(i == downloadsItems.Count);
        }
Ejemplo n.º 2
0
        public DownloadButton(MedocDownloadItem item)
        {
            InitializeComponent();
            InitializeLocalization();

            this.item = item;
            this.labelVersion.Text = item.version;

            this.zipFilename    = Path.Combine(SessionStorage.inside.DownloadsFolderPath, this.item.link.Substring(this.item.link.LastIndexOf('/') + 1));          // Take the latest part from URL
            this.updateFilename = Path.ChangeExtension(this.zipFilename, ".upd");
        }