private int _exportHQTFFDs(StreamWriter w, bool isFirst, string standard, int id)
        {
            IHQTFFDExport hqTFFDEx = new LegacyHQTFFDExport(_helper, standard);

            if (isFirst)
            {
                string headers = hqTFFDEx.Headers;
                headers = "id," + headers;

                w.WriteLine(headers);
                w.Flush();
            }

            foreach (LibraryHQTFDummy hqtffd in _lib.Library.HQTFDummies)
            {
                if (hqtffd.Graphics != null)
                {
                    foreach (LibraryHQTFDummyGraphic graphic in hqtffd.Graphics)
                    {
                        string line = id.ToString() + "," + hqTFFDEx.Line(hqtffd, graphic);
                        id++;

                        w.WriteLine(line);
                        w.Flush();
                    }
                }
            }

            return(id);
        }
Beispiel #2
0
        private int _exportHQTFFDs(StreamWriter w, bool isFirst, string standard, int id)
        {
            LegacyHQTFFDExport legacyHQTFFD = new LegacyHQTFFDExport(_helper, standard);
            IHQTFFDExport      hqTFFDEx     = (IHQTFFDExport)legacyHQTFFD;

            if (isFirst)
            {
                string headers = hqTFFDEx.Headers;
                headers = "id," + headers;

                w.WriteLine(headers);
                w.Flush();
            }

            foreach (LibraryHQTFDummy hqtffd in _lib.Library.HQTFDummies)
            {
                logger.Info("Exporting HQTFFD graphics for: " + hqtffd.Name);

                try
                {
                    if (hqtffd.Graphics != null)
                    {
                        foreach (LegacyLetterCodeType legacyCode in hqtffd.LegacyHQTFDummyCode)
                        {
                            foreach (LibraryHQTFDummyGraphic graphic in hqtffd.Graphics)
                            {
                                string line = id.ToString() + "," + legacyHQTFFD.Line(legacyCode.CodingSchemeLetter, hqtffd, graphic);
                                id++;

                                w.WriteLine(line);
                                w.Flush();
                            }
                        }
                    }
                }

                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                }
            }

            return(id);
        }
        private int _exportHQTFFDs(StreamWriter w, bool isFirst, string standard, int id)
        {
            LegacyHQTFFDExport legacyHQTFFD = new LegacyHQTFFDExport(_helper, standard);
            IHQTFFDExport hqTFFDEx = (IHQTFFDExport)legacyHQTFFD;

            if (isFirst)
            {
                string headers = hqTFFDEx.Headers;
                headers = "id," + headers;

                w.WriteLine(headers);
                w.Flush();
            }

            foreach (LibraryHQTFDummy hqtffd in _lib.Library.HQTFDummies)
            {
                logger.Info("Exporting HQTFFD graphics for: " + hqtffd.Name);

                try
                {
                    if (hqtffd.Graphics != null)
                    {
                        foreach (LegacyLetterCodeType legacyCode in hqtffd.LegacyHQTFDummyCode)
                        {
                            foreach (LibraryHQTFDummyGraphic graphic in hqtffd.Graphics)
                            {
                                string line = id.ToString() + "," + legacyHQTFFD.Line(legacyCode.CodingSchemeLetter, hqtffd, graphic);
                                id++;

                                w.WriteLine(line);
                                w.Flush();
                            }
                        }
                    }
                }

                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                }
            }

            return id;
        }