Ejemplo n.º 1
0
 public static string ToSuffixString(this StencilType _this)
 {
     if (_this == StencilType.Base)
     {
         return(string.Empty);
     }
     return(_this.ToString());
 }
Ejemplo n.º 2
0
 public StringBuilder ToString(StringBuilder sb, StencilType type)
 {
     sb.AppendIntent(4).Append("Comp").Append(type.ToSuffixString()).Append(' ').Append(CompValue).Append('\n');
     sb.AppendIntent(4).Append("Pass").Append(type.ToSuffixString()).Append(' ').Append(PassValue).Append('\n');
     sb.AppendIntent(4).Append("Fail").Append(type.ToSuffixString()).Append(' ').Append(FailValue).Append('\n');
     sb.AppendIntent(4).Append("ZFail").Append(type.ToSuffixString()).Append(' ').Append(ZFailValue).Append('\n');
     return(sb);
 }
Ejemplo n.º 3
0
 public void Export(TextWriter writer, StencilType type)
 {
     writer.WriteIntent(4);
     writer.Write("Comp{0} {1}\n", type.ToSuffixString(), CompValue);
     writer.WriteIntent(4);
     writer.Write("Pass{0} {1}\n", type.ToSuffixString(), PassValue);
     writer.WriteIntent(4);
     writer.Write("Fail{0} {1}\n", type.ToSuffixString(), FailValue);
     writer.WriteIntent(4);
     writer.Write("ZFail{0} {1}\n", type.ToSuffixString(), ZFailValue);
 }
Ejemplo n.º 4
0
        public static void FromGuideIndex(Guides guide)
        {
            StencilType stencilType = guide.Type;

            foreach (var state in guide.States)
            {
                StencilWidget stencil = Instantiate(
                    WidgetManager.m_Instance.GetStencilPrefab(stencilType));

                stencil.m_SkipIntroAnim  = true;
                stencil.transform.parent = App.Instance.m_CanvasTransform;
                try {
                    stencil.SaveState = state;
                } catch (ArgumentException e) {
                    Debug.LogException(e, stencil);
                }
                stencil.Show(true, false);
            }
        }