protected static void SetAllMultiAlternatives(IMultiAccessorBase multiField, LabeledMultiStringControl source) { var cws = source.NumberOfWritingSystems; for (var i = 0; i < cws; i++) { var curWs = source.Ws(i); multiField.set_String(curWs, source.Value(curWs)); } }
private static bool HasMsContentChanged(IMultiAccessorBase oldStrings, LabeledMultiStringControl msControl) { var cws = msControl.NumberOfWritingSystems; for (var i = 0; i < cws; i++) { var curWs = msControl.Ws(i); //if (oldStrings.get_String(curWs).Text != Cache.TsStrFactory.EmptyString(curWs).Text // && oldStrings.get_String(curWs).Text != msControl.Value(curWs).Text) // return true; if (oldStrings.get_String(curWs).Text != msControl.Value(curWs).Text) return true; } return false; }
protected static void LoadAllMultiAlternatives(IMultiAccessorBase multiField, LabeledMultiStringControl destination) { var cws = destination.NumberOfWritingSystems; for (var i = 0; i < cws; i++) { var curWs = destination.Ws(i); if (curWs <= 0) continue; int actualWs; ITsString tssStr; if (!multiField.TryWs(curWs, out actualWs, out tssStr)) continue; destination.SetValue(curWs, tssStr); } }