public void FillData() { SQLiteTableReader reader = new SQLiteTableReader(null, Program.DbPath); reader.Connect(); DataTable missionTable = reader.ExecuteQuery("SELECT tm.id as id, tm.item_id as item_id, tm.item_num as item_num, t0.text as MissionText FROM (SELECT id, item_id, item_num FROM mission_data) as tm, (SELECT \"index\", text FROM text_data WHERE category=67) as t0 WHERE tm.id = t0.\"index\""); reader.Disconnect(); for (int i = 0; i < missionTable.Rows.Count; i++) { MissionData data = new MissionData(); data.Id = (long)missionTable.Rows[i]["id"]; data.ItemId = (long)missionTable.Rows[i]["item_id"]; data.ItemCount = (long)missionTable.Rows[i]["item_num"]; data.SetMissionText(((string)missionTable.Rows[i]["MissionText"]).Replace("\\n", "")); if (!MissionDataList.Exists(a => a.MissionText.Equals(data.MissionText))) { string transText = Program.TransDict.GetTranslation(transDict, data.MissionText); if (string.IsNullOrEmpty(transText)) { transText = string.Empty; } data.TransMissionText = transText; MissionDataList.Add(data); } } }