コード例 #1
0
ファイル: BasisData.cs プロジェクト: jay-JYPark/CAP-System
        /// <summary>
        /// [문안 언어 종류]
        /// </summary>
        /// <param name="identifier"></param>
        /// <returns></returns>
        public static MsgTextDisplayLanguageKind FindMsgTextLanguageInfoByID(int identifier)
        {
            foreach (MsgTextDisplayLanguageKind kind in msgTextLanguageKind)
            {
                if (kind.ID == identifier)
                {
                    MsgTextDisplayLanguageKind copy = new MsgTextDisplayLanguageKind();
                    copy.DeepCopyFrom(kind);

                    return(copy);
                }
            }
            return(null);
        }
コード例 #2
0
ファイル: BasisData.cs プロジェクト: jay-JYPark/CAP-System
        /// <summary>
        /// [문안 언어 종류]
        /// </summary>
        /// <param name="identifier"></param>
        /// <returns></returns>
        public static MsgTextDisplayLanguageKind FindMsgTextLanguageInfoByCode(string languageCode)
        {
            foreach (MsgTextDisplayLanguageKind kind in msgTextLanguageKind)
            {
                if (kind.LanguageCode == languageCode)
                {
                    MsgTextDisplayLanguageKind copy = new MsgTextDisplayLanguageKind();
                    copy.DeepCopyFrom(kind);

                    return(copy);
                }
            }
            return(null);
        }
コード例 #3
0
        public void DeepCopyFrom(SendingMsgTextInfo src)
        {
            System.Diagnostics.Debug.Assert(src != null);

            // 다국어
            if (src.selectedLanguages == null)
            {
                this.selectedLanguages = null;
            }
            else
            {
                if (this.selectedLanguages == null)
                {
                    this.selectedLanguages = new List <MsgTextDisplayLanguageKind>();
                }
                this.selectedLanguages.Clear();

                foreach (MsgTextDisplayLanguageKind lang in src.selectedLanguages)
                {
                    MsgTextDisplayLanguageKind copy = new MsgTextDisplayLanguageKind();
                    copy.DeepCopyFrom(lang);
                    this.selectedLanguages.Add(copy);
                }
            }

            // 도시유형별
            if (src.selectedCityType == null)
            {
                this.selectedCityType = null;
            }
            else
            {
                if (this.selectedCityType == null)
                {
                    this.selectedCityType = new MsgTextCityType();
                }
                this.selectedCityType.DeepCopyFrom(src.selectedCityType);
            }

            // 원본 전송 문안
            if (src.originalTransmitMsgText == null)
            {
                this.originalTransmitMsgText = null;
            }
            else
            {
                if (this.originalTransmitMsgText == null)
                {
                    this.originalTransmitMsgText = new List <MsgText>();
                }
                this.originalTransmitMsgText.Clear();

                foreach (MsgText lang in src.originalTransmitMsgText)
                {
                    MsgText copy = new MsgText();
                    copy.DeepCopyFrom(lang);
                    this.originalTransmitMsgText.Add(copy);
                }
            }

            // 현재 전송 문안(런타임 편집/가공)
            if (src.currentTransmitMsgText == null)
            {
                this.currentTransmitMsgText = null;
            }
            else
            {
                if (this.currentTransmitMsgText == null)
                {
                    this.currentTransmitMsgText = new List <MsgText>();
                }
                this.currentTransmitMsgText.Clear();

                foreach (MsgText lang in src.currentTransmitMsgText)
                {
                    MsgText copy = new MsgText();
                    copy.DeepCopyFrom(lang);
                    this.currentTransmitMsgText.Add(copy);
                }
            }
        }