SIL.FieldWorks.IText.InterlinDocForAnalysis.TriggerAnalysisSelected C# (CSharp) Method

TriggerAnalysisSelected() public method

Move the sandbox to the AnalysisOccurrence, (which may be a WfiWordform, WfiAnalysis, or WfiGloss).
public TriggerAnalysisSelected ( SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence target, bool fSaveGuess, bool fMakeDefaultSelection, bool fShow ) : void
target SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence
fSaveGuess bool if true, saves guesses; if false, skips guesses but still saves edits.
fMakeDefaultSelection bool true to make the default selection within the new sandbox.
fShow bool true makes the focusbox visible.
return void
		public virtual void TriggerAnalysisSelected(AnalysisOccurrence target, bool fSaveGuess, bool fMakeDefaultSelection, bool fShow)
		{
			// This can happen, though it is rare...see LT-8193.
			if (!target.IsValid)
			{
				return;
			}
			if (IsFocusBoxInstalled)
				FocusBox.UpdateRealFromSandbox(null, fSaveGuess, target);
			TryHideFocusBoxAndUninstall();
			RecordGuessIfNotKnown(target);
			InstallFocusBox();
			RootBox.DestroySelection();
			FocusBox.SelectOccurrence(target);
			SetFocusBoxSizeForVc();
			SelectedOccurrence = target;

			if (fShow)
			{
				SimulateReplaceAnalysis(target);
				MoveFocusBoxIntoPlace();
				// Now it is the right size and place we can show it.
				TryShowFocusBox();
				// All this CAN hapen because we're editing in another window...for example,
				// if we edit something that deletes the current wordform in a concordance view.
				// In that case we don't want to steal the focus.
				if (ParentForm == Form.ActiveForm)
					FocusBox.FocusSandbox();
			}

			if (fMakeDefaultSelection)
				m_mediator.IdleQueue.Add(IdleQueuePriority.Medium, FocusBox.MakeDefaultSelection);
		}

Same methods

InterlinDocForAnalysis::TriggerAnalysisSelected ( SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence target, bool fSaveGuess, bool fMakeDefaultSelection ) : void
InterlinDocForAnalysis