aboutsummaryrefslogblamecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp
blob: b5d6be1c2e414134079e339acf0473b00740d530 (plain) (tree)




























































                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        



























































                                                                                                                                                                                                                                                                                    
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "AboutBoxfrm.h"
#include "mainfrm.h"
//--------------------------------------------------------------------- 
#pragma resource "*.dfm"
TAboutBox *AboutBox;
//--------------------------------------------------------------------- 
__fastcall TAboutBox::TAboutBox(TComponent* AOwner) : TForm(AOwner) {
}


//--------------------------------------------------------------------- 
void __fastcall TAboutBox::FormShow(TObject *Sender) {
	int i;
	static char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries", "Generic Books"};

	string newtext, tmptext;
	ModMap::iterator it;
	SectionMap::iterator it2;
	ConfigEntMap::iterator it3;
	TMemoryStream *RTFStream = new TMemoryStream();
	
	newtext  = "{\\rtf1\\ansi{\\fonttbl{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;}";
	newtext += "\\pard\\qc\\cf2\\nowidctlpar{\\fs30\\b Installed Modules } \\par \\pard \\nowidctlpar \\cf0 ";

	for (i = 0; i < 4; i++) {
		newtext += "\\par {\\fs28\\b ";
		newtext += modtypes[i];
		newtext += " }\\par \\par ";
		for (it = Form1->mainmgr->Modules.begin(); it != Form1->mainmgr->Modules.end(); it++) {
			if (!strcmp((*it).second->Type(), modtypes[i])) {
				it2 = Form1->mainmgr->config->Sections.find((*it).second->Name());
				if (it2 != Form1->mainmgr->config->Sections.end()) {
					newtext = newtext + "{\\fs24\\cf1\\b " + (*it).second->Name() + " }\t";
					newtext = newtext + "{\\fs24\\i " + (*it).second->Description() + " } \\par ";
					it3 = (*it2).second.find("About");
					if (it3 != (*it2).second.end()) 				
						newtext = newtext + "{\\fs20\\cf0 " + (*it3).second.c_str() + " }\\par \\par";
				}
			}
		}
	}
	newtext += "{\\fs24 \\par }}";
	RTFStream->Clear();
	RTFStream->WriteBuffer(newtext.c_str(), newtext.length());
	RTFStream->Position = 0;
	ModulesAbout->Lines->LoadFromStream(RTFStream);

	newtext  = "{\\rtf1\\ansi{\\fonttbl{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;}";
	newtext += "\\fs20 Thanx to God for His GREAT MERCY and LOVE:  Never did anyone have so much, give it up so completely, to humble Himself and die such a death, all for such an ENEMY as me.  -Philippians 2:6-8; Romans 5:6-10 \\par\\par ";
	newtext += "For the latest updates and info, visit us on the net at: \\par ";
	newtext += "http://www.crosswire.org \\par\\par ";
	newtext += "Send us feedback, bug reports, or patches/additions: \\par ";
	newtext += "sword-feedback@crosswire.org \\par ";
	newtext += "sword-bugs@crosswire.org \\par ";
	newtext += "sword-patches@crosswire.org (please include unified diffs if possible (diff -u)) \\par\\par ";
	newtext += "To be on our mailing list: \\par ";
	newtext += "sword-list-info@crosswire.org \\par\\par ";
	newtext += "This software is provided free for the study of God and His Word.  You DO NOT NEED TO license or pay for this software.  Please: copy it freely and distribute it to atheists in Russia :), post it on your favorite FTP site, write your own modules and features for it, include it on your lastest freeware CDROM, incorporate all the cool utility classes into a product of your own, write a tract module for the program and sneak it onto all of your co-workers' computers and blame it on a virus, make fun of your pastor for spending $400 dollars on a similar package, give it to your pastor who can't figure out how to use his $400 dollar package :) \\par\\par ";
	newtext += "OK, if you still feel the need, you can help our organization out at: \\par\\par ";
	newtext += "CrossWire Software & Bible Society \\par ";
	newtext += "P. O. Box 2528 \\par ";
	newtext += "Tempe, AZ  85280-2528 \\par\\par ";
	newtext += "... but I must warn you, your contributions will probably just go toward paying my way through college, or to give me a little more time to spend on the project :) \\par\\par ";
	newtext += "\tMay the peace of GOD consume your heart, \\par ";
	newtext += "\t\tThe SWORD Project Development Team \\par ";
	newtext += "_________________________________________ \\par ";
	newtext += "Thanks be to God for all the wonderful people who have contributed in so many ways to make this project possible.  These are just a few (I could not possibly name them all) who have directly contributed an abundance of their time and talents: \\par\\par ";
	newtext += "Chris Little (the module-making machine!); All the people at The Source in Scottsdale for testing and suggestions; ";
	newtext += "The Bible Foundation: Jerry Kingery, Jerry Hastings; Geoffrey W. Hastings; ";
	newtext += "William Dicks; Everyone on b-greek@franklin.oit.unc.edu; Michael Paul Johnson; ";
	newtext += "Roland Nygren; Bayu Gunawan; Bill Kincaid; Mark Fuller; Larry Pierce; Franklin Bratcher; ";
	newtext += "Gregory Hall; Luis Cortes; Steve Hiner; Kristof Petr; Paul Gear and OpenBible; Chris Bitmead (go Scheme!); ";
	newtext += "Brook Humphrey; Torsten Uhlmann, Joachim Ansorg, Darwin Gregory, Martin Gruner and the BibleTime Team; ";
	newtext += "Darren DeMeulenaere; Terry Biggs and the GnomeSword Team; Daniel Glassey; David Trotz Jr.; Karl-Heinz Troyer and BibleWorkshop";
	newtext += "\\par\\par ";
	newtext += "{\\i And the list goes on...} \\par \\par ";
	newtext += "{\\fs24 \\par }}";
	RTFStream->Clear();
	RTFStream->WriteBuffer(newtext.c_str(), newtext.length());
	RTFStream->Position = 0;
	CreditAbout->Lines->LoadFromStream(RTFStream);
	delete RTFStream;
}
//---------------------------------------------------------------------------




void __fastcall TAboutBox::ProgramIconMouseDown(TObject *Sender,
	 TMouseButton Button, TShiftState Shift, int X, int Y)
{
	if ((Shift.Contains(ssCtrl)) && (!Shift.Contains(ssAlt)) && (Button == mbRight)) {
		TMemoryStream *RTFStream = new TMemoryStream();
		string newtext = "{\\rtf1\\ansi{\\fonttbl{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;}";
		newtext += "\\fs20 mainmgr->config: \\par\\par ";

		SectionMap::iterator section;
		ConfigEntMap::iterator entry;

		for (section = Form1->mainmgr->config->Sections.begin(); section != Form1->mainmgr->config->Sections.end(); section++) {
			newtext += "["; newtext += section->first.c_str(); newtext += "] \\par ";
			for (entry = (*section).second.begin(); entry != (*section).second.end(); entry++) {
				newtext += entry->first.c_str(); newtext += "="; newtext += entry->second.c_str(); newtext += "\\par ";
			}
			newtext += "\\par ";
		}


		newtext += "{\\fs24 \\par }}";
		RTFStream->Clear();
		RTFStream->WriteBuffer(newtext.c_str(), newtext.length());
		RTFStream->Position = 0;
		CreditAbout->Lines->LoadFromStream(RTFStream);
		delete RTFStream;
	}
}
//---------------------------------------------------------------------------