📄 main.cs
字号:
using System;
using System.Drawing;
using Microsoft.DirectX;
using Container = System.ComponentModel.Container;
/// <summary>
/// The main windows form for the application.
/// </summary>
public class MainClass
{
private GameClass game = null;
private SplashScreen splash = null;
private bool enableNetwork = false;
public bool EnableNetwork { get { return enableNetwork; } set { enableNetwork = value; } }
private Size gameFormSize;
public Size GameFormSize { get { return gameFormSize; } set { gameFormSize = value; } }
private bool fullScreen = false;
public bool FullScreen { get { return fullScreen; } set { fullScreen = value; } }
/// <summary>
// Main entry point of the application.
/// </summary>
public static void Main()
{
MainClass m = new MainClass();
}
public MainClass()
{
//display the splash screen and determine network status
splash = new SplashScreen(this);
splash.ShowDialog();
try
{
game = new GameClass(fullScreen, gameFormSize, enableNetwork);
}
catch(DirectXException)
{
return;
}
if( game.CreateGraphicsSample() )
game.Run();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -