Пример #1
0
        public bool Generate(CustomWriter writer)
        {
            bool result = false;

            fFormat = fOptions.PedigreeOptions.Format;

            try
            {
                fWriter = writer;
                fWriter.SetAlbumPage(false);
                fTitle = LangMan.LS(LSID.LSID_ExpPedigree) + ": " + GKUtils.GetNameString(fRoot, true, false);
                fWriter.SetDocumentTitle(fTitle);
                fWriter.SetFileName(fPath);

                IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);
                IColor clrBlue  = AppHost.GfxProvider.CreateColor(0x0000FF);

                fWriter.beginWrite();
                try
                {
                    fTitleFont  = fWriter.CreateFont("", 16f /*20f*/, true, false, clrBlack);
                    fChapFont   = fWriter.CreateFont("", 14f /*16f*/, true, false, clrBlack);
                    fPersonFont = fWriter.CreateFont("", 12f /*10f*/, true, false, clrBlack);
                    fLinkFont   = fWriter.CreateFont("", 10f /*8f*/, false, true, clrBlue);
                    fTextFont   = fWriter.CreateFont("", 10f /*8f*/, false, false, clrBlack);
                    fSupText    = fWriter.CreateFont("", ((fWriter is RTFWriter) ? 12f : 5f) /*5f*/, false, false, clrBlue);

                    InternalGenerate();
                    result = true;
                }
                finally
                {
                    fWriter.endWrite();
                }
            }
            catch (Exception ex)
            {
                Logger.LogWrite("PedigreeExporter.Generate(): " + ex.Message);
                Logger.LogWrite("PedigreeExporter.Generate(): " + ex.StackTrace);
            }

            return(result);
        }
Пример #2
0
        public bool Generate(CustomWriter writer)
        {
            bool result = false;

            try {
                fWriter = writer;
                fWriter.SetAlbumPage(fAlbumPage);
                fWriter.SetDocumentTitle(fTitle);
                fWriter.SetFileName(fPath);

                fWriter.BeginWrite();
                try {
                    InternalGenerate();
                    result = true;
                } finally {
                    fWriter.EndWrite();
                }
            } catch (Exception ex) {
                Logger.WriteError("ReportExporter.Generate()", ex);
            }

            return(result);
        }