/// <summary> /// 设置光标; /// </summary> /// <exception cref="KeyNotFoundException"></exception> public static IDisposable SetCursor(string name) { name = name.ToLower(); ICustomCursor cursor = cursors[name]; return(WindowCursor.SetCursor(cursor)); }
/// <summary> /// 设置光标; /// </summary> public static IDisposable SetCursor(ICustomCursor cursor) { if (cursor == null) { throw new ArgumentNullException(nameof(cursor)); } return(WindowCursor.SetCursor(cursor)); }
private void Test0() { var animatedCursorFactroy = new AnimatedCursorFactroy(); using (var content = new SharpZipLibContent(Path.Combine(GameCursor.CursorsDirectory, "Wait.zip"))) { animatedCursor = animatedCursorFactroy.Read(content); } WindowCursor.SetCursor(animatedCursor); }