コード例 #1
0
        public static bool GetConfig(string fieldName, object fieldValue, out ConfFind config)
        {
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_Find", 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("Find 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex));
                }
                config = null;
                return(false);
            }
            config = null;
            return(false);
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        void Refresh(long scan_id_)
        {
            ConfFind scan_data = ConfFind.Get(scan_id_);

            UpdateTime((double)scan_data.time);
            m_time_txt.Visible     = false;
            m_fly_time_txt.Text    = m_time_txt.Text;
            m_fly_time_txt.Visible = false;

            RefreshAnchors(scan_data);

            RefreshClueProgress(scan_data);
        }
コード例 #4
0
 private static void GetArrrayList()
 {
     if (cacheArray.Count <= 0)
     {
         DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_Find");
         if (sqReader != null)
         {
             while (sqReader.Read())
             {
                 ConfFind _conf = GetConfByDic(sqReader);
                 cacheArray.Add(_conf);
                 dic[_conf.id] = _conf;
             }
             resLoaded = true;
         }
     }
 }
コード例 #5
0
        public static bool GetConfig(long id, out ConfFind config)
        {
            if (dic.TryGetValue(id, out config))
            {
                return(config != null);
            }
            if (cacheLoaded)
            {
                config = null;
                return(false);
            }
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_Find", 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("Find 表找不到SN={0} 的数据\n{1}", id, ex));
                }
                config = null;
                return(false);
            }
            else
            {
                config = null;
                return(false);
            }
        }
コード例 #6
0
        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;
        }
コード例 #7
0
        private static ConfFind GetConfByDic(DataTable reader)
        {
            long id = reader.GetInt64(0);

            long[] finds3    = (long[])reader.GetArrayData(1, 17);
            int    findtype3 = reader.GetInt32(2);

            long[] finds2    = (long[])reader.GetArrayData(3, 17);
            int    findtype2 = reader.GetInt32(4);

            long[] finds1     = (long[])reader.GetArrayData(5, 17);
            int    findtype1  = reader.GetInt32(6);
            int    difficulty = reader.GetInt32(7);
            int    time       = reader.GetInt32(8);
            int    vit        = reader.GetInt32(9);
            int    type       = reader.GetInt32(10);
            string sceneId    = reader.GetString(11);
            string icon       = reader.GetString(12);
            string breviary   = reader.GetString(13);
            string descs      = reader.GetString(14);
            string name       = reader.GetString(15);

            ConfFind new_obj_ConfFind = new ConfFind(id,
                                                     finds3,
                                                     findtype3,
                                                     finds2,
                                                     findtype2,
                                                     finds1,
                                                     findtype1,
                                                     difficulty,
                                                     time,
                                                     vit,
                                                     type,
                                                     sceneId,
                                                     icon,
                                                     breviary,
                                                     descs,
                                                     name
                                                     );

            return(new_obj_ConfFind);
        }
コード例 #8
0
        void LoadExamineClueData(long scan_id_)
        {
            ConfFind scan_data = ConfFind.Get(scan_id_);

            Dictionary <int, HashSet <long> > examin_clue_datas = new Dictionary <int, HashSet <long> >();

            if (0 != scan_data.findtype1)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype1))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype1, new HashSet <long>(scan_data.finds1));
            }

            if (0 != scan_data.findtype2)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype2))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype2, new HashSet <long>(scan_data.finds2));
            }

            if (0 != scan_data.findtype3)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype3))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype3, new HashSet <long>(scan_data.finds3));
            }

            m_all_examin_clue_datas.Add(scan_id_, examin_clue_datas);
        }
コード例 #9
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            GameEvents.UIEvents.UI_Pause_Event.OnQuit                         += Quit;
            GameEvents.UIEvents.UI_Scan_Event.Listen_FindClue                 += FindClue;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RemoveClueAnchor         += RemoveClue;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleDetailItemView    += RecycleDetailItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleFlyIconItemView   += RecycleFlyIconItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShowFlyIconItemView      += ShowFlyIconItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_AddClueProgress          += AddClueProgress;
            GameEvents.UIEvents.UI_Scan_Event.Listen_VitEffectFinishFly       += RecycleFlyVitEffectAndPlayVitNum;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleFlyVitNumItemView += RecycleFlyVitNum;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShowReward               += ShowReward;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShakeFinished            += ShowVitIcon;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ResumeGame               += Resume;

            m_fly_vit_ts.AddTweenCompletedCallback(FlyVitFinished);

            MessageHandler.RegisterMessageHandler(MessageDefine.SCFindRewardResp, OnScResponse);

            if (null != param)
            {
                List <long> my_param = param as List <long>;
                this.m_scan_id = my_param[0];
                this.m_task_id = my_param[1];
            }


            ConfFind scan_data = ConfFind.Get(m_scan_id);

            m_cur_time       = m_total_time = scan_data.time;
            m_total_clue_num = GetTotalClueNumAndContent(m_scan_id);
            m_cur_clue_num   = 0;
            cur_game_finded_clues.Clear();
            m_reward_vit_num = 0;
        }
コード例 #10
0
 void RefreshAnchors(ConfFind scan_data_)
 {
     ScanDataManager.Instance.GetScanData(scan_data_.id, CreateClueAnchorsAndBGTex);
 }
コード例 #11
0
ファイル: ConfFact.cs プロジェクト: kingpowervrg/my_seeker
 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();
 }