Added "Unload on regular trigger release" checkbox option to "SpecialAction.Profiles" edit panel. This option can be used to automatically unload a profile (ie. goes back to previous profile) when a regular trigger key is released.

This commit is contained in:
mika-n 2019-04-23 14:54:04 +03:00
parent 456145cf8e
commit b09e5c277e
3 changed files with 52 additions and 3 deletions

View File

@ -86,6 +86,7 @@
this.lbDTapDVR = new System.Windows.Forms.Label(); this.lbDTapDVR = new System.Windows.Forms.Label();
this.lbHoldDVR = new System.Windows.Forms.Label(); this.lbHoldDVR = new System.Windows.Forms.Label();
this.lbTapDVR = new System.Windows.Forms.Label(); this.lbTapDVR = new System.Windows.Forms.Label();
this.cbProfileAutoUntrigger = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.pBProgram)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pBProgram)).BeginInit();
this.pnlProgram.SuspendLayout(); this.pnlProgram.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDProg)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDProg)).BeginInit();
@ -383,6 +384,7 @@
// //
// pnlProfile // pnlProfile
// //
this.pnlProfile.Controls.Add(this.cbProfileAutoUntrigger);
this.pnlProfile.Controls.Add(this.lbUnloadTipProfile); this.pnlProfile.Controls.Add(this.lbUnloadTipProfile);
this.pnlProfile.Controls.Add(this.cBProfiles); this.pnlProfile.Controls.Add(this.cBProfiles);
this.pnlProfile.Controls.Add(this.btnSetUTriggerProfile); this.pnlProfile.Controls.Add(this.btnSetUTriggerProfile);
@ -596,6 +598,12 @@
resources.ApplyResources(this.lbTapDVR, "lbTapDVR"); resources.ApplyResources(this.lbTapDVR, "lbTapDVR");
this.lbTapDVR.Name = "lbTapDVR"; this.lbTapDVR.Name = "lbTapDVR";
// //
// cbProfileAutoUntrigger
//
resources.ApplyResources(this.cbProfileAutoUntrigger, "cbProfileAutoUntrigger");
this.cbProfileAutoUntrigger.Name = "cbProfileAutoUntrigger";
this.cbProfileAutoUntrigger.UseVisualStyleBackColor = true;
//
// SpecActions // SpecActions
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -698,5 +706,6 @@
public System.Windows.Forms.Button btnDTapT; public System.Windows.Forms.Button btnDTapT;
public System.Windows.Forms.Button btnHoldT; public System.Windows.Forms.Button btnHoldT;
public System.Windows.Forms.Button btnSTapT; public System.Windows.Forms.Button btnSTapT;
private System.Windows.Forms.CheckBox cbProfileAutoUntrigger;
} }
} }

View File

@ -102,6 +102,7 @@ namespace DS4Windows
break; break;
} }
} }
cbProfileAutoUntrigger.Checked = act.automaticUntrigger;
break; break;
case "Key": case "Key":
cBActions.SelectedIndex = 4; cBActions.SelectedIndex = 4;
@ -270,7 +271,7 @@ namespace DS4Windows
actRe = true; actRe = true;
if (!string.IsNullOrEmpty(oldprofilename) && oldprofilename != tBName.Text) if (!string.IsNullOrEmpty(oldprofilename) && oldprofilename != tBName.Text)
Global.RemoveAction(oldprofilename); Global.RemoveAction(oldprofilename);
Global.SaveAction(tBName.Text, String.Join("/", controls), cBActions.SelectedIndex, cBProfiles.Text, edit, String.Join("/", ucontrols) + (/* TODO: Is automaticUntrigger set */ true ? (ucontrols.Count > 0 ? "/" : "") + "AutomaticUntrigger" : "") ); Global.SaveAction(tBName.Text, String.Join("/", controls), cBActions.SelectedIndex, cBProfiles.Text, edit, String.Join("/", ucontrols) + (cbProfileAutoUntrigger.Checked ? (ucontrols.Count > 0 ? "/" : "") + "AutomaticUntrigger" : "") );
} }
else else
btnSetUTriggerProfile.ForeColor = Color.Red; btnSetUTriggerProfile.ForeColor = Color.Red;

View File

@ -2116,7 +2116,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbUnloadTipProfile.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbUnloadTipProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 55</value> <value>0, 95</value>
</data> </data>
<data name="lbUnloadTipProfile.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbUnloadTipProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 23</value> <value>100, 23</value>
@ -2140,7 +2140,7 @@
<value>206, 58</value> <value>206, 58</value>
</data> </data>
<data name="pnlProfile.Size" type="System.Drawing.Size, System.Drawing"> <data name="pnlProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 94</value> <value>161, 121</value>
</data> </data>
<data name="pnlProfile.TabIndex" type="System.Int32, mscorlib"> <data name="pnlProfile.TabIndex" type="System.Int32, mscorlib">
<value>262</value> <value>262</value>
@ -2160,6 +2160,45 @@
<data name="&gt;&gt;pnlProfile.ZOrder" xml:space="preserve"> <data name="&gt;&gt;pnlProfile.ZOrder" xml:space="preserve">
<value>11</value> <value>11</value>
</data> </data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Name" xml:space="preserve">
<value>cbProfileAutoUntrigger</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Parent" xml:space="preserve">
<value>pnlProfile</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cbProfileAutoUntrigger.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbProfileAutoUntrigger.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 61</value>
</data>
<data name="cbProfileAutoUntrigger.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 17</value>
</data>
<data name="cbProfileAutoUntrigger.TabIndex" type="System.Int32, mscorlib">
<value>260</value>
</data>
<data name="cbProfileAutoUntrigger.Text" xml:space="preserve">
<value>Unload on trigger release</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Name" xml:space="preserve">
<value>cbProfileAutoUntrigger</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.Parent" xml:space="preserve">
<value>pnlProfile</value>
</data>
<data name="&gt;&gt;cbProfileAutoUntrigger.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="nUDDCBT.Location" type="System.Drawing.Point, System.Drawing"> <data name="nUDDCBT.Location" type="System.Drawing.Point, System.Drawing">
<value>56, 3</value> <value>56, 3</value>
</data> </data>