Exemplo n.º 1
0
		public override XmlDocument GenerateXML()
		{
			GedcomIndividualReport report = new GedcomIndividualReport();
			report.Database = _database;
			report.AncestorGenerations = int.MaxValue;
			report.DecendantGenerations = - int.MaxValue;
			
			XmlDocument doc = report.GenerateXML();

			XmlNode root = doc.DocumentElement;
			
			foreach (GedcomSourceRecord source in _database.Sources)
			{
				source.GenerateXML(root);	
			}
			
			foreach (GedcomRepositoryRecord repo in _database.Repositories)
			{
				repo.GenerateXML(root);	
			}

			return doc;
		}
Exemplo n.º 2
0
	protected virtual void OnFamilyGroupSheetReportWebPage_Activated(object sender, System.EventArgs e)
	{
		if (_currentView != null)
		{
			_currentView.SaveView();
				
			// view may have changed the record so get what the view thinks
			// the current record is
			_record = _currentView.Record;
		}
		
		GedcomIndividualReport report = new GedcomIndividualReport();
		
		report.Database = _database;
		report.Record = _record;
		report.AncestorGenerations = 1; // need to get the parents of the father/mother
		report.DecendantGenerations = - 2; // need 2 rather than 1 to pull in spouse for children
		report.BaseXsltName = "FamilyGroupReport";
		
		GedcomIndividualRecord indi = _record as GedcomIndividualRecord;
		if (indi != null)
		{
			GedcomFamilyRecord fam = indi.GetFamily();
			if (fam != null)
			{
				report.XrefID = fam.XRefID;
			}
		}
		
		string filename = report.CreateReport();
		
		FileSelectorDialog fileSelector = new FileSelectorDialog();
		fileSelector.Title = "Save Family Group Sheet Report As...";
		fileSelector.AddFilter("text/html", "HTML Files");
		fileSelector.AddFilter("application/pdf", "PDF Files");
		fileSelector.AddFilter("image/svg+xml", "SVG Files");
		fileSelector.SaveDialog = true;
		fileSelector.FileSelected += new EventHandler(ReportSave_FileSelected);
		fileSelector.UserData = filename;
		
		fileSelector.Run();
	}
Exemplo n.º 3
0
	protected virtual void OnDecendantsReportWebPage_Activated(object sender, System.EventArgs e)
	{
		if (_currentView != null)
		{
			_currentView.SaveView();
				
			// view may have changed the record so get what the view thinks
			// the current record is
			_record = _currentView.Record;
		}
		
		GedcomIndividualReport report = new GedcomIndividualReport();
		
		report.Database = _database;
		report.Record = _record;
		report.DecendantGenerations = - int.MaxValue;
		report.BaseXsltName = "Descendants";
		
		string filename = report.CreateReport();
		
		FileSelectorDialog fileSelector = new FileSelectorDialog();
		fileSelector.Title = "Save Decendants Report As...";
		fileSelector.AddFilter("text/html", "HTML Files");
		fileSelector.AddFilter("application/pdf", "PDF Files");
		fileSelector.AddFilter("image/svg+xml", "SVG Files");
		fileSelector.SaveDialog = true;
		fileSelector.FileSelected += new EventHandler(ReportSave_FileSelected);
		fileSelector.UserData = filename;
		
		fileSelector.Run();
	}