From a74f58f7be7e4c827164034b3542eff60e53f693 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 23 Jun 2018 16:08:57 -0500 Subject: [PATCH] Remove drag drop importing of profiles. Good app speed boost. If drag drop import gets added again, put that functionality on the profile listview instead of the main app window --- DS4Windows/DS4Forms/DS4Form.Designer.cs | 2 - DS4Windows/DS4Forms/DS4Form.cs | 25 ---------- DS4Windows/DS4Forms/DS4Form.resx | 66 ++++++++++++------------- 3 files changed, 33 insertions(+), 60 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.Designer.cs b/DS4Windows/DS4Forms/DS4Form.Designer.cs index 7696707..7ca6929 100644 --- a/DS4Windows/DS4Forms/DS4Form.Designer.cs +++ b/DS4Windows/DS4Forms/DS4Form.Designer.cs @@ -1363,8 +1363,6 @@ this.Controls.Add(this.pnlButton); this.Name = "DS4Form"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragEnter); this.Resize += new System.EventHandler(this.Form_Resize); this.pnlButton.ResumeLayout(false); this.pnlButton.PerformLayout(); diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 3d5d824..25359e5 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -1858,31 +1858,6 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question } } - private void ScpForm_DragDrop(object sender, DragEventArgs e) - { - bool therewasanxml = false; - string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); - for (int i = 0; i < files.Length; i++) - { - if (files[i].EndsWith(".xml")) - { - File.Copy(files[i], appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true); - therewasanxml = true; - } - } - - if (therewasanxml) - RefreshProfiles(); - } - - private void ScpForm_DragEnter(object sender, DragEventArgs e) - { - if (e.Data.GetDataPresent(DataFormats.FileDrop)) - e.Effect = DragDropEffects.Copy; // Okay - else - e.Effect = DragDropEffects.None; // Unknown data, ignore it - } - private void tBProfile_TextChanged(object sender, EventArgs e) { if (tSTBProfile.Text != null && tSTBProfile.Text != "" && diff --git a/DS4Windows/DS4Forms/DS4Form.resx b/DS4Windows/DS4Forms/DS4Form.resx index a428568..6576b6f 100644 --- a/DS4Windows/DS4Forms/DS4Form.resx +++ b/DS4Windows/DS4Forms/DS4Form.resx @@ -445,10 +445,10 @@ NoControl - 775, 89 + 774, 89 - 118, 22 + 119, 22 50 @@ -472,7 +472,7 @@ NoControl - 368, 34 + 367, 34 39, 20 @@ -574,7 +574,7 @@ NoControl - 735, 89 + 734, 89 34, 22 @@ -604,7 +604,7 @@ NoControl - 735, 117 + 734, 117 34, 22 @@ -703,7 +703,7 @@ None - 618, 33 + 617, 33 111, 21 @@ -730,7 +730,7 @@ NoControl - 735, 61 + 734, 61 34, 22 @@ -757,7 +757,7 @@ None - 618, 61 + 617, 61 111, 21 @@ -781,7 +781,7 @@ None - 618, 89 + 617, 89 111, 21 @@ -808,7 +808,7 @@ NoControl - 735, 33 + 734, 33 34, 22 @@ -835,7 +835,7 @@ None - 618, 117 + 617, 117 111, 21 @@ -868,7 +868,7 @@ NoControl - 619, 7 + 618, 7 109, 15 @@ -940,7 +940,7 @@ NoControl - 364, 7 + 363, 7 47, 15 @@ -976,7 +976,7 @@ NoControl - 462, 7 + 461, 7 51, 15 @@ -1012,7 +1012,7 @@ NoControl - 468, 36 + 467, 36 39, 15 @@ -1048,7 +1048,7 @@ NoControl - 468, 64 + 467, 64 39, 15 @@ -1084,7 +1084,7 @@ NoControl - 468, 92 + 467, 92 39, 15 @@ -1120,7 +1120,7 @@ NoControl - 468, 120 + 467, 120 39, 15 @@ -1150,7 +1150,7 @@ NoControl - 368, 62 + 367, 62 39, 20 @@ -1180,7 +1180,7 @@ NoControl - 368, 90 + 367, 90 39, 20 @@ -1210,7 +1210,7 @@ NoControl - 368, 118 + 367, 118 39, 20 @@ -1243,10 +1243,10 @@ NoControl - 775, 33 + 774, 33 - 118, 22 + 119, 22 50 @@ -1273,10 +1273,10 @@ NoControl - 775, 61 + 774, 61 - 118, 22 + 119, 22 51 @@ -1303,10 +1303,10 @@ NoControl - 775, 117 + 774, 117 - 118, 22 + 119, 22 52 @@ -1336,7 +1336,7 @@ NoControl - 541, 0 + 540, 0 67, 30 @@ -1375,7 +1375,7 @@ NoControl - 567, 37 + 566, 37 15, 14 @@ -1408,7 +1408,7 @@ NoControl - 567, 65 + 566, 65 15, 14 @@ -1441,7 +1441,7 @@ NoControl - 567, 93 + 566, 93 15, 14 @@ -1474,7 +1474,7 @@ NoControl - 567, 121 + 566, 121 15, 14 @@ -1522,7 +1522,7 @@ 0 - <?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,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,122" /><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,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,124" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /></TableLayoutSettings> Fill