diff --git a/DS4Windows/DS4Forms/DS4Form.Designer.cs b/DS4Windows/DS4Forms/DS4Form.Designer.cs index ced6f1f..f8a2fdb 100644 --- a/DS4Windows/DS4Forms/DS4Form.Designer.cs +++ b/DS4Windows/DS4Forms/DS4Form.Designer.cs @@ -38,7 +38,6 @@ this.lbTest = new System.Windows.Forms.Label(); this.btnStartStop = new System.Windows.Forms.Button(); this.lbLastMessage = new System.Windows.Forms.Label(); - this.btnClear = new System.Windows.Forms.Button(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.cMTaskbar = new System.Windows.Forms.ContextMenuStrip(this.components); this.editProfileForController1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -156,6 +155,9 @@ this.linkSetup = new System.Windows.Forms.LinkLabel(); this.lLBUpdate = new System.Windows.Forms.LinkLabel(); this.tabLog = new System.Windows.Forms.TabPage(); + this.panel3 = new System.Windows.Forms.Panel(); + this.exportLogTxtBtn = new System.Windows.Forms.Button(); + this.btnClear = new System.Windows.Forms.Button(); this.saveProfiles = new System.Windows.Forms.SaveFileDialog(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.cMCustomLed = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -188,6 +190,7 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDXIPorts)).BeginInit(); this.flowLayoutPanel1.SuspendLayout(); this.tabLog.SuspendLayout(); + this.panel3.SuspendLayout(); this.cMCustomLed.SuspendLayout(); this.SuspendLayout(); // @@ -248,13 +251,6 @@ this.lbLastMessage.Name = "lbLastMessage"; this.lbLastMessage.MouseHover += new System.EventHandler(this.lbLastMessage_MouseHover); // - // btnClear - // - resources.ApplyResources(this.btnClear, "btnClear"); - this.btnClear.Name = "btnClear"; - this.btnClear.UseVisualStyleBackColor = true; - this.btnClear.Click += new System.EventHandler(this.btnClear_Click); - // // notifyIcon1 // this.notifyIcon1.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info; @@ -1210,11 +1206,31 @@ // tabLog // this.tabLog.Controls.Add(this.lvDebug); - this.tabLog.Controls.Add(this.btnClear); + this.tabLog.Controls.Add(this.panel3); resources.ApplyResources(this.tabLog, "tabLog"); this.tabLog.Name = "tabLog"; this.tabLog.UseVisualStyleBackColor = true; // + // panel3 + // + this.panel3.Controls.Add(this.exportLogTxtBtn); + this.panel3.Controls.Add(this.btnClear); + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Name = "panel3"; + // + // exportLogTxtBtn + // + resources.ApplyResources(this.exportLogTxtBtn, "exportLogTxtBtn"); + this.exportLogTxtBtn.Name = "exportLogTxtBtn"; + this.exportLogTxtBtn.UseVisualStyleBackColor = true; + this.exportLogTxtBtn.Click += new System.EventHandler(this.exportLogTxtBtn_Click); + // + // btnClear + // + resources.ApplyResources(this.btnClear, "btnClear"); + this.btnClear.Name = "btnClear"; + this.btnClear.UseVisualStyleBackColor = true; + // // saveProfiles // resources.ApplyResources(this.saveProfiles, "saveProfiles"); @@ -1296,6 +1312,7 @@ this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); this.tabLog.ResumeLayout(false); + this.panel3.ResumeLayout(false); this.cMCustomLed.ResumeLayout(false); this.ResumeLayout(false); @@ -1308,7 +1325,6 @@ private System.Windows.Forms.ColumnHeader chData; private System.Windows.Forms.Panel pnlButton; private System.Windows.Forms.Button btnStartStop; - private System.Windows.Forms.Button btnClear; private System.Windows.Forms.NotifyIcon notifyIcon1; private System.Windows.Forms.ContextMenuStrip cMTaskbar; private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; @@ -1435,6 +1451,9 @@ private System.Windows.Forms.CheckBox linkCB2; private System.Windows.Forms.CheckBox linkCB3; private System.Windows.Forms.CheckBox linkCB4; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Button exportLogTxtBtn; + private System.Windows.Forms.Button btnClear; //private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; } } diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 0e14dd1..d07c63c 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -2461,6 +2461,40 @@ namespace DS4Windows } } + private void exportLogTxtBtn_Click(object sender, EventArgs e) + { + SaveFileDialog dialog = new SaveFileDialog(); + dialog.AddExtension = true; + dialog.DefaultExt = ".txt"; + dialog.Filter = "Text Documents (*.txt)|*.txt"; + dialog.Title = "Select Export File"; + dialog.InitialDirectory = Global.appdatapath; + if (dialog.ShowDialog() == DialogResult.OK) + { + string outputFile = dialog.FileName; + List < string > outputLines = new List(); + ListViewItem item = null; + for (int i = 0, len = lvDebug.Items.Count; i < len; i++) + { + item = lvDebug.Items[i]; + outputLines.Add(item.SubItems[0].Text + ": " + item.SubItems[1].Text); + } + + try + { + StreamWriter stream = new StreamWriter(outputFile); + string line = string.Empty; + for (int i = 0, len = outputLines.Count; i < len; i++) + { + line = outputLines[i]; + stream.WriteLine(line); + } + stream.Close(); + } + catch { } + } + } + private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e) { FlashWhenLate = cBFlashWhenLate.Checked; diff --git a/DS4Windows/DS4Forms/DS4Form.resx b/DS4Windows/DS4Forms/DS4Form.resx index 0af87aa..856691e 100644 --- a/DS4Windows/DS4Forms/DS4Form.resx +++ b/DS4Windows/DS4Forms/DS4Form.resx @@ -142,7 +142,7 @@ 3, 3 - 890, 330 + 890, 323 0 @@ -312,36 +312,6 @@ 4 - - Bottom - - - NoControl - - - 3, 333 - - - 890, 23 - - - 9 - - - Clear - - - btnClear - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabLog - - - 1 - 264, 17 @@ -469,10 +439,10 @@ NoControl - 793, 89 + 789, 89 - 100, 22 + 104, 22 50 @@ -496,7 +466,7 @@ NoControl - 362, 34 + 359, 34 39, 20 @@ -598,7 +568,7 @@ NoControl - 753, 89 + 749, 89 34, 22 @@ -628,7 +598,7 @@ NoControl - 753, 117 + 749, 117 34, 22 @@ -727,7 +697,7 @@ None - 636, 33 + 632, 33 111, 21 @@ -754,7 +724,7 @@ NoControl - 753, 61 + 749, 61 34, 22 @@ -781,7 +751,7 @@ None - 636, 61 + 632, 61 111, 21 @@ -805,7 +775,7 @@ None - 636, 89 + 632, 89 111, 21 @@ -832,7 +802,7 @@ NoControl - 753, 33 + 749, 33 34, 22 @@ -859,7 +829,7 @@ None - 636, 117 + 632, 117 111, 21 @@ -892,7 +862,7 @@ NoControl - 637, 7 + 633, 7 109, 15 @@ -964,7 +934,7 @@ NoControl - 358, 7 + 355, 7 47, 15 @@ -1000,7 +970,7 @@ NoControl - 471, 7 + 467, 7 51, 15 @@ -1036,7 +1006,7 @@ NoControl - 477, 36 + 473, 36 39, 15 @@ -1072,7 +1042,7 @@ NoControl - 477, 64 + 473, 64 39, 15 @@ -1108,7 +1078,7 @@ NoControl - 477, 92 + 473, 92 39, 15 @@ -1144,7 +1114,7 @@ NoControl - 477, 120 + 473, 120 39, 15 @@ -1174,7 +1144,7 @@ NoControl - 362, 62 + 359, 62 39, 20 @@ -1204,7 +1174,7 @@ NoControl - 362, 90 + 359, 90 39, 20 @@ -1234,7 +1204,7 @@ NoControl - 362, 118 + 359, 118 39, 20 @@ -1267,10 +1237,10 @@ NoControl - 793, 33 + 789, 33 - 100, 22 + 104, 22 50 @@ -1297,10 +1267,10 @@ NoControl - 793, 61 + 789, 61 - 100, 22 + 104, 22 51 @@ -1327,10 +1297,10 @@ NoControl - 793, 117 + 789, 117 - 100, 22 + 104, 22 52 @@ -1360,7 +1330,7 @@ NoControl - 559, 0 + 555, 0 67, 30 @@ -1399,7 +1369,7 @@ NoControl - 585, 37 + 581, 37 15, 14 @@ -1432,7 +1402,7 @@ NoControl - 585, 65 + 581, 65 15, 14 @@ -1465,7 +1435,7 @@ NoControl - 585, 93 + 581, 93 15, 14 @@ -1498,7 +1468,7 @@ NoControl - 585, 121 + 581, 121 15, 14 @@ -1546,7 +1516,7 @@ 1 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /><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="5" ColumnSpan="1" /><Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" 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="4" ColumnSpan="1" /><Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" 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" /><Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="Percent,58.35329,Percent,21.22288,Percent,20.42383,Absolute,80,AutoSize,0,Absolute,40,Absolute,105" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /><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="5" ColumnSpan="1" /><Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" 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="4" ColumnSpan="1" /><Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" 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" /><Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="Percent,58.35329,Percent,21.22288,Percent,20.42383,Absolute,80,AutoSize,0,Absolute,40,Absolute,108" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /></TableLayoutSettings> Fill @@ -3042,6 +3012,87 @@ 3 + + NoControl + + + 5, 4 + + + 75, 23 + + + 11 + + + Export + + + exportLogTxtBtn + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 0 + + + Bottom, Left, Right + + + NoControl + + + 120, 4 + + + 767, 23 + + + 10 + + + Clear + + + btnClear + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 1 + + + Bottom + + + 3, 326 + + + 890, 30 + + + 1 + + + panel3 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabLog + + + 1 + 4, 22