コード例 #1
0
 private static IEnumerable <VoicePack> GetOutdatedPacks()
 {
     return(GlobalData.VoicePacks.Where <VoicePack>((VoicePack vp) => {
         if (GlobalData.ModPacksManager.FindByName(vp.PackName) == null)
         {
             return false;
         }
         return PacksDownloader.HasUpdates(vp);
     }));
 }
コード例 #2
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(DownloaderForm));

            this.listContextMenu     = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.tsmiRemoveFromQueue = new ToolStripMenuItem();
            this.tsmiSelectAll       = new ToolStripMenuItem();
            this.btnDownload         = new Button();
            this.listBox             = new ListBox();
            this.cbxAddToQueue       = new ComboBox();
            this.btnAddToQueue       = new Button();
            this.packsDownloader     = new PacksDownloader();
            this.totalProgressBar    = new ProgressBar();
            this.lblMessage          = new Label();
            this.lblStatus           = new Label();
            this.groupBox            = new GroupBox();
            this.currentProgressBar  = new ProgressBar();
            this.listContextMenu.SuspendLayout();
            this.groupBox.SuspendLayout();
            base.SuspendLayout();
            ToolStripItemCollection items = this.listContextMenu.Items;

            ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.tsmiRemoveFromQueue, this.tsmiSelectAll };
            items.AddRange(toolStripItemArray);
            this.listContextMenu.Name = "listContextMenu";
            componentResourceManager.ApplyResources(this.listContextMenu, "listContextMenu");
            this.tsmiRemoveFromQueue.Image = Images16px.Cross;
            this.tsmiRemoveFromQueue.Name  = "tsmiRemoveFromQueue";
            componentResourceManager.ApplyResources(this.tsmiRemoveFromQueue, "tsmiRemoveFromQueue");
            this.tsmiRemoveFromQueue.Click += new EventHandler(this.tsmi_RemoveFromQueue_Click);
            this.tsmiSelectAll.Image        = Images16px.SelectAll;
            this.tsmiSelectAll.Name         = "tsmiSelectAll";
            componentResourceManager.ApplyResources(this.tsmiSelectAll, "tsmiSelectAll");
            this.tsmiSelectAll.Click += new EventHandler(this.tsmi_SelectAll_Click);
            componentResourceManager.ApplyResources(this.btnDownload, "btnDownload");
            this.btnDownload.Image = Images32px.Download;
            this.btnDownload.Name  = "btnDownload";
            this.btnDownload.UseVisualStyleBackColor = true;
            this.btnDownload.Click        += new EventHandler(this.btn_Download_Click);
            this.listBox.ContextMenuStrip  = this.listContextMenu;
            this.listBox.FormattingEnabled = true;
            componentResourceManager.ApplyResources(this.listBox, "listBox");
            this.listBox.Name                    = "listBox";
            this.listBox.SelectionMode           = SelectionMode.MultiExtended;
            this.listBox.KeyDown                += new KeyEventHandler(this.listBox_KeyDown);
            this.cbxAddToQueue.DropDownStyle     = ComboBoxStyle.DropDownList;
            this.cbxAddToQueue.FormattingEnabled = true;
            componentResourceManager.ApplyResources(this.cbxAddToQueue, "cbxAddToQueue");
            this.cbxAddToQueue.Name  = "cbxAddToQueue";
            this.btnAddToQueue.Image = Images16px.Add;
            componentResourceManager.ApplyResources(this.btnAddToQueue, "btnAddToQueue");
            this.btnAddToQueue.Name = "btnAddToQueue";
            this.btnAddToQueue.Tag  = "";
            this.btnAddToQueue.UseVisualStyleBackColor = true;
            this.btnAddToQueue.Click               += new EventHandler(this.btn_AddToQueue_Click);
            this.packsDownloader.ProgressChanged   += new DownloadProgressChangedEventHandler(this.packsDownloader_ProgressChanged);
            this.packsDownloader.DownloadCompleted += new DownloadCompletedEventHandler(this.packsDownloader_DownloadCompleted);
            this.packsDownloader.DownloadStarted   += new DownloadStartedEventHandler(this.packsDownloader_DownloadStarted);
            componentResourceManager.ApplyResources(this.totalProgressBar, "totalProgressBar");
            this.totalProgressBar.Name = "totalProgressBar";
            componentResourceManager.ApplyResources(this.lblMessage, "lblMessage");
            this.lblMessage.Name = "lblMessage";
            componentResourceManager.ApplyResources(this.lblStatus, "lblStatus");
            this.lblStatus.Name     = "lblStatus";
            this.groupBox.BackColor = Color.Transparent;
            this.groupBox.Controls.Add(this.currentProgressBar);
            this.groupBox.Controls.Add(this.lblStatus);
            this.groupBox.Controls.Add(this.lblMessage);
            this.groupBox.Controls.Add(this.totalProgressBar);
            componentResourceManager.ApplyResources(this.groupBox, "groupBox");
            this.groupBox.Name    = "groupBox";
            this.groupBox.TabStop = false;
            componentResourceManager.ApplyResources(this.currentProgressBar, "currentProgressBar");
            this.currentProgressBar.Name = "currentProgressBar";
            base.AutoBackgroundImage     = BackgroundImages.Chung;
            componentResourceManager.ApplyResources(this, "$this");
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.Controls.Add(this.btnDownload);
            base.Controls.Add(this.listBox);
            base.Controls.Add(this.groupBox);
            base.Controls.Add(this.cbxAddToQueue);
            base.Controls.Add(this.btnAddToQueue);
            this.DoubleBuffered  = true;
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            base.MaximizeBox     = false;
            base.Name            = "DownloaderForm";
            base.ShouldDispose   = false;
            base.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Hide;
            base.FormClosing    += new FormClosingEventHandler(this.DownloadForm_FormClosing);
            base.Load           += new EventHandler(this.DownloadForm_Load);
            this.listContextMenu.ResumeLayout(false);
            this.groupBox.ResumeLayout(false);
            base.ResumeLayout(false);
        }