まず、ReadAllLines()でテキストから配列を取得後、整数の配列に変換してリストに入れる。
lang
1List<int[]> locationList = new List<int[]>();
2
3string[] lines1 = File.ReadAllLines("Sample.txt",
4 System.Text.Encoding.GetEncoding("Shift_JIS"));
5
6int[] tmp = new int[];
7foreach(var item in lines1)
8{
9 string[] strTmp = item.Split(',');
10 tmp[0] = Convert.ToInt32(strTmp[0]);
11 tmp[1] = Convert.ToInt32(strTmp[1]);
12 locationList.Add(tmp);
13 tmp = new int[];
14}
次にリスト内の整数配列をPointに変換して、フォームの位置に代入しては?
lang
1Form form1 = new Form();
2form1.Location = new Point(locationList[0][0] , locationList[0][1]);
3Form form2 = new Form();
4form2.Location = new Point(locationList[1][0] , locationList[1][1]);
5・・・
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。