private void buttonCombine_Click(object sender, EventArgs e) { MapInfo mapInf0 = new MapInfo(this, 0); MapInfo mapInf1 = new MapInfo(this, 1); MapInfo mapInf2 = new MapInfo(this, 2); MapInfo mapInf3 = new MapInfo(this, 3); MapInfo mapInf4 = new MapInfo(this, 4); mapInf0.Create(); mapInf1.Open(); mapInf2.Open(); mapInf3.Open(); mapInf4.Open(); MapInfo.Data[] data1 = new MapInfo.Data[mapInf1.Width >> 3]; MapInfo.Data[] data2 = new MapInfo.Data[mapInf2.Width >> 3]; MapInfo.Data[] data3 = new MapInfo.Data[mapInf3.Width >> 3]; MapInfo.Data[] data4 = new MapInfo.Data[mapInf4.Width >> 3]; for (int f = 0; f < data1.Length; ++f) { data1[f].m_Bloak = mapInf1.ReadLine(); } for (int f = 0; f < data2.Length; ++f) { data2[f].m_Bloak = mapInf2.ReadLine(); } for (int f = 0; f < data3.Length; ++f) { data3[f].m_Bloak = mapInf3.ReadLine(); } for (int f = 0; f < data4.Length; ++f) { data4[f].m_Bloak = mapInf4.ReadLine(); } for (int f = 0; f < data1.Length; ++f) { mapInf0.Write(data1[f].m_Bloak); mapInf0.Write(data3[f].m_Bloak); } for (int f = 0; f < data1.Length; ++f) { mapInf0.Write(data2[f].m_Bloak); mapInf0.Write(data4[f].m_Bloak); } mapInf0.Close(); mapInf1.Close(); mapInf2.Close(); mapInf3.Close(); mapInf4.Close(); }
private void buttonCombine_Click(object sender, EventArgs e) { MapInfo mapInf0 = new MapInfo(this, 0); MapInfo mapInf1 = new MapInfo(this, 1); MapInfo mapInf2 = new MapInfo(this, 2); MapInfo mapInf3 = new MapInfo(this, 3); MapInfo mapInf4 = new MapInfo(this, 4); mapInf0.Create(); mapInf1.Open(); mapInf2.Open(); mapInf3.Open(); mapInf4.Open(); MapInfo.Data[] data1 = new MapInfo.Data[mapInf1.Width >> 3]; MapInfo.Data[] data2 = new MapInfo.Data[mapInf2.Width >> 3]; MapInfo.Data[] data3 = new MapInfo.Data[mapInf3.Width >> 3]; MapInfo.Data[] data4 = new MapInfo.Data[mapInf4.Width >> 3]; for(int f = 0; f < data1.Length; ++f) data1[f].m_Bloak = mapInf1.ReadLine(); for (int f = 0; f < data2.Length; ++f) data2[f].m_Bloak = mapInf2.ReadLine(); for (int f = 0; f < data3.Length; ++f) data3[f].m_Bloak = mapInf3.ReadLine(); for (int f = 0; f < data4.Length; ++f) data4[f].m_Bloak = mapInf4.ReadLine(); for (int f = 0; f < data1.Length; ++f) { mapInf0.Write(data1[f].m_Bloak); mapInf0.Write(data3[f].m_Bloak); } for (int f = 0; f < data1.Length; ++f) { mapInf0.Write(data2[f].m_Bloak); mapInf0.Write(data4[f].m_Bloak); } mapInf0.Close(); mapInf1.Close(); mapInf2.Close(); mapInf3.Close(); mapInf4.Close(); }