diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 0580782..8b68f27 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1279,7 +1279,7 @@ namespace DS4Windows DateTime now = DateTime.UtcNow; if (!subtriggeractivated && now <= oldnowKeyAct[device] + TimeSpan.FromMilliseconds(250)) { - await Task.Delay(3); //if the button is assigned to the same key use a delay so the keydown is the last action, not key up + await Task.Delay(3); //if the button is assigned to the same key use a delay so the key down is the last action, not key up triggeractivated = true; oldnowKeyAct[device] = DateTime.MinValue; } @@ -1459,6 +1459,10 @@ namespace DS4Windows { if (Global.getCustomButton(device, action.trigger[0]) != X360Controls.Unbound) Global.getCustomButtons(device)[action.trigger[0]] = X360Controls.Unbound; + if (Global.getCustomMacro(device, action.trigger[0]) != "0") + Global.getCustomMacros(device).Remove(action.trigger[0]); + if (Global.getCustomKey(device, action.trigger[0]) != 0) + Global.getCustomMacros(device).Remove(action.trigger[0]); string[] dets = action.details.Split(','); DS4Device d = ctrl.DS4Controllers[device]; //Global.cus @@ -1493,7 +1497,7 @@ namespace DS4Windows } int type = 0; - string macro = "91/71/71/91"; + string macro = ""; if (tappedOnce) //single tap { if (int.TryParse(dets[0], out type)) @@ -1625,7 +1629,7 @@ namespace DS4Windows keys = new int[0]; } for (int i = 0; i < keys.Length; i++) - keys[i] = ushort.Parse(skeys[i]); + keys[i] = int.Parse(skeys[i]); bool[] keydown = new bool[286]; if (control == DS4Controls.None || !macrodone[DS4ControltoInt(control)]) { @@ -1633,7 +1637,33 @@ namespace DS4Windows macrodone[DS4ControltoInt(control)] = true; foreach (int i in keys) { - if (i >= 300) //ints over 300 used to delay + if (i >= 1000000000) + { + string lb = i.ToString().Substring(1); + if (i > 1000000000) + { + byte r = (byte)(int.Parse(lb[0].ToString()) * 100 + int.Parse(lb[1].ToString()) * 10 + int.Parse(lb[2].ToString())); + byte g = (byte)(int.Parse(lb[3].ToString()) * 100 + int.Parse(lb[4].ToString()) * 10 + int.Parse(lb[5].ToString())); + byte b = (byte)(int.Parse(lb[6].ToString()) * 100 + int.Parse(lb[7].ToString()) * 10 + int.Parse(lb[8].ToString())); + DS4LightBar.forcelight[device] = true; + DS4LightBar.forcedFlash[device] = 0; + DS4LightBar.forcedColor[device] = new DS4Color(r, g, b); + } + else + { + DS4LightBar.forcedFlash[device] = 0; + DS4LightBar.forcelight[device] = false; + } + } + else if (i >= 1000000) + { + DS4Device d = Program.rootHub.DS4Controllers[device]; + string r = i.ToString().Substring(1); + byte heavy = (byte)(int.Parse(r[0].ToString()) * 100 + int.Parse(r[1].ToString()) * 10 + int.Parse(r[2].ToString())); + byte light = (byte)(int.Parse(r[3].ToString()) * 100 + int.Parse(r[4].ToString()) * 10 + int.Parse(r[5].ToString())); + d.setRumble(light, heavy); + } + else if (i >= 300) //ints over 300 used to delay await Task.Delay(i - 300); else if (!keydown[i]) { @@ -1750,6 +1780,9 @@ namespace DS4Windows else InputMethods.performKeyRelease(i); } + DS4LightBar.forcedFlash[device] = 0; + DS4LightBar.forcelight[device] = false; + Program.rootHub.DS4Controllers[device].setRumble(0, 0); if (keyType.HasFlag(DS4KeyType.HoldMacro)) { await Task.Delay(50); diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index 25d1e5d..90fcaf8 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -461,6 +461,7 @@ ResXFileCodeGenerator Designer + Resources.Designer.cs @@ -470,7 +471,11 @@ SettingsSingleFileGenerator Settings.Designer.cs - + + True + True + Resources.resx + True Settings.settings @@ -513,6 +518,7 @@ + @@ -529,6 +535,7 @@ + diff --git a/DS4Windows/DS4Windows/DS4Form.Designer.cs b/DS4Windows/DS4Windows/DS4Form.Designer.cs index 763398d..25fb815 100644 --- a/DS4Windows/DS4Windows/DS4Form.Designer.cs +++ b/DS4Windows/DS4Windows/DS4Form.Designer.cs @@ -54,6 +54,7 @@ this.openProfiles = new System.Windows.Forms.OpenFileDialog(); this.tabMain = new System.Windows.Forms.TabControl(); this.tabControllers = new System.Windows.Forms.TabPage(); + this.btnConnectDS4Win10 = new System.Windows.Forms.Button(); this.tLPControllers = new System.Windows.Forms.TableLayoutPanel(); this.pBStatus1 = new System.Windows.Forms.PictureBox(); this.lbPad1 = new System.Windows.Forms.Label(); @@ -114,6 +115,9 @@ this.cBSwipeProfiles = new System.Windows.Forms.CheckBox(); this.StartWindowsCheckBox = new System.Windows.Forms.CheckBox(); this.startMinimizedCheckBox = new System.Windows.Forms.CheckBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbNotifications = new System.Windows.Forms.Label(); + this.cBoxNotifications = new System.Windows.Forms.ComboBox(); this.cBDisconnectBT = new System.Windows.Forms.CheckBox(); this.panel2 = new System.Windows.Forms.Panel(); this.nUDLatency = new System.Windows.Forms.NumericUpDown(); @@ -121,11 +125,8 @@ this.cBFlashWhenLate = new System.Windows.Forms.CheckBox(); this.cBCloseMini = new System.Windows.Forms.CheckBox(); this.cBQuickCharge = new System.Windows.Forms.CheckBox(); - this.cBUpdate = new System.Windows.Forms.CheckBox(); this.cBDownloadLangauge = new System.Windows.Forms.CheckBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.lbNotifications = new System.Windows.Forms.Label(); - this.cBoxNotifications = new System.Windows.Forms.ComboBox(); + this.cBUpdate = new System.Windows.Forms.CheckBox(); this.pNUpdate = new System.Windows.Forms.Panel(); this.cBUpdateTime = new System.Windows.Forms.ComboBox(); this.lbCheckEvery = new System.Windows.Forms.Label(); @@ -159,9 +160,9 @@ this.toolStrip1.SuspendLayout(); this.tabSettings.SuspendLayout(); this.fLPSettings.SuspendLayout(); + this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDLatency)).BeginInit(); - this.panel1.SuspendLayout(); this.pNUpdate.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDUpdateTime)).BeginInit(); this.pnlXIPorts.SuspendLayout(); @@ -339,12 +340,20 @@ // // tabControllers // + this.tabControllers.Controls.Add(this.btnConnectDS4Win10); this.tabControllers.Controls.Add(this.tLPControllers); this.tabControllers.Controls.Add(this.lbNoControllers); resources.ApplyResources(this.tabControllers, "tabControllers"); this.tabControllers.Name = "tabControllers"; this.tabControllers.UseVisualStyleBackColor = true; // + // btnConnectDS4Win10 + // + resources.ApplyResources(this.btnConnectDS4Win10, "btnConnectDS4Win10"); + this.btnConnectDS4Win10.Name = "btnConnectDS4Win10"; + this.btnConnectDS4Win10.UseVisualStyleBackColor = true; + this.btnConnectDS4Win10.Click += new System.EventHandler(this.btnConnectDS4Win10_Click); + // // tLPControllers // resources.ApplyResources(this.tLPControllers, "tLPControllers"); @@ -824,6 +833,30 @@ this.startMinimizedCheckBox.UseVisualStyleBackColor = true; this.startMinimizedCheckBox.CheckedChanged += new System.EventHandler(this.startMinimizedCheckBox_CheckedChanged); // + // panel1 + // + this.panel1.Controls.Add(this.lbNotifications); + this.panel1.Controls.Add(this.cBoxNotifications); + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // lbNotifications + // + resources.ApplyResources(this.lbNotifications, "lbNotifications"); + this.lbNotifications.Name = "lbNotifications"; + // + // cBoxNotifications + // + resources.ApplyResources(this.cBoxNotifications, "cBoxNotifications"); + this.cBoxNotifications.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBoxNotifications.FormattingEnabled = true; + this.cBoxNotifications.Items.AddRange(new object[] { + resources.GetString("cBoxNotifications.Items"), + resources.GetString("cBoxNotifications.Items1"), + resources.GetString("cBoxNotifications.Items2")}); + this.cBoxNotifications.Name = "cBoxNotifications"; + this.cBoxNotifications.SelectedIndexChanged += new System.EventHandler(this.cBoxNotifications_SelectedIndexChanged); + // // cBDisconnectBT // resources.ApplyResources(this.cBDisconnectBT, "cBDisconnectBT"); @@ -883,13 +916,6 @@ this.cBQuickCharge.UseVisualStyleBackColor = true; this.cBQuickCharge.CheckedChanged += new System.EventHandler(this.cBQuickCharge_CheckedChanged); // - // cBUpdate - // - resources.ApplyResources(this.cBUpdate, "cBUpdate"); - this.cBUpdate.Name = "cBUpdate"; - this.cBUpdate.UseVisualStyleBackColor = true; - this.cBUpdate.CheckedChanged += new System.EventHandler(this.cBUpdate_CheckedChanged); - // // cBDownloadLangauge // resources.ApplyResources(this.cBDownloadLangauge, "cBDownloadLangauge"); @@ -899,29 +925,12 @@ this.cBDownloadLangauge.UseVisualStyleBackColor = true; this.cBDownloadLangauge.CheckedChanged += new System.EventHandler(this.cBDownloadLangauge_CheckedChanged); // - // panel1 + // cBUpdate // - this.panel1.Controls.Add(this.lbNotifications); - this.panel1.Controls.Add(this.cBoxNotifications); - resources.ApplyResources(this.panel1, "panel1"); - this.panel1.Name = "panel1"; - // - // lbNotifications - // - resources.ApplyResources(this.lbNotifications, "lbNotifications"); - this.lbNotifications.Name = "lbNotifications"; - // - // cBoxNotifications - // - resources.ApplyResources(this.cBoxNotifications, "cBoxNotifications"); - this.cBoxNotifications.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cBoxNotifications.FormattingEnabled = true; - this.cBoxNotifications.Items.AddRange(new object[] { - resources.GetString("cBoxNotifications.Items"), - resources.GetString("cBoxNotifications.Items1"), - resources.GetString("cBoxNotifications.Items2")}); - this.cBoxNotifications.Name = "cBoxNotifications"; - this.cBoxNotifications.SelectedIndexChanged += new System.EventHandler(this.cBoxNotifications_SelectedIndexChanged); + resources.ApplyResources(this.cBUpdate, "cBUpdate"); + this.cBUpdate.Name = "cBUpdate"; + this.cBUpdate.UseVisualStyleBackColor = true; + this.cBUpdate.CheckedChanged += new System.EventHandler(this.cBUpdate_CheckedChanged); // // pNUpdate // @@ -1099,11 +1108,11 @@ this.tabSettings.ResumeLayout(false); this.fLPSettings.ResumeLayout(false); this.fLPSettings.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDLatency)).EndInit(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); this.pNUpdate.ResumeLayout(false); this.pNUpdate.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDUpdateTime)).EndInit(); @@ -1233,6 +1242,7 @@ private System.Windows.Forms.Panel panel2; private System.Windows.Forms.NumericUpDown nUDLatency; private System.Windows.Forms.Label lbMsLatency; + private System.Windows.Forms.Button btnConnectDS4Win10; //private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; } } diff --git a/DS4Windows/DS4Windows/DS4Form.cs b/DS4Windows/DS4Windows/DS4Form.cs index d88bb2f..ce956e9 100644 --- a/DS4Windows/DS4Windows/DS4Form.cs +++ b/DS4Windows/DS4Windows/DS4Form.cs @@ -48,6 +48,7 @@ namespace DS4Windows bool contextclose; string logFile = appdatapath + @"\DS4Service.log"; StreamWriter logWriter; + bool runningBat; //bool outputlog = false; [DllImport("user32.dll")] @@ -186,12 +187,16 @@ namespace DS4Windows //MessageBox.Show(Environment.OSVersion.VersionString); foreach (ToolStripMenuItem t in shortcuts) t.DropDownItemClicked += Profile_Changed_Menu; - hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged; - hideDS4CheckBox.Checked = UseExclusiveMode; - hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged; + hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged; + hideDS4CheckBox.Checked = UseExclusiveMode; + hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged; if (Environment.OSVersion.Version.Major >= 10) - toolTip1.SetToolTip(hideDS4CheckBox, "Currently does not work on Windows 10"); - cBDisconnectBT.Checked = DCBTatStop; + { + toolTip1.SetToolTip(hideDS4CheckBox, "For Windows 10, use button on the main tab to connect exclusivly"); + btnConnectDS4Win10.Visible = hideDS4CheckBox.Checked; + toolTip1.SetToolTip(btnConnectDS4Win10, "This will temporarily kill the taskbar until you connect a controller"); + } + cBDisconnectBT.Checked = DCBTatStop; cBQuickCharge.Checked = QuickCharge; nUDXIPorts.Value = FirstXinputPort; Program.rootHub.x360Bus.FirstController = FirstXinputPort; @@ -320,6 +325,23 @@ namespace DS4Windows appShortcutToStartup(); } } + UpdateTheUpdater(); + } + + private async void UpdateTheUpdater() + { + if (File.Exists(exepath + "\\Update Files\\DS4Updater.exe")) + { + Process[] processes = Process.GetProcessesByName("DS4Updater"); + while (processes.Length > 0) + { + await Task.Delay(500); + } + File.Delete(exepath + "\\DS4Updater.exe"); + File.Move(exepath + "\\Update Files\\DS4Updater.exe", exepath + "\\DS4Updater.exe"); + Directory.Delete(exepath + "\\Update Files"); + } + } void NewVersion() @@ -475,6 +497,13 @@ namespace DS4Windows LoadProfile(j, false, Program.rootHub); } } + if (bat != null && bat.HasExited && runningBat) + { + Process.Start("explorer.exe"); + bat = null; + runningBat = false; + } + GC.Collect(); } @@ -791,6 +820,11 @@ namespace DS4Windows Batteries[Index].Text = Program.rootHub.getDS4Battery(Index); if (Pads[Index].Text != String.Empty) { + if (runningBat) + { + SendKeys.Send("A"); + runningBat = false; + } Pads[Index].Enabled = true; nocontrollers = false; if (Pads[Index].Text != Properties.Resources.Connecting) @@ -1062,6 +1096,8 @@ namespace DS4Windows module.Dispose(); UseExclusiveMode = hideDS4CheckBox.Checked; + if (Environment.OSVersion.Version.Major >= 10) + btnConnectDS4Win10.Visible = hideDS4CheckBox.Checked; btnStartStop_Clicked(false); btnStartStop_Clicked(false); Save(); @@ -1615,6 +1651,22 @@ namespace DS4Windows { toolTip1.Hide((Label)sender); } + Process bat; + private void btnConnectDS4Win10_Click(object sender, EventArgs e) + { + if (!runningBat) + { + StreamWriter w = new StreamWriter(exepath + "\\ConnectDS4.bat"); + w.WriteLine("@echo off"); // Turn off echo + w.WriteLine("taskkill /IM explorer.exe /f"); + w.WriteLine("echo Connect your DS4 controller"); // + w.WriteLine("pause"); + w.WriteLine("start explorer.exe"); + w.Close(); + runningBat = true; + bat = Process.Start(exepath + "\\ConnectDS4.bat"); + } + } private void cBDownloadLangauge_CheckedChanged(object sender, EventArgs e) { diff --git a/DS4Windows/DS4Windows/DS4Form.resx b/DS4Windows/DS4Windows/DS4Form.resx index 2857bf8..0998a01 100644 --- a/DS4Windows/DS4Windows/DS4Form.resx +++ b/DS4Windows/DS4Windows/DS4Form.resx @@ -6583,6 +6583,33 @@ XML Files (*.xml)|*.xml + + Top + + + 0, 130 + + + 896, 23 + + + 48 + + + Connect DS4 exclusivly (experimental) + + + btnConnectDS4Win10 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControllers + + + 0 + 5 @@ -7573,7 +7600,7 @@ tabControllers - 0 + 1 <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="bnEditC3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cBController1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="bnEditC2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="cBController3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="bnEditC1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,46.27451,Percent,28.23529,Percent,25.4902,AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25,Absolute,20" /></TableLayoutSettings> @@ -7609,7 +7636,7 @@ tabControllers - 1 + 2 4, 22 diff --git a/DS4Windows/DS4Windows/RecordBox.Designer.cs b/DS4Windows/DS4Windows/RecordBox.Designer.cs index 41b1b04..da88768 100644 --- a/DS4Windows/DS4Windows/RecordBox.Designer.cs +++ b/DS4Windows/DS4Windows/RecordBox.Designer.cs @@ -41,6 +41,8 @@ this.btnSaveP = new System.Windows.Forms.Button(); this.lbRecordTip = new System.Windows.Forms.Label(); this.pnlMouseButtons = new System.Windows.Forms.Panel(); + this.btnLightbar = new System.Windows.Forms.Button(); + this.btnRumble = new System.Windows.Forms.Button(); this.btn5th = new System.Windows.Forms.Button(); this.btn4th = new System.Windows.Forms.Button(); this.btnLoadP = new System.Windows.Forms.Button(); @@ -51,8 +53,12 @@ this.cMSLoadPresets = new System.Windows.Forms.ContextMenuStrip(this.components); this.altTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fromFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pBLtouch = new System.Windows.Forms.PictureBox(); + this.pBRtouch = new System.Windows.Forms.PictureBox(); this.pnlMouseButtons.SuspendLayout(); this.cMSLoadPresets.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pBLtouch)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBRtouch)).BeginInit(); this.SuspendLayout(); // // btnRecord @@ -148,12 +154,34 @@ // pnlMouseButtons // resources.ApplyResources(this.pnlMouseButtons, "pnlMouseButtons"); + this.pnlMouseButtons.Controls.Add(this.pBRtouch); + this.pnlMouseButtons.Controls.Add(this.pBLtouch); + this.pnlMouseButtons.Controls.Add(this.btnLightbar); + this.pnlMouseButtons.Controls.Add(this.btnRumble); this.pnlMouseButtons.Controls.Add(this.btn5th); this.pnlMouseButtons.Controls.Add(this.btn4th); this.pnlMouseButtons.Name = "pnlMouseButtons"; this.pnlMouseButtons.MouseDown += new System.Windows.Forms.MouseEventHandler(this.anyMouseDown); this.pnlMouseButtons.MouseUp += new System.Windows.Forms.MouseEventHandler(this.anyMouseUp); // + // btnLightbar + // + resources.ApplyResources(this.btnLightbar, "btnLightbar"); + this.btnLightbar.Name = "btnLightbar"; + this.btnLightbar.UseVisualStyleBackColor = true; + this.btnLightbar.Click += new System.EventHandler(this.btnLightbar_Click); + this.btnLightbar.KeyDown += new System.Windows.Forms.KeyEventHandler(this.anyKeyDown); + this.btnLightbar.KeyUp += new System.Windows.Forms.KeyEventHandler(this.anyKeyUp); + // + // btnRumble + // + resources.ApplyResources(this.btnRumble, "btnRumble"); + this.btnRumble.Name = "btnRumble"; + this.btnRumble.UseVisualStyleBackColor = true; + this.btnRumble.Click += new System.EventHandler(this.btnRumble_Click); + this.btnRumble.KeyDown += new System.Windows.Forms.KeyEventHandler(this.anyKeyDown); + this.btnRumble.KeyUp += new System.Windows.Forms.KeyEventHandler(this.anyKeyUp); + // // btn5th // resources.ApplyResources(this.btn5th, "btn5th"); @@ -200,25 +228,39 @@ // // cMSLoadPresets // - resources.ApplyResources(this.cMSLoadPresets, "cMSLoadPresets"); this.cMSLoadPresets.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.altTabToolStripMenuItem, this.fromFileToolStripMenuItem}); this.cMSLoadPresets.Name = "cMSLoadPresets"; this.cMSLoadPresets.ShowImageMargin = false; + resources.ApplyResources(this.cMSLoadPresets, "cMSLoadPresets"); // // altTabToolStripMenuItem // - resources.ApplyResources(this.altTabToolStripMenuItem, "altTabToolStripMenuItem"); this.altTabToolStripMenuItem.Name = "altTabToolStripMenuItem"; + resources.ApplyResources(this.altTabToolStripMenuItem, "altTabToolStripMenuItem"); this.altTabToolStripMenuItem.Click += new System.EventHandler(this.altTabToolStripMenuItem_Click); // // fromFileToolStripMenuItem // - resources.ApplyResources(this.fromFileToolStripMenuItem, "fromFileToolStripMenuItem"); this.fromFileToolStripMenuItem.Name = "fromFileToolStripMenuItem"; + resources.ApplyResources(this.fromFileToolStripMenuItem, "fromFileToolStripMenuItem"); this.fromFileToolStripMenuItem.Click += new System.EventHandler(this.fromFileToolStripMenuItem_Click); // + // pBLtouch + // + this.pBLtouch.Image = global::DS4Windows.Properties.Resources.left_touch; + resources.ApplyResources(this.pBLtouch, "pBLtouch"); + this.pBLtouch.Name = "pBLtouch"; + this.pBLtouch.TabStop = false; + // + // pBRtouch + // + this.pBRtouch.Image = global::DS4Windows.Properties.Resources.right_touch; + resources.ApplyResources(this.pBRtouch, "pBRtouch"); + this.pBRtouch.Name = "pBRtouch"; + this.pBRtouch.TabStop = false; + // // RecordBox // resources.ApplyResources(this, "$this"); @@ -249,6 +291,8 @@ this.Resize += new System.EventHandler(this.RecordBox_Resize); this.pnlMouseButtons.ResumeLayout(false); this.cMSLoadPresets.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pBLtouch)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBRtouch)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -277,5 +321,9 @@ private System.Windows.Forms.ContextMenuStrip cMSLoadPresets; private System.Windows.Forms.ToolStripMenuItem altTabToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fromFileToolStripMenuItem; + private System.Windows.Forms.Button btnLightbar; + private System.Windows.Forms.Button btnRumble; + private System.Windows.Forms.PictureBox pBRtouch; + private System.Windows.Forms.PictureBox pBLtouch; } } \ No newline at end of file diff --git a/DS4Windows/DS4Windows/RecordBox.cs b/DS4Windows/DS4Windows/RecordBox.cs index 30516d2..c634cc2 100644 --- a/DS4Windows/DS4Windows/RecordBox.cs +++ b/DS4Windows/DS4Windows/RecordBox.cs @@ -27,6 +27,7 @@ namespace DS4Windows DS4State cState; public bool saved = false; List dcs = new List(); + TextBox tb1, tb2; public RecordBox(KBM360 op) { kbm = op; @@ -106,12 +107,32 @@ namespace DS4Windows else macros.Add(value); } + bool[] pTP = new bool[4]; void ds4_Tick(object sender, EventArgs e) { if (Program.rootHub.DS4Controllers[0] != null) { cState = Program.rootHub.getDS4State(0); if (btnRecord.Text == Properties.Resources.StopText) + { + if (cBRecordDelays.Checked) + { + Mouse tP = Program.rootHub.touchPad[0]; + if (tP.leftDown && !pTP[0]) + if (!btnRumble.Text.Contains("Stop")) + btnRumble_Click(sender, e); + else if (!tP.leftDown && pTP[0]) + if (btnRumble.Text.Contains("Stop")) + btnRumble_Click(sender, e); + if (tP.rightDown && !pTP[1]) + if (!btnLightbar.Text.Contains("Reset")) + btnLightbar_Click(sender, e); + else if (!tP.rightDown && pTP[1]) + if (btnLightbar.Text.Contains("Reset")) + btnLightbar_Click(sender, e); + pTP[0] = tP.leftDown; + pTP[1] = tP.rightDown; + } foreach (DS4Controls dc in dcs) if (Mapping.getBoolMapping(dc, cState, null, null)) { @@ -175,6 +196,7 @@ namespace DS4Windows } } } + } } } @@ -251,6 +273,10 @@ namespace DS4Windows { if (cBRecordDelays.Checked) sw.Start(); + btnRumble.Visible = cBRecordDelays.Checked; + btnLightbar.Visible = cBRecordDelays.Checked; + pBLtouch.Visible = cBRecordDelays.Checked; + pBRtouch.Visible = cBRecordDelays.Checked; Program.rootHub.recordingMacro = true; saved = false; ds4.Start(); @@ -278,6 +304,13 @@ namespace DS4Windows btn4th_Click(sender, e); if (btn5th.Text.Contains(Properties.Resources.UpText)) btn5th_Click(sender, e); + if (cBRecordDelays.Checked) + { + if (btnRumble.Text.Contains("Stop")) + btnRumble_Click(sender, e); + if (btnLightbar.Text.Contains("Reset")) + btnLightbar_Click(sender, e); + } if (cBRecordDelays.Checked) sw.Reset(); if (cBRecordDelays.Checked) @@ -618,6 +651,98 @@ namespace DS4Windows } + private void btnRumble_Click(object sender, EventArgs e) + { + int value = 1255255; + if (btnRumble.Text.Contains("Add")) + { + if (macros.Count == 0 || (recordAfter && macrosAfter.Count == 0)) + { + AddMacroValue(value); + lVMacros.Items.Add("Rumble 255,255 (100%)", 0); + if (cBRecordDelays.Checked) + { + sw.Reset(); + sw.Start(); + } + } + else if (macros.Count > 0 || (recordAfter && macrosAfter.Count > 0)) + { + if (cBRecordDelays.Checked) + { + AddMacroValue((int)sw.ElapsedMilliseconds + 300); + lVMacros.Items.Add(Properties.Resources.WaitMS.Replace("*number*", sw.ElapsedMilliseconds.ToString()).Replace("*ms*", "ms"), 2); + sw.Reset(); + sw.Start(); + } + AddMacroValue(value); + lVMacros.Items.Add("Rumble 255,255 (100%)", 0); + } + btnRumble.Text = "Stop Rumble"; + } + else + { + value = 1000000; + if (cBRecordDelays.Checked) + { + AddMacroValue((int)sw.ElapsedMilliseconds + 300); + lVMacros.Items.Add(Properties.Resources.WaitMS.Replace("*number*", sw.ElapsedMilliseconds.ToString()).Replace("*ms*", "ms"), 2); + sw.Reset(); + sw.Start(); + } + AddMacroValue(value); + lVMacros.Items.Add("Stop Rumble", 1); + btnRumble.Text = "Add Rumble"; + } + lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible(); + } + + private void btnLightbar_Click(object sender, EventArgs e) + { + int value = 1255255255; + if (btnLightbar.Text.Contains("Change")) + { + if (macros.Count == 0 || (recordAfter && macrosAfter.Count == 0)) + { + AddMacroValue(value); + lVMacros.Items.Add("Lightbar Color: 255,255,255", 0); + if (cBRecordDelays.Checked) + { + sw.Reset(); + sw.Start(); + } + } + else if (macros.Count > 0 || (recordAfter && macrosAfter.Count > 0)) + { + if (cBRecordDelays.Checked) + { + AddMacroValue((int)sw.ElapsedMilliseconds + 300); + lVMacros.Items.Add(Properties.Resources.WaitMS.Replace("*number*", sw.ElapsedMilliseconds.ToString()).Replace("*ms*", "ms"), 2); + sw.Reset(); + sw.Start(); + } + AddMacroValue(value); + lVMacros.Items.Add("Lightbar Color: 255,255,255", 0); + } + btnLightbar.Text = "Reset Lightbar Color"; + } + else + { + value = 1000000000; + if (cBRecordDelays.Checked) + { + AddMacroValue((int)sw.ElapsedMilliseconds + 300); + lVMacros.Items.Add(Properties.Resources.WaitMS.Replace("*number*", sw.ElapsedMilliseconds.ToString()).Replace("*ms*", "ms"), 2); + sw.Reset(); + sw.Start(); + } + AddMacroValue(value); + lVMacros.Items.Add("Reset Lightbar", 1); + btnLightbar.Text = "Change Lightbar Color"; + } + lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible(); + } + public void btnSave_Click(object sender, EventArgs e) { if (macros.Count > 0) @@ -749,7 +874,34 @@ namespace DS4Windows bool[] keydown = new bool[286]; foreach (int i in macros) { - if (i >= 300) //ints over 300 used to delay + if (i >= 1000000000) + { + if (i > 1000000000) + { + string lb = i.ToString().Substring(1); + byte r = (byte)(int.Parse(lb[0].ToString()) * 100 + int.Parse(lb[1].ToString()) * 10 + int.Parse(lb[2].ToString())); + byte g = (byte)(int.Parse(lb[3].ToString()) * 100 + int.Parse(lb[4].ToString()) * 10 + int.Parse(lb[5].ToString())); + byte b = (byte)(int.Parse(lb[6].ToString()) * 100 + int.Parse(lb[7].ToString()) * 10 + int.Parse(lb[8].ToString())); + lVMacros.Items.Add($"Lightbar Color: {r},{g},{b}", 0); + } + else + { + lVMacros.Items.Add("Reset Lightbar", 1); + } + } + else if (i >= 1000000) + { + if (i > 1000000) + { + string r = i.ToString().Substring(1); + byte heavy = (byte)(int.Parse(r[0].ToString()) * 100 + int.Parse(r[1].ToString()) * 10 + int.Parse(r[2].ToString())); + byte light = (byte)(int.Parse(r[3].ToString()) * 100 + int.Parse(r[4].ToString()) * 10 + int.Parse(r[5].ToString())); + lVMacros.Items.Add($"Rumble {heavy}, {light} ({Math.Round((heavy * .75f + light * .25f) / 2.55f, 1)}%)", 0); + } + else + lVMacros.Items.Add("Stop Rumble", 1); + } + else if (i >= 300) //ints over 300 used to delay lVMacros.Items.Add(Properties.Resources.WaitMS.Replace("*number*", (i - 300).ToString()).Replace("*ms*", "ms"), 2); else if (!keydown[i]) { @@ -823,7 +975,7 @@ namespace DS4Windows keydown[i] = false; } } - for (ushort i = 0; i < keydown.Length; i++) + for (int i = 0; i < keydown.Length; i++) { if (keydown[i]) { @@ -922,61 +1074,127 @@ namespace DS4Windows } } private int selection; + private bool changingDelay = false; private void lVMacros_MouseDoubleClick(object sender, MouseEventArgs e) { - if (lVMacros.SelectedIndices[0] >= 0 && lVMacros.SelectedItems[0].ImageIndex == 2) - { - TextBox tb = new TextBox(); - tb.MaxLength = 5; - tb.KeyDown += nud_KeyDown; - tb.LostFocus += nud_LostFocus; - selection = lVMacros.SelectedIndices[0]; - Controls.Add(tb); - tb.Location = new Point(lVMacros.Location.X + lVMacros.SelectedItems[0].Position.X, lVMacros.Location.Y + lVMacros.SelectedItems[0].Position.Y); - tb.BringToFront(); - lVMacros.MouseHover -= lVMacros_MouseHover; - tb.TextChanged += tb_TextChanged; - tb.Focus(); - } + if (lVMacros.SelectedIndices[0] >= 0) + if (lVMacros.SelectedItems[0].ImageIndex == 2) + { + TextBox tb = new TextBox(); + tb.MaxLength = 5; + tb.KeyDown += nud_KeyDown; + tb.LostFocus += nud_LostFocus; + selection = lVMacros.SelectedIndices[0]; + Controls.Add(tb); + changingDelay = true; + tb.Location = new Point(lVMacros.Location.X + lVMacros.SelectedItems[0].Position.X, lVMacros.Location.Y + lVMacros.SelectedItems[0].Position.Y); + tb.BringToFront(); + lVMacros.MouseHover -= lVMacros_MouseHover; + tb.TextChanged += tb_TextChanged; + tb.Focus(); + } + else if (macros[lVMacros.SelectedIndices[0]] > 1000000000) + { + selection = lVMacros.SelectedIndices[0]; + string lb = macros[lVMacros.SelectedIndices[0]].ToString().Substring(1); + byte r = (byte)(int.Parse(lb[0].ToString()) * 100 + int.Parse(lb[1].ToString()) * 10 + int.Parse(lb[2].ToString())); + byte g = (byte)(int.Parse(lb[3].ToString()) * 100 + int.Parse(lb[4].ToString()) * 10 + int.Parse(lb[5].ToString())); + byte b = (byte)(int.Parse(lb[6].ToString()) * 100 + int.Parse(lb[7].ToString()) * 10 + int.Parse(lb[8].ToString())); + AdvancedColorDialog advColorDialog = new AdvancedColorDialog(); + advColorDialog.Color = Color.FromArgb(r, g, b); + advColorDialog.OnUpdateColor += advColorDialog_OnUpdateColor; + if (advColorDialog.ShowDialog() == DialogResult.OK) + { + macros[selection] = 1000000000 + advColorDialog.Color.R * 1000000 + advColorDialog.Color.G * 1000 + advColorDialog.Color.B; + } + lVMacros.Items[selection].Text = ($"Lightbar Color: {advColorDialog.Color.R},{advColorDialog.Color.G},{advColorDialog.Color.B}"); + } + else if (macros[lVMacros.SelectedIndices[0]] > 1000000 && macros[lVMacros.SelectedIndices[0]] != 1000000000) + { + + lVMacros.MouseHover -= lVMacros_MouseHover; + string r = macros[lVMacros.SelectedIndices[0]].ToString().Substring(1); + byte heavy = (byte)(int.Parse(r[0].ToString()) * 100 + int.Parse(r[1].ToString()) * 10 + int.Parse(r[2].ToString())); + byte light = (byte)(int.Parse(r[3].ToString()) * 100 + int.Parse(r[4].ToString()) * 10 + int.Parse(r[5].ToString())); + selection = lVMacros.SelectedIndices[0]; + tb1 = new TextBox(); + tb2 = new TextBox(); + tb1.Name = "tBHeavy"; + tb1.Name = "tBLight"; + tb1.MaxLength = 3; + tb2.MaxLength = 3; + tb1.KeyDown += nud_KeyDown; + tb2.KeyDown += nud_KeyDown; + Controls.Add(tb1); + Controls.Add(tb2); + changingDelay = false; + tb1.Location = new Point(lVMacros.Location.X + lVMacros.SelectedItems[0].Position.X, lVMacros.Location.Y + lVMacros.SelectedItems[0].Position.Y); + tb1.Size = new Size(tb1.Size.Width / 2, tb1.Size.Height); + tb2.Location = new Point(lVMacros.Location.X + lVMacros.SelectedItems[0].Position.X + tb1.Size.Width, lVMacros.Location.Y + lVMacros.SelectedItems[0].Position.Y); + tb2.Size = tb1.Size; + tb1.BringToFront(); + tb2.BringToFront(); + tb1.Text = heavy.ToString(); + tb2.Text = light.ToString(); + tb1.TextChanged += tb_TextChanged; + tb2.TextChanged += tb_TextChanged; + tb1.Focus(); + } } void tb_TextChanged(object sender, EventArgs e) { TextBox tb = (TextBox)sender; - for (int i = tb.Text.Length - 1; i >= 0; i--) - if (!Char.IsDigit(tb.Text[i])) - tb.Text = tb.Text.Remove(i, 1); + //if (changingDelay) + { + for (int i = tb.Text.Length - 1; i >= 0; i--) + if (!char.IsDigit(tb.Text[i])) + tb.Text = tb.Text.Remove(i, 1); + } } void nud_LostFocus(object sender, EventArgs e) { - TextBox tb = (TextBox)sender; - int i; - if (!string.IsNullOrEmpty(tb.Text) && int.TryParse(tb.Text, out i)) - { - lVMacros.Items[selection] = new ListViewItem(Properties.Resources.WaitMS.Replace("*number*", (tb.Text)).Replace("*ms*", "ms"), 2); - macros[selection] = i + 300; - saved = false; - } - Controls.Remove(tb); - lVMacros.MouseHover += lVMacros_MouseHover; + SaveMacroChange((TextBox)sender); } void nud_KeyDown(object sender, KeyEventArgs e) { - TextBox tb = (TextBox)sender; - if (e.KeyCode == Keys.Enter && !string.IsNullOrEmpty(tb.Text)) + if (e.KeyCode == Keys.Enter) + SaveMacroChange((TextBox)sender); + } + private void SaveMacroChange(TextBox tb) + { + int i, j; + if (!string.IsNullOrEmpty(tb.Text)) { - int i; - if (int.TryParse(tb.Text, out i)) + if (changingDelay && int.TryParse(tb.Text, out i)) { lVMacros.Items[selection] = new ListViewItem(Properties.Resources.WaitMS.Replace("*number*", (tb.Text)).Replace("*ms*", "ms"), 2); macros[selection] = i + 300; - saved = false; Controls.Remove(tb); - lVMacros.MouseHover += lVMacros_MouseHover; + saved = false; + } + else if (!changingDelay) + { + if (int.TryParse(tb1.Text, out i) && int.TryParse(tb2.Text, out j)) + { + if (i + j > 0) + { + byte heavy = (byte)i; + byte light = (byte)j; + lVMacros.Items[selection].Text = ($"Rumble {heavy}, {light} ({Math.Round((heavy * .75f + light * .25f) / 2.55f, 1)}%)"); + macros[selection] = 1000000 + heavy * 1000 + light; + saved = false; + Controls.Remove(tb1); + Controls.Remove(tb2); + tb1 = null; + tb2 = null; + } + } } } + lVMacros.MouseHover += lVMacros_MouseHover; } private void RecordBox_Resize(object sender, EventArgs e) @@ -984,6 +1202,18 @@ namespace DS4Windows cHMacro.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); } + private void advColorDialog_OnUpdateColor(object sender, EventArgs e) + { + if (sender is Color && Program.rootHub.DS4Controllers[0] != null) + { + Color color = (Color)sender; + DS4Color dcolor = new DS4Color { red = color.R, green = color.G, blue = color.B }; + DS4LightBar.forcedColor[0] = dcolor; + DS4LightBar.forcedFlash[0] = 0; + DS4LightBar.forcelight[0] = true; + } + } + private void lVMacros_SelectedIndexChanged(object sender, EventArgs e) { if (btnRecord.Text != Properties.Resources.StopText) diff --git a/DS4Windows/DS4Windows/RecordBox.resx b/DS4Windows/DS4Windows/RecordBox.resx index 9502a2f..46962e3 100644 --- a/DS4Windows/DS4Windows/RecordBox.resx +++ b/DS4Windows/DS4Windows/RecordBox.resx @@ -117,471 +117,90 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 1 - - + Top, Right - - lVMacros - - - Top, Right - - - lbMacroOrder - - - Macro Order - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - btn4th - - - $this - - - 3, 8 - - - 548, 142 - - - - False - - - btnSave - - - 133, 48 - - - Save Preset - - - 132, 22 - - - Text Document (*.txt)|*.txt - - - 2 - - - Edit the Wait to change the cycle rate - - - btnCancel - - - 8 - - - 646, 81 - - - Record a Macro - - - Top - - - Top, Right - - - 66, 13 - - - $this - - - 103, 23 - - - 131, 23 - - - btn5th - - - 536, 81 - - - fromFileToolStripMenuItem - - - 6, 13 - - - Play once - - - Top, Right - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MiddleCenter - - - 104, 23 - - - 5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 332 - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Top, Right - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 536, 29 - - - 539, 225 - - - 3 - - - True - - - Repeat while held - - - savePresets - - - RecordBox - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 326 - - - 121, 21 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 213, 46 - - - 6 - - - lbDelayTip - - - True - - - 0 - - - 260, 205 - - - 578, 171 - - - Macro Order - - - 527, 342 - - - 39, 10 - - - 5th Mouse Button Down - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 10 - - - Load Preset - - - Top, Right - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 200 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 536, 2 - - - Text Document (*.txt)|*.txt - - - pnlMouseButtons - - - 322 - - - cHMacro - - - 329 - - - 329 - - - cMSLoadPresets - - - 328 - - - Cycle Programs - - - NoControl - - - $this - - - $this - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - openPresets - - - 4th Mouse Button Down - - - 332 - - - Top, Bottom, Left, Right - - - 4 - - - 333 - MiddleLeft - - System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 1 - - - 328 - - - Save - - - Top - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - 96, 17 - - - False - - - 104, 23 - - - 3, 29 - - - From File... - - - btnRecord - - - Cancel - - - 131, 23 - - - Top, Right - - - 132, 22 - - - 591, 121 - - - lbRecordTip - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 103, 23 - - - 309, 7 - - - Top, Right - - - 7 - - - cBStyle - - - pnlMouseButtons - - - $this - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 536, 29 - - 0 + + 213, 46 - - iLKeys - - - 39, 39 - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 322 Record + + btnRecord + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + $this - - MiddleCenter + + 8 - - cBRecordDelays + + Top, Right - - $this + + True + + + 591, 121 + + + 96, 17 324 - - $this - - - $this - - - Double click on a wait to edit the time - - - btnLoadP - - - altTabToolStripMenuItem - - - 750, 375 - - - pnlMouseButtons - - - $this - - - 327 - Record Delays - - 0 + + cBRecordDelays - - 646, 2 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - btnSaveP + + $this - - 9 + + 4 - - Use Keyboard/Mouse + Controller 1 to record + + Top, Bottom, Left, Right + + Macro Order + + + 200 + + + 17, 17 + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ - CgAAAk1TRnQBSQFMAgEBAwEAATwBAQFgAQEBEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAwEAAXwBAQF8AQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -623,68 +242,557 @@ AUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAT/AYcB4QIAAf4BfwH+AT8BgAEB AgAB/AE/Af4BPwHAAQMCAAH4AR8B/gE/AcABAwIAAfABDwH+AT8BgAEBAgAB8AEHAf4BPwGAAQECAAHy AQcB/gE/AYABAQIAAfYBJwH2ATcBgAEBAgAB/gE/AfIBJwGAAQECAAH+AT8B8AEHAYABAQIAAf4BPwHw - AQcBgAEBAgAB/gE/AfgBDwQAAf4BPwH8AR8EAAH+AT8B/gE/BAAB/gE/Af8BfwEAAQECAAT/AYMBwxgA + AQcBgAEBAgAB/gE/AfgBDwQAAf4BPwH8AR8EAAH+AT8B/gE/BAAB/gE/Af8BfwEAAQECAAT/AYMBwwIA Cw== - + + 3, 29 + + + 527, 342 + + + 326 + + + lVMacros + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + + 9 + + + Top, Right + + + Play once + + + Repeat while held + + + 578, 171 + + + 121, 21 + + + 327 + + + cBStyle + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Top, Right + + + 536, 2 + + + 104, 23 + + + 328 + + + Save + + + btnSave + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.SaveFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 331 - - - NoControl - - - 184, 13 - - - 210, 74 - - - Top, Right - - - 12 - - - Top, Right - - + $this - - True - 11 + + Top, Right + + + 646, 2 + + + 103, 23 + + + 328 + + + Cancel + + + btnCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + Top, Right + + + NoControl + + + 646, 81 + + + 103, 23 + + + 332 + + + Save Preset + + + btnSaveP + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + Top, Right + + + True + + + 309, 7 + 221, 13 + + 329 + + + Use Keyboard/Mouse + Controller 1 to record + + + MiddleCenter + + + lbRecordTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + Top, Right + + + NoControl + + + 152, 106 + + + 43, 23 + + + Zoom + + + 4 + + + pBRtouch + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 0 + + + 152, 77 + + + 43, 23 + + + Zoom + + + 3 + + + pBLtouch + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 1 + + + Top + + + NoControl + + + 17, 106 + + + 131, 23 + + + 1 + + + Change Lightbar Color + + + btnLightbar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 2 + + + Top + + + NoControl + + + 17, 77 + + + 131, 23 + + + 2 + + + Add Rumble + + + btnRumble + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 3 + + + Top + + + 39, 39 + + + 131, 23 + + + 0 + + + 5th Mouse Button Down + + + btn5th + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 4 + + + Top + + + 39, 10 + + + 131, 23 + + + 0 + + + 4th Mouse Button Down + + + btn4th + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlMouseButtons + + + 5 + + + 539, 225 + + + 210, 138 + + + 331 + + + False + + + pnlMouseButtons + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + + + Top, Right + + + 536, 81 + + + 104, 23 + + + 332 + + + Load Preset + + + btnLoadP + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + 102, 17 + + + Text Document (*.txt)|*.txt + 238, 17 - - 102, 17 - + + Text Document (*.txt)|*.txt + + + True + + + 3, 8 + + + 66, 13 + + + 333 + + + Macro Order + + + lbMacroOrder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top, Right + + + True + + + NoControl + + + 548, 142 + + + 184, 13 + + + 329 + + + Double click on a wait to edit the time + + + MiddleCenter + + + False + + + lbDelayTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + 356, 17 - - 17, 17 - + + 133, 48 + + + cMSLoadPresets + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 132, 22 + + + Cycle Programs + + + Edit the Wait to change the cycle rate + + + 132, 22 + + + From File... + True - - tr - + + 6, 13 + + + 750, 375 + + + 260, 205 + + + Record a Macro + + + cHMacro + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + iLKeys + + + System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + savePresets + + + System.Windows.Forms.SaveFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + openPresets + + + System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + altTabToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fromFileToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + RecordBox + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/DS4Windows/DS4Windows/RecordBox.tr.resx b/DS4Windows/DS4Windows/RecordBox.tr.resx index 6d4fb64..b6c426c 100644 --- a/DS4Windows/DS4Windows/RecordBox.tr.resx +++ b/DS4Windows/DS4Windows/RecordBox.tr.resx @@ -135,7 +135,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ - CgAAAk1TRnQBSQFMAgEBAwEAAWABAQFgAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAwEAAWgBAQFoAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -229,9 +229,6 @@ Süreyi ayarlamak için çift tıklayın - - 151, 48 - 150, 22 @@ -247,4 +244,7 @@ Dosyadan... + + 151, 48 + \ No newline at end of file diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index acf6277..088a6e5 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.269")] -[assembly: AssemblyFileVersion("1.4.269")] +[assembly: AssemblyVersion("1.4.27")] +[assembly: AssemblyFileVersion("1.4.27")] diff --git a/DS4Windows/Properties/Resources1.Designer.cs b/DS4Windows/Properties/Resources.Designer.cs similarity index 98% rename from DS4Windows/Properties/Resources1.Designer.cs rename to DS4Windows/Properties/Resources.Designer.cs index e477ea4..160a7f7 100644 --- a/DS4Windows/Properties/Resources1.Designer.cs +++ b/DS4Windows/Properties/Resources.Designer.cs @@ -851,6 +851,16 @@ namespace DS4Windows.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap left_touch { + get { + object obj = ResourceManager.GetObject("left_touch", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -1236,6 +1246,16 @@ namespace DS4Windows.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap right_touch { + get { + object obj = ResourceManager.GetObject("right_touch", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized string similar to Right Click to set presets for a set of controls. /// diff --git a/DS4Windows/Properties/Resources.resx b/DS4Windows/Properties/Resources.resx index d33c4c0..96398eb 100644 --- a/DS4Windows/Properties/Resources.resx +++ b/DS4Windows/Properties/Resources.resx @@ -694,4 +694,10 @@ Charge the battery + + ..\Resources\left touch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\right touch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/DS4Windows/Resources/left touch.png b/DS4Windows/Resources/left touch.png new file mode 100644 index 0000000..4c94c36 Binary files /dev/null and b/DS4Windows/Resources/left touch.png differ diff --git a/DS4Windows/Resources/right touch.png b/DS4Windows/Resources/right touch.png new file mode 100644 index 0000000..4e2ac3d Binary files /dev/null and b/DS4Windows/Resources/right touch.png differ