public static string ToSuffixString(this StencilType _this) { if (_this == StencilType.Base) { return(string.Empty); } return(_this.ToString()); }
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); }
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); }
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); } }