1using System.Collections.Generic;
15 public static Dictionary<string, List<Item>>
dict;
17 public static List<Item>
listAll =
new List<Item>();
23 dict =
new Dictionary<string, List<Item>>();
27 static void AddDir(
string path)
29 DirectoryInfo directoryInfo =
new DirectoryInfo(path);
31 FileInfo[] files = directoryInfo.GetFiles();
32 foreach (FileInfo fileInfo
in files)
34 if (!(fileInfo.Extension !=
".txt"))
36 string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.Name);
37 List<Item> list =
dict.TryGetValue(fileNameWithoutExtension);
38 StreamReader streamReader =
new StreamReader(fileInfo.FullName);
40 while (!streamReader.EndOfStream)
42 string text2 = streamReader.ReadLine();
43 if (!
string.IsNullOrEmpty(text2))
45 if (text2.StartsWith(
'@') &&
item !=
null)
47 string[] array = text2.TrimStart(
'@').Split(
',');
48 foreach (
string item2
in array)
50 item.listImageId.Add(item2);
53 else if (text ==
null)
66 list =
new List<Item>();
67 dict.Add(fileNameWithoutExtension, list);
84 List<Item> list =
new List<Item>();
85 for (
int i = 0; i < 1000; i++)
88 if (!list.Contains(
item))
List< string > listImageId
static List< Item > GetNews(int seed)
static Dictionary< string, List< Item > > dict
static List< Item > listAll
static void SetSeed(int a=-1)