コード例 #1
0
 private void OpenFile()
 {
     OpenFileDialog ofd = new OpenFileDialog();
     ofd.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
     ofd.InitialDirectory = System.AppDomain.CurrentDomain.BaseDirectory;
     if (ofd.ShowDialog() == true)
     {
         String fullPath = ofd.FileName;
         deckUser = new DeckOfCards(fullPath);
         deckComputer = new DeckOfCards(fullPath);
     }
     EnableMenuItems();
     statusLabel.Content = "Decks created, click shuffle!";
 }