55 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
using System.Text;
 | 
						|
using VEPROMS.CSLA.Library;
 | 
						|
 | 
						|
namespace Volian.Controls.Library
 | 
						|
{
 | 
						|
	public class VlnSpellCheck
 | 
						|
	{
 | 
						|
		private EditItem _MyEditItem;
 | 
						|
		public EditItem MyEditItem
 | 
						|
		{
 | 
						|
			get { return _MyEditItem; }
 | 
						|
			set
 | 
						|
			{
 | 
						|
				_MyEditItem = value;
 | 
						|
			}
 | 
						|
		}
 | 
						|
 | 
						|
 | 
						|
		public VlnSpellCheck()
 | 
						|
		{
 | 
						|
		}
 | 
						|
 | 
						|
		public void DoSpellCheck()
 | 
						|
		{
 | 
						|
			while (MyEditItem.SpellCheckNext())
 | 
						|
			{
 | 
						|
				ItemInfo next = MyEditItem.MyItemInfo.SearchNext;
 | 
						|
				//C2025-037 Evaluate the way that Spell Check (in step editor sections) is currently closing after one section.
 | 
						|
 | 
						|
				if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section
 | 
						|
                {
 | 
						|
                    return; // spell check only current procedure
 | 
						|
                }
 | 
						|
 | 
						|
				//If it is a word document, find the next non-word document
 | 
						|
				while (next.HasWordContent)
 | 
						|
                {
 | 
						|
					next = next.SearchNext;
 | 
						|
 | 
						|
					if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section
 | 
						|
					{
 | 
						|
						return; // spell check only current procedure
 | 
						|
					}
 | 
						|
				}
 | 
						|
 | 
						|
                MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
 | 
						|
            }
 | 
						|
			MyEditItem.SetFocus();
 | 
						|
		}
 | 
						|
 | 
						|
	}
 | 
						|
}
 |