Skip to content

Commit

Permalink
abc
Browse files Browse the repository at this point in the history
  • Loading branch information
cornradio committed Aug 2, 2024
1 parent 76cf29a commit b899940
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
13 changes: 7 additions & 6 deletions apex runner/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion apex runner/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ private void textBox2_TextChanged(object sender, EventArgs e)
//右下关于按钮
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
MessageBox.Show($"这个程序是免费的\n如果你感觉这个程序有帮助的话\n" +
MessageBox.Show($"版本号: v1.4" +
$"这个程序是免费的\n如果你感觉这个程序有帮助的话\n" +
$"我希望你们可以去 github 帮我点星星\n---\n" +
$"这个程序其实主要都是Chat-GPT 写的\n" +
$"有时候我得承认\n" +
Expand Down Expand Up @@ -225,5 +226,9 @@ private void pictureBox4_Click(object sender, EventArgs e)
}
}

private void label2_Click(object sender, EventArgs e)
{

}
}
}
2 changes: 1 addition & 1 deletion apex runner/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
<data name="pictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAjkAAAI5CAYAAABD6yttAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wgAADsIBFShKgAAAxEdJREFUeF7t3Qe4NVV59/9XjQVjAzugIlZURFGIYgXsigUQSxQLxYJiAxUr2HsD
wQAADsEBuJFr7QAAxEdJREFUeF7t3Qe4NVV59/9XjQVjAzugIlZURFGIYgXsigUQSxQLxYJiAxUr2HsD
KQn2rmiMgt0YNVEjGnvX9JhiTIxGY14T53991vu/n4wze5/n7H32Kc85v31d3wuedfaeWbPWPbN+c697
3ev//J//83+6EEIIIYRNyKgghBBCCGEzMCoIIYQQQtgMjApCCCGEEDYDo4IQQgghhM3AqCCEEEIIYTMw
KgghhBBC2AyMCkIIIYQQNgOjghBCCCGEzcCoIIQQQghhMzAqCCGEEELYDIwKQgghhBA2A6OCEEIIIYTN
Expand Down
16 changes: 16 additions & 0 deletions apex runner/WindowsKey.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

public static class WindowsKey
{
// Windows API函数和常量
private const int WH_KEYBOARD_LL = 13;
private const int WM_KEYDOWN = 0x0100;
private const int WM_KEYUP = 0x0101;
private const int VK_LWIN = 0x5B;
private const int VK_RWIN = 0x5C;
private const int VK_ESC = 0x1B;
private const int VK_CTRL = 0x11;

private static LowLevelKeyboardProc _proc = HookCallback;
private static IntPtr _hookID = IntPtr.Zero;
Expand Down Expand Up @@ -46,11 +50,23 @@ private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN)
{
int vkCode = Marshal.ReadInt32(lParam);

if (vkCode == VK_LWIN || vkCode == VK_RWIN)
{
return (IntPtr)1; // 拦截Windows键
}

if (vkCode == VK_ESC && Control.ModifierKeys.HasFlag(Keys.Control))
{
return (IntPtr)1; // 拦截Ctrl+Esc组合键
}

if (vkCode == VK_CTRL && Control.ModifierKeys.HasFlag(Keys.Escape))
{
return (IntPtr)1; // 拦截Ctrl+Esc组合键
}
}

return CallNextHookEx(_hookID, nCode, wParam, lParam);
}

Expand Down

0 comments on commit b899940

Please sign in to comment.