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