move code

This commit is contained in:
Perfare 2020-08-06 13:11:41 +08:00
parent 217a7993e9
commit ef38471ff1
3 changed files with 11 additions and 9 deletions

View File

@ -958,6 +958,7 @@
// //
// AssetStudioGUIForm // AssetStudioGUIForm
// //
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1264, 681); this.ClientSize = new System.Drawing.Size(1264, 681);
@ -970,6 +971,8 @@
this.Name = "AssetStudioGUIForm"; this.Name = "AssetStudioGUIForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "AssetStudioGUI"; this.Text = "AssetStudioGUI";
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.AssetStudioGUIForm_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.AssetStudioGUIForm_DragEnter);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.AssetStudioForm_KeyDown); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.AssetStudioForm_KeyDown);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();

View File

@ -99,20 +99,19 @@ namespace AssetStudioGUI
Logger.Default = new GUILogger(StatusStripUpdate); Logger.Default = new GUILogger(StatusStripUpdate);
Progress.Default = new GUIProgress(SetProgressBarValue); Progress.Default = new GUIProgress(SetProgressBarValue);
Studio.StatusStripUpdate = StatusStripUpdate; Studio.StatusStripUpdate = StatusStripUpdate;
this.AllowDrop = true;
this.DragEnter += AssetStudioGUIForm_DragEnter;
this.DragDrop += AssetStudioGUIForm_DragDrop;
} }
private void AssetStudioGUIForm_DragEnter(object sender, DragEventArgs e) private void AssetStudioGUIForm_DragEnter(object sender, DragEventArgs e)
{ {
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Move; if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Move;
}
} }
private async void AssetStudioGUIForm_DragDrop(object sender, DragEventArgs e) private async void AssetStudioGUIForm_DragDrop(object sender, DragEventArgs e)
{ {
string[] paths = (string[])e.Data.GetData(DataFormats.FileDrop); var paths = (string[])e.Data.GetData(DataFormats.FileDrop);
if (paths.Length > 0) if (paths.Length > 0)
{ {
ResetForm(); ResetForm();

View File

@ -120,6 +120,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>312, 17</value> <value>312, 17</value>
</metadata> </metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>432, 17</value>
</metadata>
<data name="fontPreviewBox.Text" xml:space="preserve"> <data name="fontPreviewBox.Text" xml:space="preserve">
<value>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWYZ <value>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWYZ
1234567890.:,;'\"(!?)+-*/= 1234567890.:,;'\"(!?)+-*/=
@ -138,9 +141,6 @@ The quick brown fox jumps over the lazy dog. 1234567890
The quick brown fox jumps over the lazy dog. 1234567890</value> The quick brown fox jumps over the lazy dog. 1234567890</value>
</data> </data>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>432, 17</value>
</metadata>
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>553, 17</value> <value>553, 17</value>
</metadata> </metadata>