本文整理汇总了C#中MainWindow.enableRollButton方法的典型用法代码示例。如果您正苦于以下问题:C# MainWindow.enableRollButton方法的具体用法?C# MainWindow.enableRollButton怎么用?C# MainWindow.enableRollButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWindow
的用法示例。
在下文中一共展示了MainWindow.enableRollButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Laad_Click
private void Laad_Click(object sender, RoutedEventArgs e)
{
// Displays an OpenFileDialog so the user can select a Cursor.
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "Text Files|*.txt";
openFileDialog1.Title = "Select a Text File";
// Show the Dialog.
// If the user clicked OK in the dialog and
// a .CUR file was selected, open it.
if (openFileDialog1.ShowDialog() == true)
{
// Assign the cursor in the Stream to the Form's Cursor property.
System.IO.StreamReader sr = new
System.IO.StreamReader(openFileDialog1.FileName);
main = new MainWindow(this);
List<string> lines = new List<string>();
string line;
while ((line = sr.ReadLine()) != null)
{
lines.Add(line);
}
string[] strarray = new string[8];
strarray = lines.ToArray();
int players, humans;
string[] array1 = strarray[0].Split('=');
string[] array2 = strarray[1].Split('=');
Int32.TryParse(array1[1], out players);
Int32.TryParse(array2[1], out humans);
main.TheGame.startGame(strarray, players, humans);
//main.TheGame.startFromFile(strarray);
main.Visibility = Visibility.Visible;
main.colorEllipses(main.TheGame.board.playerList);
main.enableRollButton();
sr.Close();
this.Close();
}
}