public void Set_Value(FacebookFeedData a_cValue)
 {
     if (a_cValue != null)
     {
         string key = a_cValue.Feed_Code.ToLower();
         this.m_sdCollection.Add(key, a_cValue);
     }
 }
 public void Copy(FacebookFeedData data)
 {
     this.Feed_Code      = data.Feed_Code;
     this.Code_Name      = data.Code_Name;
     this.Game_ImageKey  = data.Game_ImageKey;
     this.Web_ImgageURL  = data.Web_ImgageURL;
     this.Title_Text_Key = data.Title_Text_Key;
     this.Msg_Text_Key   = data.Msg_Text_Key;
     this.User_Message   = data.User_Message;
 }
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         FacebookFeedData facebookFeedData = new FacebookFeedData();
         facebookFeedData.SetData(data);
         NrTSingleton <Facebook_Feed_Manager> .Instance.Set_Value(facebookFeedData);
     }
     return(true);
 }
    public void SetType(eFACEBOOK_FEED_TYPE _Type, object Data)
    {
        string           text             = string.Empty;
        FacebookFeedData facebookFeedData = NrTSingleton <Facebook_Feed_Manager> .Instance.Get_FeedData(_Type);

        if (facebookFeedData != null)
        {
            this.m_FeedData.Copy(facebookFeedData);
            switch (_Type)
            {
            case eFACEBOOK_FEED_TYPE.GET_SOL:
            {
                SOLDIER_INFO sOLDIER_INFO = Data as SOLDIER_INFO;
                if (sOLDIER_INFO != null)
                {
                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(sOLDIER_INFO.CharKind);

                    if (charKindInfo != null)
                    {
                        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Title_Text_Key);

                        this.m_lbTextTitle.Text = (this.m_FeedData.Title_Text_Key = text);
                        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Msg_Text_Key);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                            {
                                text,
                                "Rank",
                                (int)(sOLDIER_INFO.Grade + 1),
                                "solname",
                                charKindInfo.GetName()
                            });

                        this.m_FeedData.Msg_Text_Key = text;
                        TsLog.LogWarning("Title : {0}  Message : {1}", new object[]
                            {
                                this.m_FeedData.Title_Text_Key,
                                this.m_FeedData.Msg_Text_Key
                            });
                    }
                }
                break;
            }

            case eFACEBOOK_FEED_TYPE.ENCHANT_SOL:
            {
                NkSoldierInfo nkSoldierInfo = Data as NkSoldierInfo;
                if (nkSoldierInfo != null)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Title_Text_Key);

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                        {
                            text,
                            "solname",
                            nkSoldierInfo.GetName()
                        });

                    this.m_lbTextTitle.Text        = text;
                    this.m_FeedData.Title_Text_Key = text;
                    text = string.Empty;
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Msg_Text_Key);

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                        {
                            text,
                            "solname",
                            nkSoldierInfo.GetName()
                        });

                    this.m_FeedData.Msg_Text_Key = text;
                    TsLog.LogWarning("Message :{0} Title : {1} ImageURL : {2} Msg_Text_Key = {3}", new object[]
                        {
                            this.m_taMessage.Text,
                            this.m_FeedData.Title_Text_Key,
                            this.m_FeedData.Web_ImgageURL,
                            this.m_FeedData.Msg_Text_Key
                        });
                }
                else
                {
                    TsLog.LogError("Fecebook_Feed_Dlg NkSoldierInfo == NULL@@@@@@@@ ", new object[0]);
                }
                break;
            }

            case eFACEBOOK_FEED_TYPE.ENCHANT_ITEM:
            {
                ITEM iTEM = Data as ITEM;
                if (iTEM != null)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Title_Text_Key);

                    this.m_lbTextTitle.Text = (this.m_FeedData.Title_Text_Key = text);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Msg_Text_Key);

                    string name = NrTSingleton <ItemManager> .Instance.GetName(iTEM);

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                        {
                            text,
                            "item",
                            name,
                            "grade",
                            this.ItemRankText(iTEM)
                        });

                    this.m_FeedData.Msg_Text_Key = text;
                }
                else
                {
                    TsLog.LogError("Fecebook_Feed_Dlg ITEM == NULL@@@@@@@@ ", new object[0]);
                }
                break;
            }

            case eFACEBOOK_FEED_TYPE.PLUNDER_WIN:
            {
                char[] buffer = Data as char[];
                string text2  = TKString.NEWString(buffer);
                if (!string.IsNullOrEmpty(text2))
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Title_Text_Key);

                    this.m_lbTextTitle.Text = (this.m_FeedData.Title_Text_Key = text);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Msg_Text_Key);

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                        {
                            text,
                            "username",
                            text2
                        });

                    this.m_FeedData.Msg_Text_Key = text;
                    TsLog.LogWarning("Message :{0} Title : {1} ImageURL : {2} Msg_Text_Key = {3}", new object[]
                        {
                            this.m_taMessage.Text,
                            this.m_FeedData.Title_Text_Key,
                            this.m_FeedData.Web_ImgageURL,
                            this.m_FeedData.Msg_Text_Key
                        });
                }
                else
                {
                    TsLog.LogError("Fecebook_Feed_Dlg DeffenderName == NULL@@@@@@@@ ", new object[0]);
                }
                break;
            }

            case eFACEBOOK_FEED_TYPE.DKALCHE_SOL:
            {
                SOLDIER_INFO sOLDIER_INFO2 = Data as SOLDIER_INFO;
                if (sOLDIER_INFO2 != null)
                {
                    NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(sOLDIER_INFO2.CharKind);

                    if (charKindInfo2 != null)
                    {
                        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Title_Text_Key);

                        this.m_lbTextTitle.Text = (this.m_FeedData.Title_Text_Key = text);
                        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromFacebook(this.m_FeedData.Msg_Text_Key);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                            {
                                text,
                                "Rank",
                                (int)(sOLDIER_INFO2.Grade + 1),
                                "solname",
                                charKindInfo2.GetName()
                            });

                        this.m_FeedData.Msg_Text_Key = text;
                        TsLog.LogWarning("Title : {0}  Message : {1}", new object[]
                            {
                                this.m_FeedData.Title_Text_Key,
                                this.m_FeedData.Msg_Text_Key
                            });
                    }
                }
                break;
            }
            }
            this.m_txImage.SetTextureKey(facebookFeedData.Game_ImageKey);
        }
        else
        {
            this.m_FeedData = null;
        }
    }