SIL.FieldWorks.TE.ImportDialog.scrPsgFrom_PassageChanged C# (CSharp) Метод

scrPsgFrom_PassageChanged() защищенный Метод

Handle a change in the scripture passage "from" control
protected scrPsgFrom_PassageChanged ( ScrReference newReference ) : void
newReference ScrReference The new reference.
Результат void
		protected void scrPsgFrom_PassageChanged(ScrReference newReference)
		{
			Logger.WriteEvent(string.Format("New scrPsgFrom reference is {0}", newReference.AsString));

			ScrReference scRefFrom = scrPsgFrom.ScReference;
			ScrReference scRefTo = scrPsgTo.ScReference;

			if (scRefFrom.Book > scRefTo.Book)
			{
				//set the scrPsgTo to the end of the book
				scRefTo.Book = scRefFrom.Book;
				scRefTo.Chapter = scRefTo.LastChapter;
				scRefTo.Verse = scRefTo.LastVerse;
				scrPsgTo.ScReference = scRefTo;
			}
		}