From f8384c20325060aa675c77887715f8fdeb6a787a Mon Sep 17 00:00:00 2001 From: Jack-Myth Date: Mon, 11 Feb 2019 15:47:48 +0800 Subject: [PATCH] 2019.2.11 15:47 --- .../IdleMaster/AlwaysIdleList.Designer.cs | 76 +++++++++---------- IdleMaster/IdleMaster/AlwaysIdleList.cs | 3 +- IdleMaster/IdleMaster/frmMain.Designer.cs | 24 +++--- IdleMaster/IdleMaster/frmSettings.cs | 5 +- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/IdleMaster/IdleMaster/AlwaysIdleList.Designer.cs b/IdleMaster/IdleMaster/AlwaysIdleList.Designer.cs index 4748aec..8432569 100644 --- a/IdleMaster/IdleMaster/AlwaysIdleList.Designer.cs +++ b/IdleMaster/IdleMaster/AlwaysIdleList.Designer.cs @@ -41,6 +41,9 @@ private void InitializeComponent() this.btnSelectAll = new System.Windows.Forms.Button(); this.btnDeselectAll = new System.Windows.Forms.Button(); this.btnDel = new System.Windows.Forms.Button(); + this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.DelAllCheckedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DelAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.button2 = new System.Windows.Forms.Button(); this.btnReturn = new System.Windows.Forms.Button(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); @@ -51,12 +54,9 @@ private void InitializeComponent() this.btnImport = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.DelAllCheckedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DelAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.contextMenuStrip2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // checkedListBox1 @@ -69,7 +69,7 @@ private void InitializeComponent() this.checkedListBox1.FormattingEnabled = true; this.checkedListBox1.Location = new System.Drawing.Point(12, 12); this.checkedListBox1.Name = "checkedListBox1"; - this.checkedListBox1.Size = new System.Drawing.Size(356, 196); + this.checkedListBox1.Size = new System.Drawing.Size(356, 260); this.checkedListBox1.TabIndex = 0; this.checkedListBox1.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox1_ItemCheck); this.checkedListBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.checkedListBox1_MouseUp); @@ -107,7 +107,7 @@ private void InitializeComponent() // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 225); + this.label1.Location = new System.Drawing.Point(13, 289); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(41, 12); this.label1.TabIndex = 1; @@ -116,7 +116,7 @@ private void InitializeComponent() // appidInput // this.appidInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.appidInput.Location = new System.Drawing.Point(60, 222); + this.appidInput.Location = new System.Drawing.Point(60, 286); this.appidInput.Name = "appidInput"; this.appidInput.Size = new System.Drawing.Size(87, 21); this.appidInput.TabIndex = 2; @@ -124,7 +124,7 @@ private void InitializeComponent() // btnAdd // this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnAdd.Location = new System.Drawing.Point(153, 220); + this.btnAdd.Location = new System.Drawing.Point(153, 284); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new System.Drawing.Size(50, 23); this.btnAdd.TabIndex = 3; @@ -135,7 +135,7 @@ private void InitializeComponent() // btnSelectAll // this.btnSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnSelectAll.Location = new System.Drawing.Point(209, 220); + this.btnSelectAll.Location = new System.Drawing.Point(209, 284); this.btnSelectAll.Name = "btnSelectAll"; this.btnSelectAll.Size = new System.Drawing.Size(43, 23); this.btnSelectAll.TabIndex = 4; @@ -146,7 +146,7 @@ private void InitializeComponent() // btnDeselectAll // this.btnDeselectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnDeselectAll.Location = new System.Drawing.Point(258, 220); + this.btnDeselectAll.Location = new System.Drawing.Point(258, 284); this.btnDeselectAll.Name = "btnDeselectAll"; this.btnDeselectAll.Size = new System.Drawing.Size(57, 23); this.btnDeselectAll.TabIndex = 5; @@ -159,7 +159,7 @@ private void InitializeComponent() this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnDel.ContextMenuStrip = this.contextMenuStrip2; this.btnDel.Image = global::IdleMaster.Properties.Resources.imgTrash; - this.btnDel.Location = new System.Drawing.Point(374, 176); + this.btnDel.Location = new System.Drawing.Point(374, 240); this.btnDel.Name = "btnDel"; this.btnDel.Size = new System.Drawing.Size(40, 33); this.btnDel.TabIndex = 6; @@ -167,10 +167,32 @@ private void InitializeComponent() this.btnDel.UseVisualStyleBackColor = true; this.btnDel.Click += new System.EventHandler(this.btnDel_Click); // + // contextMenuStrip2 + // + this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.DelAllCheckedToolStripMenuItem, + this.DelAllToolStripMenuItem}); + this.contextMenuStrip2.Name = "contextMenuStrip2"; + this.contextMenuStrip2.Size = new System.Drawing.Size(137, 48); + // + // DelAllCheckedToolStripMenuItem + // + this.DelAllCheckedToolStripMenuItem.Name = "DelAllCheckedToolStripMenuItem"; + this.DelAllCheckedToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.DelAllCheckedToolStripMenuItem.Text = "删除勾选项"; + this.DelAllCheckedToolStripMenuItem.Click += new System.EventHandler(this.DelAllCheckedToolStripMenuItem_Click); + // + // DelAllToolStripMenuItem + // + this.DelAllToolStripMenuItem.Name = "DelAllToolStripMenuItem"; + this.DelAllToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.DelAllToolStripMenuItem.Text = "删除所有"; + this.DelAllToolStripMenuItem.Click += new System.EventHandler(this.DelAllToolStripMenuItem_Click); + // // button2 // this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(321, 220); + this.button2.Location = new System.Drawing.Point(321, 284); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(93, 23); this.button2.TabIndex = 7; @@ -201,7 +223,7 @@ private void InitializeComponent() // this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.pictureBox1.Image = global::IdleMaster.Properties.Resources.imgSpin; - this.pictureBox1.Location = new System.Drawing.Point(386, 137); + this.pictureBox1.Location = new System.Drawing.Point(386, 201); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(16, 16); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; @@ -212,7 +234,7 @@ private void InitializeComponent() // GameCount // this.GameCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.GameCount.Location = new System.Drawing.Point(368, 162); + this.GameCount.Location = new System.Drawing.Point(368, 226); this.GameCount.Name = "GameCount"; this.GameCount.Size = new System.Drawing.Size(54, 12); this.GameCount.TabIndex = 10; @@ -249,33 +271,11 @@ private void InitializeComponent() // this.openFileDialog1.FileName = "openFileDialog1"; // - // contextMenuStrip2 - // - this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.DelAllCheckedToolStripMenuItem, - this.DelAllToolStripMenuItem}); - this.contextMenuStrip2.Name = "contextMenuStrip2"; - this.contextMenuStrip2.Size = new System.Drawing.Size(137, 48); - // - // DelAllCheckedToolStripMenuItem - // - this.DelAllCheckedToolStripMenuItem.Name = "DelAllCheckedToolStripMenuItem"; - this.DelAllCheckedToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.DelAllCheckedToolStripMenuItem.Text = "删除勾选项"; - this.DelAllCheckedToolStripMenuItem.Click += new System.EventHandler(this.DelAllCheckedToolStripMenuItem_Click); - // - // DelAllToolStripMenuItem - // - this.DelAllToolStripMenuItem.Name = "DelAllToolStripMenuItem"; - this.DelAllToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.DelAllToolStripMenuItem.Text = "删除所有"; - this.DelAllToolStripMenuItem.Click += new System.EventHandler(this.DelAllToolStripMenuItem_Click); - // // AlwaysIdleList // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(419, 249); + this.ClientSize = new System.Drawing.Size(419, 313); this.Controls.Add(this.GameCount); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.btnImport); @@ -300,8 +300,8 @@ private void InitializeComponent() this.Resize += new System.EventHandler(this.AlwaysIdleList_Resize); this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.contextMenuStrip2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/IdleMaster/IdleMaster/AlwaysIdleList.cs b/IdleMaster/IdleMaster/AlwaysIdleList.cs index 6d11e74..6acf731 100644 --- a/IdleMaster/IdleMaster/AlwaysIdleList.cs +++ b/IdleMaster/IdleMaster/AlwaysIdleList.cs @@ -140,7 +140,8 @@ private void button2_Click(object sender, EventArgs e) { //Stop Idle foreach (Process p in ProcessList) - p.Kill(); + if(!p.HasExited) + p.Kill(); ProcessList.Clear(); this.button2.Text = "▶开始"; this.checkedListBox1.Enabled = true; diff --git a/IdleMaster/IdleMaster/frmMain.Designer.cs b/IdleMaster/IdleMaster/frmMain.Designer.cs index ec71b21..aca5352 100644 --- a/IdleMaster/IdleMaster/frmMain.Designer.cs +++ b/IdleMaster/IdleMaster/frmMain.Designer.cs @@ -316,7 +316,7 @@ private void InitializeComponent() // this.pauseIdlingToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pauseIdlingToolStripMenuItem.Image"))); this.pauseIdlingToolStripMenuItem.Name = "pauseIdlingToolStripMenuItem"; - this.pauseIdlingToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.pauseIdlingToolStripMenuItem.Size = new System.Drawing.Size(212, 26); this.pauseIdlingToolStripMenuItem.Text = "&Pause Idling"; this.pauseIdlingToolStripMenuItem.Click += new System.EventHandler(this.pauseIdlingToolStripMenuItem_Click); // @@ -325,7 +325,7 @@ private void InitializeComponent() this.resumeIdlingToolStripMenuItem.Enabled = false; this.resumeIdlingToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("resumeIdlingToolStripMenuItem.Image"))); this.resumeIdlingToolStripMenuItem.Name = "resumeIdlingToolStripMenuItem"; - this.resumeIdlingToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.resumeIdlingToolStripMenuItem.Size = new System.Drawing.Size(212, 26); this.resumeIdlingToolStripMenuItem.Text = "Resume Idling"; this.resumeIdlingToolStripMenuItem.Click += new System.EventHandler(this.resumeIdlingToolStripMenuItem_Click); // @@ -333,20 +333,20 @@ private void InitializeComponent() // this.skipGameToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("skipGameToolStripMenuItem.Image"))); this.skipGameToolStripMenuItem.Name = "skipGameToolStripMenuItem"; - this.skipGameToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.skipGameToolStripMenuItem.Size = new System.Drawing.Size(212, 26); this.skipGameToolStripMenuItem.Text = "&Skip Current Game"; this.skipGameToolStripMenuItem.Click += new System.EventHandler(this.skipGameToolStripMenuItem_Click); // // toolStripMenuItem2 // this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(205, 6); + this.toolStripMenuItem2.Size = new System.Drawing.Size(209, 6); // // blacklistCurrentGameToolStripMenuItem // this.blacklistCurrentGameToolStripMenuItem.Image = global::IdleMaster.Properties.Resources.imgBlacklist; this.blacklistCurrentGameToolStripMenuItem.Name = "blacklistCurrentGameToolStripMenuItem"; - this.blacklistCurrentGameToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.blacklistCurrentGameToolStripMenuItem.Size = new System.Drawing.Size(212, 26); this.blacklistCurrentGameToolStripMenuItem.Text = "&Blacklist Current Game"; this.blacklistCurrentGameToolStripMenuItem.Click += new System.EventHandler(this.blacklistCurrentGameToolStripMenuItem_Click); // @@ -367,7 +367,7 @@ private void InitializeComponent() // this.statisticsToolStripMenuItem.Image = global::IdleMaster.Properties.Resources.imgStatistics; this.statisticsToolStripMenuItem.Name = "statisticsToolStripMenuItem"; - this.statisticsToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.statisticsToolStripMenuItem.Size = new System.Drawing.Size(188, 26); this.statisticsToolStripMenuItem.Text = "&Statistics"; this.statisticsToolStripMenuItem.Click += new System.EventHandler(this.statisticsToolStripMenuItem_Click); // @@ -375,7 +375,7 @@ private void InitializeComponent() // this.changelogToolStripMenuItem.Image = global::IdleMaster.Properties.Resources.imgDocument; this.changelogToolStripMenuItem.Name = "changelogToolStripMenuItem"; - this.changelogToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.changelogToolStripMenuItem.Size = new System.Drawing.Size(188, 26); this.changelogToolStripMenuItem.Text = "&Release Notes"; this.changelogToolStripMenuItem.Click += new System.EventHandler(this.changelogToolStripMenuItem_Click); // @@ -383,7 +383,7 @@ private void InitializeComponent() // this.officialGroupToolStripMenuItem.Image = global::IdleMaster.Properties.Resources.imgGlobe; this.officialGroupToolStripMenuItem.Name = "officialGroupToolStripMenuItem"; - this.officialGroupToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.officialGroupToolStripMenuItem.Size = new System.Drawing.Size(188, 26); this.officialGroupToolStripMenuItem.Text = "&Official Group"; this.officialGroupToolStripMenuItem.Click += new System.EventHandler(this.officialGroupToolStripMenuItem_Click); // @@ -391,20 +391,20 @@ private void InitializeComponent() // this.toolStripMenuItem1.Image = global::IdleMaster.Properties.Resources.stcn; this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(160, 22); - this.toolStripMenuItem1.Text = "问题反馈"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(184, 26); + this.toolStripMenuItem1.Text = "问题反馈和更新"; this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); // // toolStripMenuItem3 // this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(157, 6); + this.toolStripMenuItem3.Size = new System.Drawing.Size(185, 6); // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Image = global::IdleMaster.Properties.Resources.imgInfo; this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(188, 26); this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // diff --git a/IdleMaster/IdleMaster/frmSettings.cs b/IdleMaster/IdleMaster/frmSettings.cs index e39996f..af2ee1d 100644 --- a/IdleMaster/IdleMaster/frmSettings.cs +++ b/IdleMaster/IdleMaster/frmSettings.cs @@ -251,9 +251,8 @@ private void textBox1_KeyPress(object sender, KeyPressEventArgs e) private void button1_Click(object sender, EventArgs e) { - MessageBox.Show("此处可以设置同时挂卡的最大上限,Idle默认可以同时运行30个游戏,但是如果你的游戏非常多," + - "很多两小时也是很长的时间,这个地方可以设置最大运行的数目,可以提高到64甚至更多。\n" + - "但是需要注意,每个游戏需要占用5MB内存(优化后占用3MB物理内存),挂很多游戏的前提是你的内存足够大,请自行斟酌。","这是什么?"); + MessageBox.Show("此处可以设置同时挂卡的最大上限,Idle默认可以同时运行30个游戏,你可以修改这个参数,来限制IdleMaster的运行数量。" + + "但是,由于Steam本身的限制,无论运行多少游戏,最多只有30个游戏会记录时长,请自行斟酌","这是什么?"); } } }