mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
chore: 调整PC端输入选项及描述
This commit is contained in:
@@ -2531,12 +2531,12 @@ public class AsstProxy
|
||||
|
||||
if (!ulong.TryParse(SettingsViewModel.ConnectSettings.AttachWindowMouseMethod, out var mouseMethod))
|
||||
{
|
||||
mouseMethod = 64; // 默认 PostMessageWithCursorPos
|
||||
mouseMethod = 32; // 默认 SendMessageWithCursorPos
|
||||
}
|
||||
|
||||
if (!ulong.TryParse(SettingsViewModel.ConnectSettings.AttachWindowKeyboardMethod, out var keyboardMethod))
|
||||
{
|
||||
keyboardMethod = 64; // 默认 PostMessageWithCursorPos
|
||||
keyboardMethod = 2; // 默认 SendMessage
|
||||
}
|
||||
|
||||
bool ret = AsstAttachWindow(_handle, hwnd, screencapMethod, mouseMethod, keyboardMethod);
|
||||
|
||||
@@ -1264,15 +1264,15 @@ Before use, please ensure:
|
||||
<system:String x:Key="AttachWindowScreencapMethod">Screencap Method</system:String>
|
||||
<system:String x:Key="AttachWindowMouseMethod">Mouse Input Method</system:String>
|
||||
<system:String x:Key="AttachWindowKeyboardMethod">Keyboard Input Method</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool (Default, Background)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow (Background, Backup 1)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC (Background, Backup 2)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow (Foreground, More Stable)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize (Foreground, More Stable)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithCursor">PostMessageWithCursor (Semi-background)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMessageWithCursor (Semi-background, Backup)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithWindowPos">PostMessageWithWindowPos (Background Window)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMessageWithWindowPos (Background Window, Backup)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool (Background, Efficient, Can Minimize)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow (Background, Stable, Can Minimize)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC (Background, Backup, Cannot Minimize)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow (Foreground, No Occlusion)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize (Foreground, Fully Captures Mouse)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMsg-CursorPos (Semi-background, Briefly Captures Mouse)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMsg-WindowPos (Full Background, No Mouse Capture, Window May Move, Recommend Minimizing)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendMsg">SendMsg (Stable)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostMsg">PostMsg (Efficient)</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">Force display of MAA</system:String>
|
||||
|
||||
@@ -1265,15 +1265,15 @@ MAA Team の開発リソースが限られているため、PC 対応は専任
|
||||
<system:String x:Key="AttachWindowScreencapMethod">スクリーンキャプチャ方式</system:String>
|
||||
<system:String x:Key="AttachWindowMouseMethod">マウス入力方式</system:String>
|
||||
<system:String x:Key="AttachWindowKeyboardMethod">キーボード入力方式</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool(デフォルト、バックグラウンド)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(バックグラウンド、予備1)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(バックグラウンド、予備2)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(フォアグラウンド、より安定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(フォアグラウンド、より安定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithCursor">PostMessageWithCursor(半バックグラウンド)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMessageWithCursor(半バックグラウンド、予備)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithWindowPos">PostMessageWithWindowPos(バックグラウンドウィンドウ)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMessageWithWindowPos(バックグラウンドウィンドウ、予備)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool(バックグラウンド、高効率、最小化可)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(バックグラウンド、安定、最小化可)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(バックグラウンド、予備、最小化不可)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(フォアグラウンド、遮蔽不可)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(フォアグラウンド、マウスを完全に取得)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMsg-CursorPos(半バックグラウンド、一時的にマウスを取得)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMsg-WindowPos(フルバックグラウンド、マウス不要、ウィンドウが動く可能性あり、最小化推奨)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendMsg">SendMsg(安定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostMsg">PostMsg(高効率)</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">MAAの強制表示</system:String>
|
||||
|
||||
@@ -1266,15 +1266,15 @@ MAA Team의 개발 인력이 제한되어 있어 PC 지원은 전담 관리가
|
||||
<system:String x:Key="AttachWindowScreencapMethod">스크린샷 방식</system:String>
|
||||
<system:String x:Key="AttachWindowMouseMethod">마우스 입력 방식</system:String>
|
||||
<system:String x:Key="AttachWindowKeyboardMethod">키보드 입력 방식</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool (기본값, 백그라운드)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow (백그라운드, 백업 1)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC (백그라운드, 백업 2)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow (포그라운드, 더 안정적)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize (포그라운드, 더 안정적)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithCursor">PostMessageWithCursor (반 백그라운드)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMessageWithCursor (반 백그라운드, 백업)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithWindowPos">PostMessageWithWindowPos (백그라운드 윈도우)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMessageWithWindowPos (백그라운드 윈도우, 백업)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool (백그라운드, 효율적, 최소화 가능)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow (백그라운드, 안정적, 최소화 가능)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC (백그라운드, 백업, 최소화 불가)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow (포그라운드, 가림 불가)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize (포그라운드, 마우스 완전 점유)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMsg-CursorPos (반 백그라운드, 마우스 일시 점유)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMsg-WindowPos (완전 백그라운드, 마우스 비점유, 창 이동 가능하나 사용 무관, 최소화 권장)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendMsg">SendMsg (안정적)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostMsg">PostMsg (효율적)</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">MAA 강제 표시</system:String>
|
||||
|
||||
@@ -1265,15 +1265,15 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="AttachWindowScreencapMethod">截图方式</system:String>
|
||||
<system:String x:Key="AttachWindowMouseMethod">鼠标输入</system:String>
|
||||
<system:String x:Key="AttachWindowKeyboardMethod">键盘输入</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool(默认,后台)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(后台,备用1)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(后台,备用2)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(前台,更稳定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(前台,更稳定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithCursor">PostMessageWithCursor(半后台)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMessageWithCursor(半后台,备用)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithWindowPos">PostMessageWithWindowPos(后台窗口)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMessageWithWindowPos(后台窗口,备用)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">WGC(后台,高效,可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(后台,稳定,可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(后台,备用,不可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(前台,不可遮挡)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(前台,完全抢鼠标)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMsg-CursorPos(半后台,短暂抢鼠标)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMsg-WindowPos(全后台,不抢鼠标,窗口会乱飞但不影响使用,建议最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendMsg">SendMsg(稳定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostMsg">PostMsg(高效)</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">强制显示MAA</system:String>
|
||||
|
||||
@@ -1265,15 +1265,15 @@ C:\\leidian\\LDPlayer9\n
|
||||
<system:String x:Key="AttachWindowScreencapMethod">截圖方式</system:String>
|
||||
<system:String x:Key="AttachWindowMouseMethod">滑鼠輸入</system:String>
|
||||
<system:String x:Key="AttachWindowKeyboardMethod">鍵盤輸入</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool(預設,背景)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(背景,備用1)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(背景,備用2)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(前台,更穩定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(前台,更穩定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithCursor">PostMessageWithCursor(半背景)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMessageWithCursor(半背景,備用)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostWithWindowPos">PostMessageWithWindowPos(後台視窗)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMessageWithWindowPos(後台視窗,備用)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapFramePool">FramePool(背景,高效,可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapPrintWindow">PrintWindow(背景,穩定,可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapScreenDC">ScreenDC(背景,備用,不可最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowScreencapDesktopDupWindow">DesktopWindow(前台,不可遮擋)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSeize">Seize(前台,完全搶滑鼠)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithCursor">SendMsg-CursorPos(半背景,短暫搶滑鼠)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendWithWindowPos">SendMsg-WindowPos(全背景,不搶滑鼠,視窗可能亂飛但不影響使用,建議最小化)</system:String>
|
||||
<system:String x:Key="AttachWindowInputSendMsg">SendMsg(穩定)</system:String>
|
||||
<system:String x:Key="AttachWindowInputPostMsg">PostMsg(高效)</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">強制顯示 MAA</system:String>
|
||||
|
||||
@@ -1236,18 +1236,45 @@ public class ConnectSettingsUserControlModel : PropertyChangedBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Win32 输入方式枚举(与 AsstCaller.h 中 AsstWin32InputMethodEnum 对应)
|
||||
/// Win32 鼠标输入方式枚举(与 AsstCaller.h 中 AsstWin32InputMethodEnum 对应)
|
||||
/// </summary>
|
||||
public List<CombinedData> AttachWindowInputMethodList { get; } =
|
||||
private static readonly List<CombinedData> _attachWindowMouseMethodList =
|
||||
[
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputSeize"), Value = "1" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputPostWithCursor"), Value = "64" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputSendWithCursor"), Value = "32" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputPostWithWindowPos"), Value = "256" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputSendWithWindowPos"), Value = "128" },
|
||||
];
|
||||
|
||||
private string _attachWindowMouseMethod = ConfigurationHelper.GetValue(ConfigurationKeys.AttachWindowMouseMethod, "64"); // 默认 PostMessageWithCursorPos
|
||||
public List<CombinedData> AttachWindowMouseMethodList => _attachWindowMouseMethodList;
|
||||
|
||||
/// <summary>
|
||||
/// Win32 键盘输入方式枚举(与 AsstCaller.h 中 AsstWin32InputMethodEnum 对应)
|
||||
/// </summary>
|
||||
private static readonly List<CombinedData> _attachWindowKeyboardMethodList =
|
||||
[
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputSeize"), Value = "1" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputSendMsg"), Value = "2" },
|
||||
new() { Display = LocalizationHelper.GetString("AttachWindowInputPostMsg"), Value = "4" },
|
||||
];
|
||||
|
||||
public List<CombinedData> AttachWindowKeyboardMethodList => _attachWindowKeyboardMethodList;
|
||||
|
||||
private static string ValidateAttachWindowMethod(string key, string defaultValue, List<CombinedData> list)
|
||||
{
|
||||
var stored = ConfigurationHelper.GetValue(key, defaultValue);
|
||||
if (list.Any(item => item.Value == stored))
|
||||
{
|
||||
return stored;
|
||||
}
|
||||
|
||||
ConfigurationHelper.SetValue(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
private string _attachWindowMouseMethod = ValidateAttachWindowMethod(
|
||||
ConfigurationKeys.AttachWindowMouseMethod,
|
||||
"32",
|
||||
_attachWindowMouseMethodList); // 默认 SendMessageWithCursorPos
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mouse input method for AttachWindow mode.
|
||||
@@ -1262,7 +1289,10 @@ public class ConnectSettingsUserControlModel : PropertyChangedBase
|
||||
}
|
||||
}
|
||||
|
||||
private string _attachWindowKeyboardMethod = ConfigurationHelper.GetValue(ConfigurationKeys.AttachWindowKeyboardMethod, "64"); // 默认 PostMessageWithCursorPos
|
||||
private string _attachWindowKeyboardMethod = ValidateAttachWindowMethod(
|
||||
ConfigurationKeys.AttachWindowKeyboardMethod,
|
||||
"2",
|
||||
_attachWindowKeyboardMethodList); // 默认 SendMessage
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the keyboard input method for AttachWindow mode.
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
hc:InfoElement.Title="{DynamicResource AttachWindowMouseMethod}"
|
||||
hc:TitleElement.HorizontalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowMouseMethodList}"
|
||||
SelectedValue="{Binding AttachWindowMouseMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
hc:InfoElement.Title="{DynamicResource AttachWindowKeyboardMethod}"
|
||||
hc:TitleElement.HorizontalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowKeyboardMethodList}"
|
||||
SelectedValue="{Binding AttachWindowKeyboardMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
hc:TitleElement.Title="{DynamicResource AttachWindowMouseMethod}"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowMouseMethodList}"
|
||||
SelectedValue="{Binding AttachWindowMouseMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
</StackPanel>
|
||||
@@ -192,7 +192,7 @@
|
||||
hc:TitleElement.Title="{DynamicResource AttachWindowKeyboardMethod}"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowKeyboardMethodList}"
|
||||
SelectedValue="{Binding AttachWindowKeyboardMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
Margin="0,5"
|
||||
hc:InfoElement.Title="{DynamicResource AttachWindowMouseMethod}"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowMouseMethodList}"
|
||||
SelectedValue="{Binding AttachWindowMouseMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
Margin="0,5"
|
||||
hc:InfoElement.Title="{DynamicResource AttachWindowKeyboardMethod}"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding AttachWindowInputMethodList}"
|
||||
ItemsSource="{Binding AttachWindowKeyboardMethodList}"
|
||||
SelectedValue="{Binding AttachWindowKeyboardMethod}"
|
||||
SelectedValuePath="Value" />
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user