예제 #1
0
        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);
        }
예제 #2
0
 private static bool TryRead(IReadOnlyContent content, out ICustomCursor cursor)
 {
     try
     {
         cursor = staticCursorFactroy.Read(content);
         return(true);
     }
     catch
     {
         try
         {
             cursor = animatedCursorFactroy.Read(content);
             return(true);
         }
         catch
         {
             cursor = null;
             return(false);
         }
     }
 }