示例#1
0
 private void Save_Click(object sender, RoutedEventArgs e)
 {
     File file = new File();
     file.Save(History, result, Type);
 }
示例#2
0
        private void Load_Click(object sender, RoutedEventArgs e)
        {
            File file = new File();
            File.GameLoaded gloaded = file.Load();
            if (gloaded.Tags != null)
            {
                Type = GameType.HUMAN_HUMAN;
                ResetElements();
                canvas1.OnMove = null;
                History = gloaded.History;
                MoveFromHistory(History, History.Count);

                if (((string)gloaded.Tags["black"]).ToLower().Equals("computer"))
                {
                    Type = GameType.HUMAN_COMPUTER;
                    AttachComputer();
                }

                ((MenuItem)((MenuItem)menu1.Items[1]).Items[1]).IsEnabled = true;
                InternalOnMove();
            }
        }