Exemplo n.º 1
0
 public ScenarioInfo ReadZipInfo(string file)
 {
     using (var content = new SharpZipLibContent(file))
     {
         var description = ReadDescription(content);
         var contentInfo = new ZipContentInfo(file);
         return(new ScenarioInfo(contentInfo, description));
     }
 }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 尝试读取到光标文件;
 /// </summary>
 private static bool TryReadFromZip(string zipFilePath, out ICustomCursor cursor)
 {
     try
     {
         using (var content = new SharpZipLibContent(zipFilePath))
         {
             return(TryRead(content, out cursor));
         }
     }
     catch (Exception ex)
     {
         UnityEngine.Debug.Log(ex);
         cursor = null;
         return(false);
     }
 }
Exemplo n.º 4
0
        private void Test1()
        {
            var animatedCursorFactroy = new AnimatedCursorFactroy();
            var staticCursorFactroy   = new StaticCursorFactroy();

            using (var content = SharpZipLibContent.CreateNew(Path.Combine(GameCursor.CursorsDirectory, "AnimatedCursor.zip")))
            {
                using (content.BeginUpdateAuto())
                {
                    animatedCursorFactroy.Write(content, animatedCursor);
                }
            }

            using (var content = SharpZipLibContent.CreateNew(Path.Combine(GameCursor.CursorsDirectory, "StaticCursor.zip")))
            {
                using (content.BeginUpdateAuto())
                {
                    staticCursorFactroy.Write(content, staticCursor);
                }
            }
        }