Example #1
0
        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));
            }
        }
Example #2
0
        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 != msControl.Value(curWs).Text)
                {
                    return(true);
                }
            }
            return(false);
        }
        /// <summary>
        /// Set the multilingual caption into the dialog control.
        /// </summary>
        public void SetMultilingualCaptionValues(IMultiAccessorBase caption)
        {
            if (m_lmscCaption == null)
            {
                return;
            }
            var cws = m_lmscCaption.NumberOfWritingSystems;

            for (var i = 0; i < cws; i++)
            {
                var curWs = m_lmscCaption.Ws(i);
                if (curWs <= 0)
                {
                    continue;
                }
                int       actualWs;
                ITsString tssStr;
                if (!caption.TryWs(curWs, out actualWs, out tssStr))
                {
                    continue;
                }
                m_lmscCaption.SetValue(curWs, tssStr);
            }
        }
Example #4
0
        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);
            }
        }