// 선물 , 알림 대한 구성설정 public void Set_ElementInfo(User_Posts _userPost) { //newsType = _type; user_post = _userPost; ctime = user_post.ctime; Set_NewsType(_userPost); Apply_element(newsType); // element 의 어느 토글키 소속인지 알도록 설정 Set_ToggleType(newsType); }
void Set_NewsType(User_Posts _userPost) { if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinRquestMsg) { newsType = NEWSTYPE.REQUEST; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinInviteMsg) { newsType = NEWSTYPE.REQUEST; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.GiftFromOperator) { if (!string.IsNullOrEmpty(_userPost.PostTxt) && (_userPost.ItTp == ITEMTYPE.NONE)) { newsType = NEWSTYPE.INFORM; } else { newsType = NEWSTYPE.SUPPLY; } } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.GiftBonusFromInAppPurchase) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinSucces) { newsType = NEWSTYPE.INFORM; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.CompleteRwdTutorial) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.Monthly) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanKickMsg) { newsType = NEWSTYPE.INFORM; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.AttdReward) { newsType = NEWSTYPE.SUPPLY; } }