예제 #1
0
파일: Script.cs 프로젝트: stuart2w/SAW
 /// <summary>Does the output for the "output as text" command.  This should be given the description which is prefixed on the beginning.  This allows an optional call to this which will be ignored if it is null </summary>
 public void WriteExportText(IndentStringBuilder output, string description)
 {
     if (Visit.VisitType == VisitTarget.VisitTypes.None && !CommandList.Any())
     {
         return;
     }
     output.Append(description).Append(" = ");
     if (RunDefault)
     {
         output.Append("Run default script + ");
     }
     output.AppendEncoded(GenerateScript());
     if (Visit.VisitType != VisitTarget.VisitTypes.None)
     {
         output.Append(", Visit=").Append(Visit.GetDescription());
     }
     output.AppendLine();
 }
예제 #2
0
파일: Scriptable.cs 프로젝트: stuart2w/SAW
 public override void WriteExportText(IndentStringBuilder output)
 {
     output.Append("Item ").AppendLine(SAWID);
     output.Indent += 2;
     output.Append("Bounds = ").AppendLine(Bounds.ToString());
     if (Popup)
     {
         output.AppendLine("Popup");
     }
     if (!Shown)
     {
         output.AppendLine("Not shown");
     }
     if (AutoRepeat)
     {
         output.AppendLine("Auto repeat");
     }
     if (RepeatTimeout >= 0)
     {
         output.Append("Has custom repeating scripts with timeout = ").AppendLine(RepeatTimeout);
     }
     if (ResetSwap)
     {
         output.AppendLine("Reset swap");
     }
     if (NotVisited)
     {
         output.AppendLine("Not visited");
     }
     for (int script = 0; script < 6; script++)
     {
         if (!(Scripts[script]?.IsEmpty ?? true))
         {
             Scripts[script].WriteExportText(output, ((ScriptTypes)script) + " script");
         }
     }
     Element?.WriteExportText(output);
     output.Indent -= 2;
     output.Append("End of Item ").AppendLine(SAWID);
 }