public void ShowFlyIcon(long clue_id_) { var fly = m_fly_icons_grid.GetAvaliableContainerElement <FlyIconItemView>(); Dictionary <int, HashSet <long> > scan_datas = ScanDataManager.Instance.Examin_clue_datas(m_scan_id); int scan_type = 0; foreach (var kvp in scan_datas) { if (kvp.Value.Contains(clue_id_)) { scan_type = kvp.Key; break; } } for (int i = 0; i < m_clue_progress_grid.ChildCount; ++i) { var progress = m_clue_progress_grid.GetChild <ClueProgressItemView>(i); if (scan_type == m_clue_progress_grid.GetChild <ClueProgressItemView>(i).Scan_type) { fly.Refresh(clue_id_, ConfFindClue.Get(clue_id_).icon, m_fly_icons_grid.Position, progress.Position); fly.Visible = true; break; } } }
public static bool GetConfig(string fieldName, object fieldValue, out ConfFindClue config) { DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_FindClue", fieldName, fieldValue); if (sqReader != null) { try { sqReader.Read(); if (sqReader.HasRows) { config = GetConfByDic(sqReader); } else { config = null; return(false); } return(true); } catch (Exception ex) { SqliteDriver.SQLiteHelper.OnError(string.Format("FindClue 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex)); } config = null; return(false); } config = null; return(false); }
private static void GetArrrayList() { if (cacheArray.Count <= 0) { DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_FindClue"); if (sqReader != null) { while (sqReader.Read()) { ConfFindClue _conf = GetConfByDic(sqReader); cacheArray.Add(_conf); dic[_conf.id] = _conf; } resLoaded = true; } } }
private static ConfFindClue GetConfByDic(DataTable reader) { long id = reader.GetInt64(0); string icon = reader.GetString(1); string detail = reader.GetString(2); string descs = reader.GetString(3); string name = reader.GetString(4); ConfFindClue new_obj_ConfFindClue = new ConfFindClue(id, icon, detail, descs, name ); return(new_obj_ConfFindClue); }
public static bool GetConfig(long id, out ConfFindClue config) { if (dic.TryGetValue(id, out config)) { return(config != null); } if (cacheLoaded) { config = null; return(false); } DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_FindClue", id); if (sqReader != null) { try { sqReader.Read(); if (sqReader.HasRows) { config = GetConfByDic(sqReader); } else { dic[id] = null; config = null; return(false); } dic[id] = config; return(true); } catch (Exception ex) { SqliteDriver.SQLiteHelper.OnError(string.Format("FindClue 表找不到SN={0} 的数据\n{1}", id, ex)); } config = null; return(false); } else { config = null; return(false); } }
public void ShowDetail(long clue_id_) { Dictionary <int, HashSet <long> > scan_datas = ScanDataManager.Instance.Examin_clue_datas(m_scan_id); int scan_type = 0; foreach (var kvp in scan_datas) { if (kvp.Value.Contains(clue_id_)) { scan_type = kvp.Key; break; } } var detail = m_details_grid.GetAvaliableContainerElement <ClueDetailView>(); detail.Refresh(clue_id_, ConfFindClue.Get(clue_id_).icon, ConfFindClue.Get(clue_id_).detail); detail.Visible = true; }
public override void OnShow(object param) { base.OnShow(param); GameEvents.UIEvents.UI_GameEntry_Event.OnMaskBGVisible.SafeInvoke(true); //GameEvents.UIEvents.UI_Common_Event.OnCommonUIVisible.SafeInvoke(false); BgHideAlpha(false); PanelTurnToOne(false); m_btn.AddClickCallBack(OnClicked); m_tips_btn.AddClickCallBack(OnClicked); m_close_btn.AddClickCallBack(OnCloseClicked); if (null != param) { var input_param = param as AcceptTaskParam; m_taskInfo = input_param.m_taskInfo; m_btn_act = input_param.m_close_act; m_isAcceptTask = input_param.isAcceptTask; } this.m_completeTaskTipsLabel.Visible = !m_isAcceptTask; this.m_tips_txt.Visible = m_isAcceptTask; if (m_isAcceptTask) { this.m_btnLable.Text = "Action !"; } else { this.m_btnLable.Text = "Complete !"; } ConfTask confTask = ConfTask.Get(this.m_taskInfo.TaskConfID); this.m_desc_txt.Text = LocalizeModule.Instance.GetString(confTask.descs); this.m_name_txt.Text = LocalizeModule.Instance.GetString(confTask.name); this.m_tips_txt.Text = LocalizeModule.Instance.GetString("activity_drop_taskdec_1"); List <RewardWrapper> task_rewards = new List <RewardWrapper>(); if (m_isAcceptTask) { task_rewards = GetAcceptTaskDropItem(confTask); } else { task_rewards = GetCompleteTaskDropItem(); } if (task_rewards.Count > 0) { m_reward_grid.EnsureSize <DropItemIcon>(task_rewards.Count); for (int i = 0; i < m_reward_grid.ChildCount; ++i) { var view = m_reward_grid.GetChild <DropItemIcon>(i); view.InitSprite(task_rewards[i].m_icon, task_rewards[i].m_num, task_rewards[i].m_id); view.Visible = true; } } else { m_reward_grid.Clear(); } List <iconAndName> conditions = new List <iconAndName>(); if (m_taskInfo.CompleteConditionList.Count > 0) { foreach (var complete_condition in m_taskInfo.CompleteConditionList) { if (complete_condition.GetType() == typeof(TaskCompleteItems)) { //收集物品 TaskCompleteItems collectDataInfo = complete_condition as TaskCompleteItems; List <ItemWrapper> collectItemList = collectDataInfo.TaskCompleteData; string collect_icon, collect_name; int collect_type; foreach (var collect in collectItemList) { GetIconAndName(collect.ItemID, out collect_icon, out collect_name, out collect_type); conditions.Add(new iconAndName() { m_icon = collect_icon, m_name = collect_name, m_type = collect_type, }); } } else if (complete_condition.GetType() == typeof(TaskCompleteByScan)) { //尸检 TaskCompleteByScan collectDataInfo = complete_condition as TaskCompleteByScan; long scan_id = (long)collectDataInfo.TaskCompleteData; var all_types_clues = ScanDataManager.Instance.Examin_clue_datas(scan_id); var all_clues = new HashSet <long>(); foreach (var kvp in all_types_clues) { all_clues.UnionWith(kvp.Value); } var scan_clues = from i in all_clues select new iconAndName() { m_icon = ConfFindClue.Get(i).icon, m_name = LocalizeModule.Instance.GetString(ConfFindClue.Get(i).name), }; foreach (var item in scan_clues) { conditions.Add(item); } } } } m_aim_grid.EnsureSize <AimItemView>(conditions.Count); for (int i = 0; i < m_aim_grid.ChildCount; ++i) { m_aim_grid.GetChild <AimItemView>(i).Refresh(conditions[i].m_icon, conditions[i].m_name); m_aim_grid.GetChild <AimItemView>(i).Visible = true; } if (m_isAcceptTask) { m_titleGet.Visible = false; ShowAcceptTaskTips(); ShowTaskTitle(confTask.rewardTitleId); } }
public static void Register() { ConfAchievement.Init(); ConfActiveDrop.Init(); ConfActivityBase.Init(); ConfAssetManifest.Init(); Confbranchtask.Init(); ConfBuilding.Init(); ConfCartoonScene.Init(); ConfChapter.Init(); ConfCharge.Init(); ConfChat.Init(); ConfChatItem.Init(); ConfCheckIn.Init(); ConfCombineFormula.Init(); ConfDemoScene.Init(); ConfDropOut.Init(); ConfPropGiftItem0.Init(); ConfPropGiftItem1.Init(); ConfPropGiftItem2.Init(); ConfDropOut2.Init(); Confetl.Init(); ConfEvent.Init(); ConfEventAttribute.Init(); ConfEventPhase.Init(); Confexhibit.Init(); ConfExpToLevel.Init(); Conffailtips.Init(); ConfFeedback.Init(); ConfFind.Init(); ConfFindClue.Init(); ConfFindTypeIcon.Init(); ConfGMCMD.Init(); ConfGuid.Init(); ConfGuidArt.Init(); ConfGuidNew.Init(); ConfGuidNewFunction.Init(); Confinapppurchase.Init(); ConfJigsawScene.Init(); ConfKeyWords.Init(); ConfLanguage.Init(); ConfMsgCode.Init(); ConfNode.Init(); ConfNpc.Init(); ConfOfficer.Init(); ConfPath.Init(); ConfPoliceRankIcon.Init(); ConfProp.Init(); ConfPropGift.Init(); ConfPropGiftItem0.Init(); ConfPropGiftItem1.Init(); ConfPropGiftItem2.Init(); ConfPush.Init(); ConfReasoning.Init(); ConfScene.Init(); ConfSceneDifficulty.Init(); ConfSceneSpecial.Init(); ConfServiceConfig.Init(); ConfSkill.Init(); ConfSkyEye.Init(); ConfSound.Init(); ConfTask.Init(); ConfTitle.Init(); }