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;
			}
		}