示例#1
0
文件: Program.cs 项目: hcesar/Chess
        private static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            //AllocConsole();
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            Application.SetCompatibleTextRenderingDefault(false);

            var sidePlayer = new SidePlayer();
            var chessForm = new ChessForm(sidePlayer);
            sidePlayer.ChessForm = chessForm;

            new Thread(() =>
            {
                Application.EnableVisualStyles();
                Application.Run(sidePlayer);
            }).Start();

            Application.EnableVisualStyles();
            Application.Run(chessForm);
        }
示例#2
0
文件: ChessForm.cs 项目: hcesar/Chess
 public ChessForm(SidePlayer sidePlayer)
 {
     this.sidePlayer = sidePlayer;
     this.boardControl = new Chess.App.BoardControl();
     InitializeComponent();
 }