예제 #1
0
 public void WriteToFile(IProcessInstance proc, FinalFile file)
 {
     if (proc.CurrentScope.Exists(proc.DefaultWriter))
     {
         string             writer = proc.CurrentScope.GetVariable(proc.DefaultWriter).ValueString;
         o2Mate.LocaleGroup lg     = new LocaleGroup();
         string             groupName;
         string             title;
         if (lg.ExtractGroupAndName(this.localeName, out groupName, out title))
         {
             ILocaleSet set      = lg.Get(groupName) as ILocaleSet;
             string     language = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
             try
             {
                 // lève une exception si l'élement n'existe pas
                 FinalFile.WriteToFile(ref writer, set.Get(title, language), this.enc);
             }
             catch
             {
                 FinalFile.WriteToFile(ref writer, this.localeName, this.enc);
             }
         }
         proc.CurrentScope.GetVariable(proc.DefaultWriter).Value = writer;
     }
 }
예제 #2
0
 public void WriteToFile(IProcessInstance proc, FinalFile file)
 {
     if (proc.CurrentScope.Exists(this.varName))
     {
         if (proc.CurrentScope.Exists(proc.DefaultWriter))
         {
             string writer = proc.CurrentScope.GetVariable(proc.DefaultWriter).ValueString;
             FinalFile.WriteToFile(ref writer, proc.CurrentScope.GetVariable(this.varName).ValueString, this.enc);
             proc.CurrentScope.GetVariable(proc.DefaultWriter).Value = writer;
             proc.CurrentProject.Add(new ProjectItem(proc.Name, proc.CurrentPositionExecution, "print variable", this.varName));
         }
     }
     else if (proc.CurrentDictionnaire.Exists(this.varName))
     {
         if (proc.CurrentDictionnaire.IsString(this.varName))
         {
             if (proc.CurrentScope.Exists(proc.DefaultWriter))
             {
                 string writer = proc.CurrentScope.GetVariable(proc.DefaultWriter).ValueString;
                 FinalFile.WriteToFile(ref writer, proc.CurrentDictionnaire.GetString(this.varName), this.enc);
                 proc.CurrentScope.GetVariable(proc.DefaultWriter).Value = writer;
                 proc.CurrentProject.Add(new ProjectItem(proc.Name, proc.CurrentPositionExecution, "print string", this.varName));
             }
         }
     }
 }
예제 #3
0
 public void WriteToFile(IProcessInstance proc, FinalFile file)
 {
     if (proc.CurrentDictionnaire.IsArray(this.tabName))
     {
         Array             arr    = proc.CurrentDictionnaire.GetArray(this.tabName) as Array;
         Fields            f      = null;
         o2Mate.Expression expr   = new o2Mate.Expression();
         IData             result = expr.Evaluate(this.expression, proc.CurrentScope);
         if (result != null)
         {
             if (result.ValueInt <= arr.Count)
             {
                 f = arr.Item(result.ValueInt) as Fields;
             }
         }
         else
         {
             if (arr.Count > 0)
             {
                 f = arr.Item(1) as Fields;
             }
         }
         if (f != null && f.Exists(this.fieldName))
         {
             if (proc.CurrentScope.Exists(proc.DefaultWriter))
             {
                 string writer = proc.CurrentScope.GetVariable(proc.DefaultWriter).ValueString;
                 FinalFile.WriteToFile(ref writer, f.GetString(this.fieldName), this.enc);
                 proc.CurrentScope.GetVariable(proc.DefaultWriter).Value = writer;
                 proc.CurrentProject.Add(new ProjectItem(proc.Name, proc.CurrentPositionExecution, "print field", this.tabName, this.fieldName));
             }
         }
     }
 }
예제 #4
0
 public void WriteToFile(IProcessInstance proc, FinalFile file)
 {
     if (proc.CurrentScope.Exists(proc.DefaultWriter))
     {
         string writer = proc.CurrentScope.GetVariable(proc.DefaultWriter).ValueString;
         FinalFile.WriteToFile(ref writer, this.text.Replace(Environment.NewLine, "").Replace("\\", "\\\\").Replace(" ", "").Replace("\t", "").Replace('·', ' ').Replace('¬', '\t').Replace("¶", Environment.NewLine), this.enc);
         proc.CurrentScope.GetVariable(proc.DefaultWriter).Value = writer;
         proc.CurrentProject.Add(new ProjectItem(proc.Name, proc.CurrentPositionExecution, "print"));
     }
 }
예제 #5
0
 public void WriteToFile(IProcessInstance proc, FinalFile file)
 {
     file.WriteToFile(Environment.NewLine, this.enc);
 }