示例#1
0
        private void DebugFillFiles(DragEventArgs e)
        {
            string[] s = (string[])e.Data.GetData(DataFormats.FileDrop, false);
            int      i;
            var      fields = GetReportItems();

            for (i = 0; i < s.Length; i++)
            {
                Console.WriteLine();

                using (StreamReader file = File.OpenText(s[i]))
                    using (JsonTextReader reader = new JsonTextReader(file))
                    {
                        TT_Fill fill = new TT_Fill(JToken.ReadFrom(reader));
                        FDLog.LogMessage(String.Format("Parsing fill from file {0}", s[i]));
                        string row = "";
                        foreach (var field in fields)
                        {
                            try
                            {
                                row += field.DisplayField(fill) + ",";
                            }
                            catch (Exception ex)
                            {
                                row += ",";
                                FDLog.LogError("Error parsing fill column " + field.ColumnName + " for fill " + fill.RecordID + Environment.NewLine + ex.Message);
                            }
                        }
                        FDLog.LogMessage(row);
                    }
            }
        }
示例#2
0
        public static List <FillReport> GetReports(TT_Fill fill, bool individual_fills)
        {
            List <FillReport> reports = new List <FillReport>();

            if (individual_fills && fill.HasFillsGroup)
            {
                int count = fill.FillsGroupCount;
                for (int i = 0; i < count; ++i)
                {
                    reports.Add(new IndividualFillReport(fill, i));
                }
            }
            else
            {
                reports.Add(new FillReport(fill));
            }

            return(reports);
        }
示例#3
0
 public IndividualFillReport(TT_Fill fill_, int index_)
     : base(fill_)
 {
     index = index_;
 }
示例#4
0
 public FillReport(TT_Fill fill_)
 {
     fill = fill_;
 }
示例#5
0
 public String DisplayField(TT_Fill fill)
 {
     return(fieldDisplay(fill));
 }