void LayoutTVFindUpdate() { ComparerFind f = new ComparerFind(ref data.chara, find); Array.Sort(sortedList, new ComparerMulti(new System.Collections.IComparer[] { f, new ComparerUpdate(ref data.chara), new ComparerABC(ref data.chara) })); bool bFound = true; TreeNode nodeFind = new TreeNode("条件に一致"); tvChara.Nodes.Add(nodeFind); for (int i = 0; i < data.chara.Length; i++) { int j = sortedList[i]; if (f.match[j] != bFound) { bFound = false; nodeFind = new TreeNode("条件に不一致"); tvChara.Nodes.Add(nodeFind); } nodeFind.Nodes.Add(j.ToString(), data.chara[sortedList[i]].update.ToString("yyyy/MM/dd HH:mm:ss") + " " + data.chara[j].name[0]); } }
void LayoutTVFindGraphics() { ComparerFind f = new ComparerFind(ref data.chara, find); Array.Sort(sortedList, new ComparerMulti(new System.Collections.IComparer[] { f, new ComparerGraphics(ref data.chara), new ComparerABC(ref data.chara) })); string currentExt = null; bool bFound = true; TreeNode nodeExt = null, nodeFind = new TreeNode("条件に一致"); tvChara.Nodes.Add(nodeFind); for (int i = 0; i < data.chara.Length; i++) { int j = sortedList[i]; if (f.match[j] != bFound) { bFound = false; nodeFind = new TreeNode("条件に不一致"); tvChara.Nodes.Add(nodeFind); currentExt = null; } if (Path.GetExtension(data.chara[j].graphic) != currentExt) { currentExt = Path.GetExtension(data.chara[j].graphic); nodeExt = new TreeNode(currentExt != "" ? currentExt : "なし"); nodeFind.Nodes.Add(nodeExt); } nodeExt.Nodes.Add(j.ToString(), data.chara[j].name[0]); } }
void LayoutTVFindSex() { ComparerFind f = new ComparerFind(ref data.chara, find); Array.Sort(sortedList, new ComparerMulti(new System.Collections.IComparer[] { f, new ComparerSex(ref data.chara), new ComparerABC(ref data.chara) })); bool bFound = true; int currentSex = -1; TreeNode nodeFind = new TreeNode("条件に一致"), nodeSex = null; tvChara.Nodes.Add(nodeFind); for (int i = 0; i < data.chara.Length; i++) { int j = sortedList[i]; if (f.match[j] != bFound) { bFound = false; nodeFind = new TreeNode("条件に不一致"); tvChara.Nodes.Add(nodeFind); currentSex = -1; } if ((int)data.chara[j].sex != currentSex) { currentSex = (int)data.chara[j].sex; nodeSex = new TreeNode(CharaData.GetSex(data.chara[j].sex)); nodeFind.Nodes.Add(nodeSex); } nodeSex.Nodes.Add(j.ToString(), data.chara[j].name[0]); } }
void LayoutTVFindGame() { ComparerFind f = new ComparerFind(ref data.chara, find); Array.Sort(sortedList, new ComparerMulti(new System.Collections.IComparer[] { f, new ComparerGame(ref data.chara), new ComparerABC(ref data.chara) })); bool bFound = true; string currentGame = null; TreeNode nodeFind = new TreeNode("条件に一致"), nodeGame = null; tvChara.Nodes.Add(nodeFind); for (int i = 0; i < data.chara.Length; i++) { int j = sortedList[i]; if (f.match[j] != bFound) { bFound = false; nodeFind = new TreeNode("条件に不一致"); tvChara.Nodes.Add(nodeFind); currentGame = null; } if (data.chara[j].game[0] != currentGame) { currentGame = data.chara[j].game[0]; nodeGame = new TreeNode(currentGame); nodeFind.Nodes.Add(nodeGame); } nodeGame.Nodes.Add(j.ToString(), data.chara[j].name[0]); } }