diff --git a/Source/IdleMaster/Properties/Settings.Designer.cs b/Source/IdleMaster/Properties/Settings.Designer.cs index e36dc9ab..e7de6583 100644 --- a/Source/IdleMaster/Properties/Settings.Designer.cs +++ b/Source/IdleMaster/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace IdleMaster.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -219,7 +219,7 @@ public string language { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] + [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool OneThenMany { get { return ((bool)(this["OneThenMany"])); @@ -228,5 +228,17 @@ public bool OneThenMany { this["OneThenMany"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool AlwaysMany { + get { + return ((bool)(this["AlwaysMany"])); + } + set { + this["AlwaysMany"] = value; + } + } } } diff --git a/Source/IdleMaster/Properties/Settings.settings b/Source/IdleMaster/Properties/Settings.settings index c1c21994..134b71b7 100644 --- a/Source/IdleMaster/Properties/Settings.settings +++ b/Source/IdleMaster/Properties/Settings.settings @@ -54,6 +54,9 @@ + False + + True diff --git a/Source/IdleMaster/app.config b/Source/IdleMaster/app.config index b8ec6744..71d1b68e 100644 --- a/Source/IdleMaster/app.config +++ b/Source/IdleMaster/app.config @@ -61,6 +61,9 @@ + False + + True diff --git a/Source/IdleMaster/frmMain.cs b/Source/IdleMaster/frmMain.cs index 37f4ee66..fc0ffe52 100644 --- a/Source/IdleMaster/frmMain.cs +++ b/Source/IdleMaster/frmMain.cs @@ -106,11 +106,19 @@ public void UpdateIdleProcesses() { foreach (var badge in CanIdleBadges.Where(b => !Equals(b, CurrentBadge))) { - if (badge.HoursPlayed >= 2 && badge.InIdle) - badge.StopIdle(); + if (!Settings.Default.AlwaysMany) + { + if (badge.HoursPlayed >= 2 && badge.InIdle) + badge.StopIdle(); - if (badge.HoursPlayed < 2 && CanIdleBadges.Count(b => b.InIdle) < 30) - badge.Idle(); + if (badge.HoursPlayed < 2 && CanIdleBadges.Count(b => b.InIdle) < 30) + badge.Idle(); + } + else + { + if (CanIdleBadges.Count(b => b.InIdle) < 30) + badge.Idle(); + } } RefreshGamesStateListView(); @@ -221,6 +229,10 @@ private void StartIdle() StartMultipleIdle(); } } + else if (Settings.Default.AlwaysMany) + { + StartMultipleIdle(); + } else { var multi = CanIdleBadges.Where(b => b.HoursPlayed < 2); @@ -306,6 +318,8 @@ public void StartSoloIdle(Badge badge) public void StartMultipleIdle() { + CurrentBadge = null; + UpdateIdleProcesses(); // Update label controls @@ -861,7 +875,7 @@ private async void tmrCardDropCheck_Tick(object sender, EventArgs e) await LoadBadgesAsync(); UpdateIdleProcesses(); - isMultipleIdle = CanIdleBadges.Any(b => b.HoursPlayed < 2 && b.InIdle); + isMultipleIdle = CanIdleBadges.Any(b => b.HoursPlayed < 2 && b.InIdle) || Settings.Default.AlwaysMany; if (isMultipleIdle) TimeLeft = 360; } @@ -923,10 +937,11 @@ private void settingsToolStripMenuItem_Click(object sender, EventArgs e) String previous = Settings.Default.sort; Boolean previous_behavior = Settings.Default.OnlyOneGameIdle; Boolean previous_behavior2 = Settings.Default.OneThenMany; + Boolean previous_behavior3 = Settings.Default.AlwaysMany; Form frm = new frmSettings(); frm.ShowDialog(); - if (previous != Settings.Default.sort || previous_behavior != Settings.Default.OnlyOneGameIdle || previous_behavior2 != Settings.Default.OneThenMany) + if (previous != Settings.Default.sort || previous_behavior != Settings.Default.OnlyOneGameIdle || previous_behavior2 != Settings.Default.OneThenMany || previous_behavior3 != Settings.Default.AlwaysMany) { StopIdle(); AllBadges.Clear(); diff --git a/Source/IdleMaster/frmSettings.Designer.cs b/Source/IdleMaster/frmSettings.Designer.cs index b8e5d1c7..de120253 100644 --- a/Source/IdleMaster/frmSettings.Designer.cs +++ b/Source/IdleMaster/frmSettings.Designer.cs @@ -49,9 +49,10 @@ private void InitializeComponent() this.ttHints = new System.Windows.Forms.ToolTip(this.components); this.btnAdvanced = new System.Windows.Forms.Button(); this.grpIdlingQuantity = new System.Windows.Forms.GroupBox(); + this.radOneThenMany = new System.Windows.Forms.RadioButton(); this.radManyThenOne = new System.Windows.Forms.RadioButton(); this.radOneGameOnly = new System.Windows.Forms.RadioButton(); - this.radOneThenMany = new System.Windows.Forms.RadioButton(); + this.radAlwaysMany = new System.Windows.Forms.RadioButton(); this.grpGeneral.SuspendLayout(); this.grpPriority.SuspendLayout(); this.grpIdlingQuantity.SuspendLayout(); @@ -158,7 +159,7 @@ private void InitializeComponent() this.grpPriority.Controls.Add(this.radIdleLeastDrops); this.grpPriority.Controls.Add(this.radIdleMostDrops); this.grpPriority.Controls.Add(this.radIdleDefault); - this.grpPriority.Location = new System.Drawing.Point(13, 210); + this.grpPriority.Location = new System.Drawing.Point(13, 222); this.grpPriority.Name = "grpPriority"; this.grpPriority.Size = new System.Drawing.Size(392, 92); this.grpPriority.TabIndex = 1; @@ -216,7 +217,7 @@ private void InitializeComponent() // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(330, 311); + this.btnCancel.Location = new System.Drawing.Point(330, 327); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 2; @@ -227,7 +228,7 @@ private void InitializeComponent() // btnOK // this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOK.Location = new System.Drawing.Point(249, 311); + this.btnOK.Location = new System.Drawing.Point(249, 327); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(75, 23); this.btnOK.TabIndex = 3; @@ -239,7 +240,7 @@ private void InitializeComponent() // this.btnAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnAdvanced.Image = global::IdleMaster.Properties.Resources.imgLock; - this.btnAdvanced.Location = new System.Drawing.Point(12, 311); + this.btnAdvanced.Location = new System.Drawing.Point(12, 327); this.btnAdvanced.Name = "btnAdvanced"; this.btnAdvanced.Size = new System.Drawing.Size(25, 23); this.btnAdvanced.TabIndex = 4; @@ -251,6 +252,7 @@ private void InitializeComponent() // this.grpIdlingQuantity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.grpIdlingQuantity.Controls.Add(this.radAlwaysMany); this.grpIdlingQuantity.Controls.Add(this.radOneThenMany); this.grpIdlingQuantity.Controls.Add(this.radManyThenOne); this.grpIdlingQuantity.Controls.Add(this.radOneGameOnly); @@ -258,11 +260,21 @@ private void InitializeComponent() this.grpIdlingQuantity.Margin = new System.Windows.Forms.Padding(2); this.grpIdlingQuantity.Name = "grpIdlingQuantity"; this.grpIdlingQuantity.Padding = new System.Windows.Forms.Padding(2); - this.grpIdlingQuantity.Size = new System.Drawing.Size(392, 80); + this.grpIdlingQuantity.Size = new System.Drawing.Size(392, 93); this.grpIdlingQuantity.TabIndex = 5; this.grpIdlingQuantity.TabStop = false; this.grpIdlingQuantity.Text = "Idling Behavior"; // + // radOneThenMany + // + this.radOneThenMany.AutoSize = true; + this.radOneThenMany.Location = new System.Drawing.Point(7, 52); + this.radOneThenMany.Name = "radOneThenMany"; + this.radOneThenMany.Size = new System.Drawing.Size(338, 17); + this.radOneThenMany.TabIndex = 6; + this.radOneThenMany.Text = "Idle games with more than 2 hours individually, then simultaneously"; + this.radOneThenMany.UseVisualStyleBackColor = true; + // // radManyThenOne // this.radManyThenOne.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -271,7 +283,6 @@ private void InitializeComponent() this.radManyThenOne.Name = "radManyThenOne"; this.radManyThenOne.Size = new System.Drawing.Size(379, 17); this.radManyThenOne.TabIndex = 5; - this.radManyThenOne.TabStop = true; this.radManyThenOne.Text = "Idle games simultaneously up to 2 hours, then individually"; this.radManyThenOne.UseVisualStyleBackColor = true; // @@ -279,25 +290,24 @@ private void InitializeComponent() // this.radOneGameOnly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.radOneGameOnly.Checked = true; - this.radOneGameOnly.Location = new System.Drawing.Point(7, 18); + this.radOneGameOnly.Location = new System.Drawing.Point(7, 69); this.radOneGameOnly.Name = "radOneGameOnly"; this.radOneGameOnly.Size = new System.Drawing.Size(379, 17); this.radOneGameOnly.TabIndex = 4; - this.radOneGameOnly.TabStop = true; this.radOneGameOnly.Text = "Idle each game individually"; this.radOneGameOnly.UseVisualStyleBackColor = true; // - // radOneThenMany + // radAlwaysMany // - this.radOneThenMany.AutoSize = true; - this.radOneThenMany.Location = new System.Drawing.Point(7, 53); - this.radOneThenMany.Name = "radOneThenMany"; - this.radOneThenMany.Size = new System.Drawing.Size(338, 17); - this.radOneThenMany.TabIndex = 6; - this.radOneThenMany.TabStop = true; - this.radOneThenMany.Text = "Idle games with more than 2 hours individually, then simultaneously"; - this.radOneThenMany.UseVisualStyleBackColor = true; + this.radAlwaysMany.AutoSize = true; + this.radAlwaysMany.Checked = true; + this.radAlwaysMany.Location = new System.Drawing.Point(7, 18); + this.radAlwaysMany.Name = "radAlwaysMany"; + this.radAlwaysMany.Size = new System.Drawing.Size(232, 17); + this.radAlwaysMany.TabIndex = 7; + this.radAlwaysMany.TabStop = true; + this.radAlwaysMany.Text = "Idle games simultaneously regardless of time"; + this.radAlwaysMany.UseVisualStyleBackColor = true; // // frmSettings // @@ -305,7 +315,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(417, 346); + this.ClientSize = new System.Drawing.Size(417, 362); this.Controls.Add(this.grpIdlingQuantity); this.Controls.Add(this.btnAdvanced); this.Controls.Add(this.btnOK); @@ -349,5 +359,6 @@ private void InitializeComponent() private ComboBox cboLanguage; private Label lblLanguage; private RadioButton radOneThenMany; - } + private RadioButton radAlwaysMany; + } } \ No newline at end of file diff --git a/Source/IdleMaster/frmSettings.cs b/Source/IdleMaster/frmSettings.cs index 0dc8e3de..26a32d74 100644 --- a/Source/IdleMaster/frmSettings.cs +++ b/Source/IdleMaster/frmSettings.cs @@ -50,12 +50,26 @@ private void btnOK_Click(object sender, EventArgs e) { Settings.Default.OnlyOneGameIdle = false; Settings.Default.OneThenMany = true; + Settings.Default.AlwaysMany = false; } - else + else if (radOneGameOnly.Checked) { Settings.Default.OnlyOneGameIdle = radOneGameOnly.Checked && !radManyThenOne.Checked; Settings.Default.OneThenMany = false; - } + Settings.Default.AlwaysMany = false; + } + else if (radAlwaysMany.Checked) + { + Settings.Default.OnlyOneGameIdle = false; + Settings.Default.OneThenMany = false; + Settings.Default.AlwaysMany = true; + } + else + { + Settings.Default.OnlyOneGameIdle = false; + Settings.Default.OneThenMany = false; + Settings.Default.AlwaysMany = false; + } Settings.Default.minToTray = chkMinToTray.Checked; Settings.Default.ignoreclient = chkIgnoreClientStatus.Checked; Settings.Default.showUsername = chkShowUsername.Checked; @@ -133,6 +147,10 @@ private void frmSettings_Load(object sender, EventArgs e) { radOneThenMany.Checked = true; } + else if (Settings.Default.AlwaysMany) + { + radAlwaysMany.Checked = true; + } else { radOneGameOnly.Checked = Settings.Default.OnlyOneGameIdle;