• 大小: 178KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-31
  • 语言: C#
  • 标签: c#  WPF  .net  

资源简介

cs WPF 井字棋游戏 c#语言 制作游戏的学习范例

资源截图

代码片段和文件信息

/****************************** Module Header ******************************\
*   Module Name:  
*   Project:
* Copyright (c) Microsoft Corporation.

*  The CSWPFMVVMPractice demo demonstrates how to implement the MVVM patten in a 
*  WPF application.
*  
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
* All other rights reserved.

* THIS CODE AND INFORMATION IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND 
* EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED 
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System.Windows;

namespace CSWPFMVVMPractice
{
    public partial class App : Application
    {
        protected override void onstartup(StartupEventArgs e)
        {
            base.onstartup(e);         
            // Create a TicTacToeViewModel object with dimension of 3 and start a new game            
            TicTacToeViewModel game = new TicTacToeViewModel(3);
            game.NewGame();
            
            
            // Create an instance of the MainWindow and set the TicTacToeViewModel instance 
            // as the data context of the MainWindow            
            MainWindow win = new MainWindow();
            win.DataContext = game;

            // Set the attached GameoverBehavior.ReportResult property to true on the MainWindow            
            win.SetValue(GameOverBehavior.ReportResultProperty true);
            
            // Show the MainWindow            
            win.Show();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-19 11:16  Debug\
     文件        1869  2012-12-19 11:16  Debug\CSWPFMVVMPractice.application
     文件       46080  2012-12-19 11:16  Debug\CSWPFMVVMPractice.exe
     文件         144  2012-11-28 12:38  Debug\CSWPFMVVMPractice.exe.config
     文件        3915  2012-12-19 11:16  Debug\CSWPFMVVMPractice.exe.manifest
     文件       71168  2012-12-19 11:16  Debug\CSWPFMVVMPractice.pdb
     文件        1869  2012-12-19 11:16  Debug\CSWPFMVVMPractice.vshost.application
     文件       22472  2012-12-19 13:35  Debug\CSWPFMVVMPractice.vshost.exe
     文件         144  2012-11-28 12:38  Debug\CSWPFMVVMPractice.vshost.exe.config
     文件        3915  2012-12-19 11:16  Debug\CSWPFMVVMPractice.vshost.exe.manifest
     文件        2543  2013-01-04 09:42  51Aspx源码必读.txt
     文件         941  2012-11-28 12:38  CSWPFMVVMPractice.sln
     文件         256  2012-11-28 12:38  CSWPFMVVMPractice.vssscc
     文件        4945  2007-07-18 09:38  from.gif
     文件         123  2011-04-15 09:12  最新Asp.Net源码下载.url
     目录           0  2012-12-19 11:16  CSWPFMVVMPractice\
     文件         144  2012-11-28 12:38  CSWPFMVVMPractice\app.config
     文件         271  2012-11-28 12:38  CSWPFMVVMPractice\App.xaml
     文件        1755  2012-11-28 12:38  CSWPFMVVMPractice\App.xaml.cs
     目录           0  2012-12-19 11:16  CSWPFMVVMPractice\AttachedBehavior\
     文件        3315  2012-11-28 12:38  CSWPFMVVMPractice\AttachedBehavior\ChangeDimensionBehavior.cs
     文件        3462  2012-11-28 12:38  CSWPFMVVMPractice\AttachedBehavior\GameOverBehavior.cs
     文件        3756  2012-11-28 12:38  CSWPFMVVMPractice\AttachedBehavior\ShutdownBehavior.cs
     文件        8097  2012-11-28 12:38  CSWPFMVVMPractice\CSWPFMVVMPractice.csproj
     文件         257  2012-11-28 12:38  CSWPFMVVMPractice\CSWPFMVVMPractice.csproj.vspscc
     目录           0  2012-12-19 11:16  CSWPFMVVMPractice\Documentation\
     文件       59015  2012-11-28 12:38  CSWPFMVVMPractice\Documentation\ReadMe.htm
     目录           0  2012-12-19 11:16  CSWPFMVVMPractice\Documentation\ReadMe_files\
     文件         314  2012-11-28 12:38  CSWPFMVVMPractice\Documentation\ReadMe_files\colorschememapping.xml
     文件         304  2012-11-28 12:38  CSWPFMVVMPractice\Documentation\ReadMe_files\filelist.xml
     文件       19559  2012-11-28 12:38  CSWPFMVVMPractice\Documentation\ReadMe_files\image001.png
............此处省略48个文件信息

评论

共有 条评论