Beispiel #1
0
        protected override void InternalGenerate()
        {
            IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);

            fTitleFont  = fWriter.CreateFont("", 22f, true, false, clrBlack);
            fTextFont   = fWriter.CreateFont("", 10f, false, false, clrBlack);
            fHeaderFont = fWriter.CreateFont("", 12f, true, false, clrBlack);

            fWriter.AddParagraph(fTitle, fTitleFont, TextAlignment.taLeft);
            fWriter.NewLine();

            var places = new StringList();

            TreeTools.SearchPlaces(fBase.Context.Tree, places, AppHost.Progress, false);
            places.Sort();

            fWriter.BeginTable(1, places.Count + 1);

            fWriter.BeginTableRow(true);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Name), fHeaderFont, TextAlignment.taLeft);
            fWriter.EndTableRow();

            for (int i = 0; i < places.Count; i++)
            {
                PlaceObj placeObj = (PlaceObj)places.GetObject(i);

                fWriter.BeginTableRow(false);
                fWriter.AddTableCell(placeObj.Name, fTextFont, TextAlignment.taLeft);
                fWriter.EndTableRow();
            }
            fWriter.EndTable();
        }
Beispiel #2
0
        protected override void InternalGenerate()
        {
            IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);
            IColor clrBlue  = AppHost.GfxProvider.CreateColor(0x0000FF);

            fTitleFont  = fWriter.CreateFont("", 22f, true, false, clrBlack);
            fTextFont   = fWriter.CreateFont("", 10f, false, false, clrBlack);
            fHeaderFont = fWriter.CreateFont("", 12f, true, false, clrBlack);

            fWriter.AddParagraph(fTitle, fTitleFont, TextAlignment.taLeft);
            fWriter.NewLine();

            var sources = new List <GDMSourceRecord>();

            GDMTree         tree   = fBase.Context.Tree;
            var             enumer = tree.GetEnumerator <GDMSourceRecord>();
            GDMSourceRecord sourceRec;

            while (enumer.MoveNext(out sourceRec))
            {
                sources.Add(sourceRec);
            }

            SortHelper.QuickSort(sources, ItemsCompare);

            fWriter.BeginTable(3, sources.Count + 1);

            fWriter.BeginTableRow(true);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Name), fHeaderFont, TextAlignment.taLeft);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Title), fHeaderFont, TextAlignment.taLeft);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Repository), fHeaderFont, TextAlignment.taLeft);
            fWriter.EndTableRow();

            for (int i = 0; i < sources.Count; i++)
            {
                sourceRec = sources[i];
                var repoCit  = (sourceRec.RepositoryCitations.Count > 0) ? sourceRec.RepositoryCitations[0] : null;
                var repoRec  = tree.GetPtrValue <GDMRepositoryRecord>(repoCit);
                var repoName = (repoRec != null) ? repoRec.RepositoryName : string.Empty;

                fWriter.BeginTableRow(false);
                fWriter.AddTableCell(sourceRec.ShortTitle, fTextFont, TextAlignment.taLeft);
                fWriter.AddTableCell(sourceRec.Title.Lines.Text, fTextFont, TextAlignment.taLeft);
                fWriter.AddTableCell(repoName, fTextFont, TextAlignment.taLeft);
                fWriter.EndTableRow();
            }
            fWriter.EndTable();
        }
Beispiel #3
0
        protected override void InternalGenerate()
        {
            IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);
            IColor clrBlue  = AppHost.GfxProvider.CreateColor(0x0000FF);

            fTitleFont  = fWriter.CreateFont("", 22f, true, false, clrBlack);
            fTextFont   = fWriter.CreateFont("", 10f, false, false, clrBlack);
            fHeaderFont = fWriter.CreateFont("", 12f, true, false, clrBlack);

            fWriter.AddParagraph(fTitle, fTitleFont, TextAlignment.taLeft);
            fWriter.NewLine();

            var repositories = new List <GDMRepositoryRecord>();

            GDMTree             tree   = fBase.Context.Tree;
            var                 enumer = tree.GetEnumerator <GDMRepositoryRecord>();
            GDMRepositoryRecord repoRec;

            while (enumer.MoveNext(out repoRec))
            {
                repositories.Add(repoRec);
            }

            SortHelper.QuickSort(repositories, ItemsCompare);

            fWriter.BeginTable(2, repositories.Count + 1);

            fWriter.BeginTableRow(true);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Name), fHeaderFont, TextAlignment.taLeft);
            fWriter.AddTableCell(SRLangMan.LS(RLS.LSID_Address), fHeaderFont, TextAlignment.taLeft);
            fWriter.EndTableRow();

            for (int i = 0; i < repositories.Count; i++)
            {
                repoRec = repositories[i];

                fWriter.BeginTableRow(false);
                fWriter.AddTableCell(repoRec.RepositoryName, fTextFont, TextAlignment.taLeft);
                fWriter.AddTableCell(repoRec.Address.Lines.Text, fTextFont, TextAlignment.taLeft);
                fWriter.EndTableRow();
            }
            fWriter.EndTable();
        }
Beispiel #4
0
        protected override void InternalGenerate()
        {
            IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);
            IColor clrBlue  = AppHost.GfxProvider.CreateColor(0x0000FF);

            fTitleFont = fWriter.CreateFont("", 22f, true, false, clrBlack);
            fChapFont  = fWriter.CreateFont("", 16f, true, false, clrBlack);
            fTextFont  = fWriter.CreateFont("", 10f, false, false, clrBlack);

            fWriter.AddParagraph(fTitle, fTitleFont, TextAlignment.taLeft);

            var surnames = new StringList();

            surnames.Sorted         = true;
            surnames.DuplicateSolve = DuplicateSolve.Ignore;

            GDMTree   tree   = fBase.Context.Tree;
            var       enumer = tree.GetEnumerator(GDMRecordType.rtIndividual);
            GDMRecord record;

            while (enumer.MoveNext(out record))
            {
                var    iRec      = record as GDMIndividualRecord;
                var    nameParts = GKUtils.GetNameParts(iRec, false);
                string surname   = fBase.Context.Culture.NormalizeSurname(nameParts.Surname, iRec.Sex == GDMSex.svFemale);
                surnames.Add(surname);
            }

            fWriter.AddParagraph(SRLangMan.LS(RLS.LSID_Surnames), fChapFont, TextAlignment.taLeft);
            fWriter.BeginList();
            for (int i = 0; i < surnames.Count; i++)
            {
                string item = surnames[i];
                string primaryKey = "", alternateKey = "";
                string translit = BaseMorpher.Transliterate(TranslitScheme.ts_Russian, TranslitScheme.ts_GOST, item);
                DoubleMetaphone.doubleMetaphone(translit, ref primaryKey, ref alternateKey);
                fWriter.AddListItem(" " + item + "\t" + translit + "\t" + primaryKey + "\t" + alternateKey, fTextFont);
            }
            fWriter.EndList();
        }
Beispiel #5
0
 public PersonalEventsReport(IBaseWindow baseWin, GDMIndividualRecord selectedPerson)
     : base(baseWin, false)
 {
     fTitle  = SRLangMan.LS(RLS.LSID_PER_Title);
     fPerson = selectedPerson;
 }
Beispiel #6
0
 public ContemporariesReport(IBaseWindow baseWin, GDMIndividualRecord selectedPerson)
     : base(baseWin, false)
 {
     fTitle  = SRLangMan.LS(RLS.LSID_Contemporaries_Title);
     fPerson = selectedPerson;
 }
Beispiel #7
0
 public RepositoriesReport(IBaseWindow baseWin)
     : base(baseWin, false)
 {
     fTitle = SRLangMan.LS(RLS.LSID_Repositories_Title);
 }
Beispiel #8
0
 public SourcesReport(IBaseWindow baseWin)
     : base(baseWin, false)
 {
     fTitle = SRLangMan.LS(RLS.LSID_Sources_Title);
 }
Beispiel #9
0
        protected override void InternalGenerate()
        {
            IColor clrBlack = AppHost.GfxProvider.CreateColor(0x000000);
            IColor clrBlue  = AppHost.GfxProvider.CreateColor(0x0000FF);

            fTitleFont = fWriter.CreateFont("", 22f, true, false, clrBlack);
            fChapFont  = fWriter.CreateFont("", 16f, true, false, clrBlack);
            fTextFont  = fWriter.CreateFont("", 10f, false, false, clrBlack);

            fWriter.AddParagraph(fTitle, fTitleFont, TextAlignment.taLeft);

            var names    = new List <NameItem>();
            var surnames = new List <NameItem>();

            GDMTree   tree   = fBase.Context.Tree;
            var       enumer = tree.GetEnumerator(GDMRecordType.rtIndividual);
            GDMRecord record;

            while (enumer.MoveNext(out record))
            {
                var iRec      = record as GDMIndividualRecord;
                var nameParts = GKUtils.GetNameParts(iRec, false);

                var item = names.Find(x => x.Name.Equals(nameParts.Name));
                if (item != null)
                {
                    item.Amount += 1;
                }
                else
                {
                    names.Add(new NameItem(nameParts.Name));
                }

                item = surnames.Find(x => x.Name.Equals(nameParts.Surname));
                if (item != null)
                {
                    item.Amount += 1;
                }
                else
                {
                    surnames.Add(new NameItem(nameParts.Surname));
                }
            }

            SortHelper.QuickSort(names, ItemsCompare);
            SortHelper.QuickSort(surnames, ItemsCompare);

            fWriter.AddParagraph(SRLangMan.LS(RLS.LSID_Names), fChapFont, TextAlignment.taLeft);
            fWriter.BeginList();
            foreach (var item in names)
            {
                fWriter.AddListItem(" " + item.Name + "\t" + item.Amount, fTextFont);
            }
            fWriter.EndList();

            fWriter.AddParagraph(SRLangMan.LS(RLS.LSID_Surnames), fChapFont, TextAlignment.taLeft);
            fWriter.BeginList();
            foreach (var item in surnames)
            {
                fWriter.AddListItem(" " + item.Name + "\t" + item.Amount, fTextFont);
            }
            fWriter.EndList();
        }
Beispiel #10
0
 public NamesFreqReport(IBaseWindow baseWin)
     : base(baseWin, false)
 {
     fTitle = SRLangMan.LS(RLS.LSID_NFR_Title);
 }
Beispiel #11
0
 public PhoneticsReport(IBaseWindow baseWin)
     : base(baseWin, false)
 {
     fTitle = SRLangMan.LS(RLS.LSID_Phonetics_Title);
 }