public void Init(LargeTips tips) { _tipsModel.Title.text = tips.title; _tipsModel.DescripionLabel.text = HelperMethods.Instance.StripHtmlTags(tips.Description); _tipsModel.WebsiteLabel.text = string.IsNullOrEmpty(tips.path) ? "N/A" : tips.path; _tipsModel.Id = tips.id; }
private void AddHealthyTipsToView(LargeTips tips) { if (IsNotificationPresent()) { return; } GameObject tipsPrefabToMake = (GameObject)Resources.Load(PrefabPath + TipsPrefabName); if (null == tipsPrefabToMake) { Debug.LogError("Prefab " + TipsPrefabName + " could not be instantiated"); return; } if (!IsPanelActive()) { ActivatePanel(); } _model.TipsViewController = NGUITools.AddChild(_model.ParentForNatification.gameObject, tipsPrefabToMake) .GetComponent <NotificationTipsController>(); _model.TipsViewController.transform.localPosition = _startTipsPos; _model.TipsViewController.Init(tips); }
private void Showed(LargeTips tips) { ShortTips shortTips = Tipses.FirstOrDefault(tipss => tipss.id == tips.id); if (null == shortTips) { throw new NullReferenceException("TipsController.Showed - error: cann't find necessary shortTips"); } shortTips.State = TipsState.Showed; }
private void OnGetDetailHealthyTipDataByNidSuccess(string json) { Debug.Log("TipsController.OnGetDetailHealthyTipDataByNidSuccess - OK, json: \n" + json); LargeTips tips = JsonReader.Deserialize <LargeTips>(json); Debug.Log(tips); AddHealthyTipsToView(tips); }
private void AddHealthyTipsToView(LargeTips tips) { LastTipsShowTimeStamp = DateTime.UtcNow; SetTrackingVars(); Showed(tips); _waitingForServer = false; if (OnAddHealthyTips != null) { OnAddHealthyTips(tips); } }
private void AddHealthyTipsToView(LargeTips tips) { if (IsNotificationPresent()) return; GameObject tipsPrefabToMake = (GameObject) Resources.Load(PrefabPath + TipsPrefabName); if (null == tipsPrefabToMake) { Debug.LogError("Prefab " + TipsPrefabName + " could not be instantiated"); return; } if (!IsPanelActive()) { ActivatePanel(); } _model.TipsViewController = NGUITools.AddChild(_model.ParentForNatification.gameObject, tipsPrefabToMake) .GetComponent<NotificationTipsController>(); _model.TipsViewController.transform.localPosition = _startTipsPos; _model.TipsViewController.Init(tips); }