/// <summary> /// コンストラクター /// </summary> /// <param name="path">パス</param> /// <param name="enc">エンコード</param> public ProxyController(string path, Encoding enc) { //結果リスト resultList = new LstShufflableList<string>(); //プロキシィリストを読み込む loadProxyList(path, enc); //カウント cnt = 0; }
public ResLpsSummaryNews2JsonList(string url, LstShufflableList<ResLpsSummaryNews2Json> lstNews) { this.lstNews = lstNews; }
protected ObjBody selectBody(LstShufflableList<ObjBody> lst) { if (lst.Count > 0) { lst.Shuffle(); return lst[LpsLiplisUtil.getRandamInt(0, lst.Count)]; } return normalList[0]; }
protected LstShufflableList<ObjBody> readResultDef(string emotion, int num) { try { LstShufflableList<ObjBody> lst = new LstShufflableList<ObjBody>(); for (int idx = 1; idx <= num; idx++) { lst.Add(new ObjBodyDef(emotion, idx.ToString())); } return lst; } catch (Exception err) { LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, err.ToString()); return new LstShufflableList<ObjBody>(); } }
protected virtual LstShufflableList<ObjBody> readResult(string b11, string b12, string b21, string b22, string b31, string b32, string touch) { LstShufflableList<ObjBody> result = new LstShufflableList<ObjBody>(); int idx = 0; List<string> b11l = new List<string>(); List<string> b12l = new List<string>(); List<string> b21l = new List<string>(); List<string> b22l = new List<string>(); List<string> b31l = new List<string>(); List<string> b32l = new List<string>(); List<string> tl = new List<string>(); readXmlList(xmlDoc.SelectNodes(b11), b11l); readXmlList(xmlDoc.SelectNodes(b12), b12l); readXmlList(xmlDoc.SelectNodes(b21), b21l); readXmlList(xmlDoc.SelectNodes(b22), b22l); readXmlList(xmlDoc.SelectNodes(b31), b31l); readXmlList(xmlDoc.SelectNodes(b32), b32l); //タッチリスト作成 if (touch.Length > 0) { readXmlList(xmlDoc.SelectNodes(touch), tl); } else { foreach (string r11 in b11l) { tl.Add(""); } } //リストを回してオブジェクト生成 foreach (string r11 in b11l) { try { result.Add(new ObjBodyGen(b11l[idx], b12l[idx], b21l[idx], b22l[idx], b31l[idx], b32l[idx], tl[idx],LpsPathControllerCus.getBodyPath(loadSkin))); } catch { continue; } idx++; } return result; }
protected void initList() { normalList = new LstShufflableList<ObjBody>(); joyPList = new LstShufflableList<ObjBody>(); joyMList = new LstShufflableList<ObjBody>(); admirationPList = new LstShufflableList<ObjBody>(); admirationMList = new LstShufflableList<ObjBody>(); peacePList = new LstShufflableList<ObjBody>(); peaceMList = new LstShufflableList<ObjBody>(); ecstasyPList = new LstShufflableList<ObjBody>(); ecstasyMList = new LstShufflableList<ObjBody>(); amazementPList = new LstShufflableList<ObjBody>(); amazementMList = new LstShufflableList<ObjBody>(); ragePList = new LstShufflableList<ObjBody>(); rageMList = new LstShufflableList<ObjBody>(); interestPList = new LstShufflableList<ObjBody>(); interestMList = new LstShufflableList<ObjBody>(); respectPList = new LstShufflableList<ObjBody>(); respectMList = new LstShufflableList<ObjBody>(); calmlyPList = new LstShufflableList<ObjBody>(); calmlyMList = new LstShufflableList<ObjBody>(); proudPList = new LstShufflableList<ObjBody>(); proudMList = new LstShufflableList<ObjBody>(); sitdownList = new LstShufflableList<ObjBody>(); }
public ObjTouch(string name, int type, int sens, int top, int left, int bottom, int right, LstShufflableList<string> chatList) { this.name = name; this.top = top; this. type = type; this.sens = sens; this.left = left; this.bottom = bottom; this.right = right; this.rect = new Rectangle(top, left, right - left, bottom - top); this.chatList = chatList; this.sennsitivityCnt = 0; this.setSennsitivity(); }
private LstShufflableList<int> getTargetTypeList(string type) { int idx = 0; LstShufflableList<int> result = new LstShufflableList<int>(); try { //登録されている定型文から、nameが一致するものを探す foreach (string n in typeList) { if (n.Equals(type)) { result.Add(idx); } idx++; } //シャッフルした結果から0番目のものを返す。 return result; } catch { return new LstShufflableList<int>(); } }
private MsgShortNews getMacheGreet(LstShufflableList<int> idxList) { MsgShortNews result = new MsgShortNews(); LstShufflableList<int> resList = new LstShufflableList<int>(); string[] timeList; string[] startList; string[] endList; int nowHour = 0; int nowMin = 0; int startHour = 0; int startMin = 0; int endHour = 0; int endMin = 0; try { //インデックスリストを回してチェック foreach (int idx in idxList) { Application.DoEvents(); try { if (!prerewuisteList[idx].Equals("")) { timeList = prerewuisteList[idx].Split(','); startList = timeList[0].Split(':'); endList = timeList[1].Split(':'); if (startList.Length == 2 && endList.Length == 2) { DateTime cal1 = DateTime.Now; nowHour = cal1.Hour; nowMin = cal1.Minute; startHour = int.Parse(startList[0]); startMin = int.Parse(startList[1]); endHour = int.Parse(endList[0]); endMin = int.Parse(endList[1]); //スタートアワーの場合、分を確認 if (nowHour == startHour && nowMin >= startMin) { if (nowHour == endHour && nowMin <= endMin) { resList.Add(idx); } else if (nowHour < endHour) { resList.Add(idx); } } else if (nowHour >= startHour) { if (nowHour == endHour && nowMin <= endMin) { resList.Add(idx); } else if (nowHour < endHour) { resList.Add(idx); } } } } } catch { continue; } } //取得したけっかから一つ選んで返す if (resList.Count > 0) { if (nameList.Count > 0) { resList.Shuffle(); int tarIdx = resList[0]; try { result = new MsgShortNews(discriptionList[tarIdx] + " ", emotionList[tarIdx], emotionList[tarIdx]); } catch { result = new MsgShortNews("", 0, 0); } } else { result = new MsgShortNews("", 0, 0); } } //取得グリートメッセージのあっとマークを改行に変換しておく result.result = result.result.Replace("@", Environment.NewLine); return result; } catch { return new MsgShortNews("", 0, 0); } }