/// <summary>Page Load.</summary> public void Page_Load ( object sender, EventArgs e ) { string exceptionMessage = null; serverMapPath = this.MapPath(""); if ( serverMapPath != null) { filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml; }//if ( serverMapPath != null) ScriptureReference.ConfigurationXml ( filenameConfigurationXml, ref exceptionMessage, ref databaseConnectionString ); if ( exceptionMessage != null ) { Feedback = exceptionMessage; return; }//if ( exceptionMessage != null ) if ( Page.IsPostBack ) { PageSubmit(); } }//Page_Load
public static void Main(string[] argv) { int scriptureReferenceVerseCount = -1; string exceptionMessage = null; string scriptureReference = null; string[][] scriptureReferenceArray = null; StringBuilder scriptureReferenceText = null; StringBuilder uriCrosswalkHtml = null; StringBuilder uriCrosswalkXml = null; StringBuilder[] scriptureReferenceBookChapterVersePrePostCondition = null; StringBuilder[] scriptureReferenceBookChapterVersePrePostSelect = null; StringBuilder scriptureReferenceBookChapterVersePrePostQuery = null; IDataReader iDataReader = null; ScriptureReferenceBookChapterVersePrePost[] scriptureReferenceBookChapterVersePrePost = null; if (argv.Length < 1) { return; } else { scriptureReference = argv[0]; } ScriptureReference.ConfigurationXml ( filenameConfigurationXml, ref exceptionMessage, ref DatabaseConnectionString ); System.Console.WriteLine(DatabaseConnectionString); ScriptureReference.ScriptureReferenceParser ( new string[] { scriptureReference }, DatabaseConnectionString, ref exceptionMessage, ref scriptureReferenceBookChapterVersePrePost, ref scriptureReferenceArray, ref uriCrosswalkHtml, ref uriCrosswalkXml ); ScriptureReference.ScriptureReferenceQuery ( DatabaseConnectionString, ref exceptionMessage, ref scriptureReferenceBookChapterVersePrePost, ref iDataReader, ref scriptureReferenceVerseCount, ref scriptureReferenceText, ref scriptureReferenceBookChapterVersePrePostCondition, ref scriptureReferenceBookChapterVersePrePostSelect, ref scriptureReferenceBookChapterVersePrePostQuery ); if (iDataReader != null) { iDataReader.Close(); } DataSet dataSet = new DataSet(); UtilityDatabase.DatabaseQuery ( DatabaseConnectionString, ref exceptionMessage, ref dataSet, scriptureReferenceBookChapterVersePrePostQuery.ToString(), CommandType.Text ); StringBuilder sbScriptureReferenceVerseText = new StringBuilder(); foreach (DataTable dataTable in dataSet.Tables) { foreach (DataRow dataRow in dataTable.Rows) { sbScriptureReferenceVerseText.Append(dataRow["verseText"]); } } System.Console.WriteLine(sbScriptureReferenceVerseText); SpVoice spVoice = new SpVoice(); spVoice.Speak ( sbScriptureReferenceVerseText.ToString(), SpeechVoiceSpeakFlags.SVSFlagsAsync ); spVoice.WaitUntilDone(Timeout.Infinite); }
public void ScriptureMark() { int scriptureReferenceVerseCount = -1; string exceptionMessage = null; string[][] scriptureReferenceArray = null; StringBuilder scriptureReferenceText = null; StringBuilder uriCrosswalkHtml = null; StringBuilder uriCrosswalkXml = null; StringBuilder[] scriptureReferenceBookChapterVersePrePostCondition = null; StringBuilder[] scriptureReferenceBookChapterVersePrePostSelect = null; StringBuilder scriptureReferenceBookChapterVersePrePostQuery = null; IDataReader iDataReader = null; ScriptureReferenceBookChapterVersePrePost[] scriptureReferenceBookChapterVersePrePost = null; StringBuilder scriptureReferenceBookChapterVersePrePostMinMax = null; ScriptureReference.ConfigurationXml ( filenameConfigurationXml, ref exceptionMessage, ref databaseConnectionString ); ScriptureReference.ScriptureReferenceParser ( new string[] { ScriptureReferenceSearch }, databaseConnectionString, ref exceptionMessage, ref scriptureReferenceBookChapterVersePrePost, ref scriptureReferenceArray, ref uriCrosswalkHtml, ref uriCrosswalkXml ); ScriptureReference.ScriptureReferenceQuery ( databaseConnectionString, ref exceptionMessage, ref scriptureReferenceBookChapterVersePrePost, ref iDataReader, ref scriptureReferenceVerseCount, ref scriptureReferenceText, ref scriptureReferenceBookChapterVersePrePostCondition, ref scriptureReferenceBookChapterVersePrePostSelect, ref scriptureReferenceBookChapterVersePrePostQuery ); if ( iDataReader != null ) { iDataReader.Close(); } DataSet dataSet = new DataSet(); scriptureReferenceBookChapterVersePrePostMinMax = new StringBuilder(); for (int index = 0; index < scriptureReferenceBookChapterVersePrePostCondition.Length; ++index) { scriptureReferenceBookChapterVersePrePostMinMax.AppendFormat ( ScriptureReferenceBookChapterVersePrePost.SQLSelectChapterVerseIdSequenceMinimumMaximum, scriptureReferenceBookChapterVersePrePostCondition[index] ); } UtilityDatabase.DatabaseQuery ( databaseConnectionString, ref exceptionMessage, ref dataSet, scriptureReferenceBookChapterVersePrePostMinMax.ToString(), CommandType.Text ); StringBuilder chapterVerseIdSequenceMinimumMaximum = new StringBuilder(); int verseIdSequenceMinimum , verseIdSequenceMaximum; int chapterIdSequenceMinimum, chapterIdSequenceMaximum; foreach ( DataTable dataTable in dataSet.Tables ) { foreach ( DataRow dataRow in dataTable.Rows ) { verseIdSequenceMinimum = Convert.ToInt32(dataRow["verseIdSequenceMinimum"]); verseIdSequenceMaximum = Convert.ToInt32(dataRow["verseIdSequenceMaximum"]); chapterIdSequenceMinimum = Convert.ToInt32(dataRow["chapterIdSequenceMinimum"]); chapterIdSequenceMaximum = Convert.ToInt32(dataRow["chapterIdSequenceMaximum"]); chapterVerseIdSequenceMinimumMaximum.AppendFormat ( ScriptureReferenceBookChapterVersePrePost.ChapterVerseIdSequenceMinimumMaximumFormat, chapterIdSequenceMinimum, 100 * chapterIdSequenceMinimum / ScriptureReferenceBookChapterVersePrePost.ChapterIdSequenceMaximum, verseIdSequenceMinimum, 100 * verseIdSequenceMinimum / ScriptureReferenceBookChapterVersePrePost.VerseIdSequenceMaximum ); if (verseIdSequenceMinimum != verseIdSequenceMaximum) { chapterVerseIdSequenceMinimumMaximum.Append(" "); chapterVerseIdSequenceMinimumMaximum.AppendFormat ( ScriptureReferenceBookChapterVersePrePost.ChapterVerseIdSequenceMinimumMaximumFormat, chapterIdSequenceMaximum, 100 * chapterIdSequenceMaximum / ScriptureReferenceBookChapterVersePrePost.ChapterIdSequenceMaximum, verseIdSequenceMaximum, 100 * verseIdSequenceMaximum / ScriptureReferenceBookChapterVersePrePost.VerseIdSequenceMaximum ); } chapterVerseIdSequenceMinimumMaximum.Append("<br />"); } } //Response.Write(chapterVerseIdSequenceMinimumMaximum.ToString()); ScriptureReferenceResultSet = chapterVerseIdSequenceMinimumMaximum.ToString(); }