Пример #1
0
 public void Store(TextWriter writer)
 {
     writer.WriteLine(" " + (string.IsNullOrEmpty(Root) ? Filter : (Root + "\\" + Filter)) + " { ");
     writer.WriteLine("   " + RotateType.ToString().ToLower() + " " + RotateArguments);
     writer.WriteLine("   rotate " + Rotate);
     writer.WriteLine("   compress " + (Compress ? "on" : "off"));
     writer.WriteLine("   delaycompress " + DelayCompress);
     writer.WriteLine("   scripttimeout {0:c}", ScriptTimeout);
     if (PreScripts.Length > 0)
     {
         writer.WriteLine();
         writer.WriteLine("   prerotate");
         foreach (var script in PreScripts)
         {
             writer.WriteLine("      " + script);
         }
         writer.WriteLine("   endscript");
     }
     if (PostScripts.Length > 0)
     {
         writer.WriteLine();
         writer.WriteLine("   postrotate");
         foreach (var script in PostScripts)
         {
             writer.WriteLine("      " + script);
         }
         writer.WriteLine("   endscript");
     }
     if (IncludeSubDirs)
     {
         writer.WriteLine("   includesubdirs");
     }
     writer.WriteLine(" }");
 }
Пример #2
0
        /// <summary>
        /// 旋转
        /// </summary>
        /// <typeparam name="TComponent">组件类型</typeparam>
        /// <param name="component">组件实例</param>
        /// <param name="type">旋转类型</param>
        public static TComponent Rotate <TComponent>(this TComponent component, RotateType type) where TComponent : IIcon
        {
            var option = component as IOptionConfig;

            option?.Config <Config>(config => {
                config.SetAttribute(UiConst.Rotate, type.ToString());
            });
            return(component);
        }
Пример #3
0
 public void OnControlType(MoveType move, RotateType rotate)
 {
     Debug.Log(move.ToString() + ", " + rotate.ToString());
 }