Beispiel #1
0
	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();					
	}
Beispiel #2
0
        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);
        }
Beispiel #3
0
  /// <summary>PageSubmit().</summary>
  public void PageSubmit()
  {
   int                                          scriptureReferenceVerseCount                       = -1;
   string                                       exceptionMessage                                   = null;
   string                                       scriptureReference                                 = ScriptureReferenceSearch;
   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 ( scriptureReference == null || scriptureReference == string.Empty )
   {
    PageReset();
    return;
   }//if ( scriptureReference == null ) 

   try
   {

    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 ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
    }//if ( exceptionMessage != null ) 
 
   }//try 
   catch (Exception exception) 
   {
    Feedback = exception.Message;
   }//catch
   finally 
   { 
    if ( iDataReader != null )
    {
     iDataReader.Close();
    }//if ( iDataReader != null ) 
   }//finally
   
   if ( scriptureReferenceVerseCount == 0 )
   {
    CrosswalkURIHtml = CrosswalkBibleURI;
    CrosswalkURIXml  = CrosswalkBibleURI;
    ScriptureReferenceResultSet = "";
   }//if ( scriptureReferenceVerseCount == 0 )
   else
   {
    CrosswalkURIHtml = uriCrosswalkHtml.ToString();
    CrosswalkURIXml  = uriCrosswalkXml.ToString();
    ScriptureReferenceResultSet = scriptureReferenceText.ToString();
   }//if ( scriptureReferenceVerseCount == 0 )
  }//public void PageSubmit()