mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-20 08:29:50 +08:00
21 lines
545 B
C#
21 lines
545 B
C#
namespace Vision.WindowCapture;
|
|
|
|
public class WindowCaptureFactory
|
|
{
|
|
public static string[] ModeNames()
|
|
{
|
|
return Enum.GetNames(typeof(CaptureModeEnum));
|
|
}
|
|
|
|
|
|
public static IWindowCapture Create(CaptureModeEnum mode)
|
|
{
|
|
return mode switch
|
|
{
|
|
CaptureModeEnum.BitBlt => new BitBlt.BitBltCapture(),
|
|
CaptureModeEnum.WindowsGraphicsCapture => new GraphicsCapture.GraphicsCapture(),
|
|
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
|
|
};
|
|
}
|
|
}
|