public static bool GetConfig(string fieldName, object fieldValue, out ConfFindTypeIcon config) { DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_FindTypeIcon", 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("FindTypeIcon 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex)); } config = null; return(false); } config = null; return(false); }
public override void OnShow(object param) { base.OnShow(param); long scan_id = 0; if (null != param) { List <long> my_param = param as List <long>; scan_id = my_param[0]; } ConfFind scan_data = ConfFind.Get(scan_id); m_time_txt.Text = CommonTools.SecondToStringMMSS((double)scan_data.time); m_desc_txt.Text = LocalizeModule.Instance.GetString(scan_data.descs); Dictionary <int, HashSet <long> > scan_datas = ScanDataManager.Instance.Examin_clue_datas(scan_id); m_examine_grid.EnsureSize <ExamineItemView>(scan_datas.Keys.Count); int i = 0; foreach (var kvp in scan_datas) { int scan_type = kvp.Key; var item = m_examine_grid.GetChild <ExamineItemView>(i); item.Refresh(ConfFindTypeIcon.Get(scan_type).icon, $"{ConfFindTypeIcon.Get(scan_type).name} {kvp.Value.Count}"); item.Visible = true; ++i; } }
private static ConfFindTypeIcon GetConfByDic(DataTable reader) { int id = reader.GetInt32(0); string icon = reader.GetString(1); string name = reader.GetString(2); ConfFindTypeIcon new_obj_ConfFindTypeIcon = new ConfFindTypeIcon(id, icon, name ); return(new_obj_ConfFindTypeIcon); }
private static void GetArrrayList() { if (cacheArray.Count <= 0) { DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_FindTypeIcon"); if (sqReader != null) { while (sqReader.Read()) { ConfFindTypeIcon _conf = GetConfByDic(sqReader); cacheArray.Add(_conf); dic[_conf.id] = _conf; } resLoaded = true; } } }
public static bool GetConfig(int id, out ConfFindTypeIcon config) { if (dic.TryGetValue(id, out config)) { return(config != null); } if (cacheLoaded) { config = null; return(false); } DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_FindTypeIcon", 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("FindTypeIcon 表找不到SN={0} 的数据\n{1}", id, ex)); } config = null; return(false); } else { config = null; return(false); } }
void RefreshClueProgress(ConfFind scan_data) { Dictionary <int, HashSet <long> > scan_datas = ScanDataManager.Instance.Examin_clue_datas(scan_data.id); m_clue_progress_grid.EnsureSize <ClueProgressItemView>(scan_datas.Keys.Count); int i = 0; foreach (var kvp in scan_datas) { int scan_type = kvp.Key; var item = m_clue_progress_grid.GetChild <ClueProgressItemView>(i); item.Refresh(scan_type, ConfFindTypeIcon.Get(scan_type).icon, kvp.Value.Count); item.Visible = true; ++i; } m_clue_progress_grid.Visible = false; }
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(); }