mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-26 04:40:20 -05:00
Add injection hotkeys to main window
no save file required
This commit is contained in:
2
NHSE.WinForms/Main.Designer.cs
generated
2
NHSE.WinForms/Main.Designer.cs
generated
@@ -49,6 +49,7 @@ private void InitializeComponent()
|
||||
this.Controls.Add(this.B_Open);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = global::NHSE.WinForms.Properties.Resources.icon;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Main";
|
||||
@@ -56,6 +57,7 @@ private void InitializeComponent()
|
||||
this.Text = "NHSE";
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Main_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Main_DragEnter);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Main_KeyDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using NHSE.Core;
|
||||
using NHSE.Injection;
|
||||
using NHSE.WinForms.Properties;
|
||||
|
||||
namespace NHSE.WinForms
|
||||
@@ -117,5 +118,35 @@ private static void OpenSaveFile(string path)
|
||||
settings.LastFilePath = path;
|
||||
settings.Save();
|
||||
}
|
||||
|
||||
private void Main_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (ModifierKeys != Keys.Control)
|
||||
return;
|
||||
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.O:
|
||||
{
|
||||
Menu_Open(sender, e);
|
||||
break;
|
||||
}
|
||||
case Keys.I:
|
||||
{
|
||||
var items = new Item[40];
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
items[i] = new Item(Item.NONE);
|
||||
using var editor = new PlayerItemEditor<Item>(items, 10, 4, true);
|
||||
editor.ShowDialog();
|
||||
break;
|
||||
}
|
||||
case Keys.H:
|
||||
{
|
||||
using var editor = new SysBotRAMEdit(InjectionType.Generic);
|
||||
editor.ShowDialog();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user