align="justify">};
} ClearTable ()
{(int i = 0; i <10; i + +) (int j = 0; j <19; j + +). table [i, j] = false;. Inv ();
} GameOver (string name)
{
gOver = true;. MF.gOver (name);
}
}
}
КлассMainWindow - відповідає за обробку всіх подій пристроїв введення, а так само відображення інформації на екран користувачеві поточної
{: Form
{game = ""; fullPaint = true; nextPaint = false; MF; thrTime; Build_ = newBuild (); Shape_ = newShape (); Tanks_ = null; [,] table = newbool [10, 19]; Inv ()
{
MF.PanelPad.Invalidate ();
} EndGame ()
{_build End = newEnd_build ();
End.ShowDialog ();
} toRecords (string name)
{
listView1.Items.Add (name);
listView1.Items [listView1.Items.Count - 1]. SubItems.Add (Build.Score.ToString ());
listView1.Items [listView1.Items.Count - 1]. SubItems.Add (Build.Level.ToString ());
listView1.Items [listView1.Items.Count - 1]. SubItems.Add (Build.LinesRemoved.ToString ());
listView1.Items [listView1.Items.Count - 1]. SubItems.Add (Build.mode.ToString ());
Sort ();
saveRecords ();
} saveRecords ()
{tw = newStreamWriter ("records.dat", false); (ListViewItem item inthis.listView1.Items)
{(ListViewItem.ListViewSubItem subItem in item.SubItems)
{
tw.WriteLine (subItem.Text);
}
}. Close ();
} Sort (int e = 2)
{
// Create an instance of the ColHeader class.clickedCol = (ColHeader) this.listView1.Columns [e];
// Set the ascending property to sort in the opposite order.
clickedCol.ascending =! clickedCol.ascending;
// Get the number of items in the list.numItems = this.listView1.Items.Count;
// Turn off display while data is repoplulated .. listView1.BeginUpdate ();
// Populate an ArrayList with a SortWrapper of each list item.SortArray = newArrayList (); (int i = 0; i
{
SortArray.Add (newSortWrapper (this.listView1.Items [i], e));
}
// Sort the elements in the ArrayList using a new instance of the SortComparer
// class. The parameters are the star...