예제 #1
0
		protected virtual void OnHeaderView_AddFile (object sender, MultimediaFileArgs e)
		{
			FileSelectorDialog fileSelector = new FileSelectorDialog();
			fileSelector.Title = "Select Media File";
			fileSelector.AddFilter("image/*", "Images");
			fileSelector.AddFilter("video/*", "Videos");
			fileSelector.AddFilter("audio/*", "Audio");
			fileSelector.AddFilter("text/*", "Text Documents");
			
			fileSelector.FileSelected += new EventHandler(ScrapBookList_AddFileSelected);
			fileSelector.UserData = e;
			fileSelector.Modal = true;
					
			fileSelector.Run();
		}
예제 #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();
	}
예제 #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();
	}
예제 #4
0
	protected virtual void OnSaveAs_Activated(object sender, System.EventArgs e)
	{
		FileSelectorDialog fileSelector = new FileSelectorDialog();
		fileSelector.Title = "Select File to Save As";
		fileSelector.AddFilter("application/x-gedcom", "GEDCOM Files");
		fileSelector.SaveDialog = true;
		
		fileSelector.FileSelected += new EventHandler(SaveAs_FileSelected);
		fileSelector.Run();
	}
예제 #5
0
	protected virtual void OnMerge_Activated (object sender, System.EventArgs e)
	{
		FileSelectorDialog fileSelector = new FileSelectorDialog();
		fileSelector.Title = "Select File to Merge";
		fileSelector.AddFilter("application/x-gedcom", "GEDCOM Files");
		
		fileSelector.FileSelected += new EventHandler(Merge_FileSelected);
		fileSelector.Show();
	}