static void Main(string[] args) { /// Creating an Application class is similar to creating windows and controls - first we need to define /// the options in an ApplicationInfo class. /// /// Here we give our application a title and a screen size. ApplicationInfo myApplicationInfo = new ApplicationInfo() { Title = "Sample1", ScreenSize = new Size(80,40) }; /// And then create it. Notice that the Application implements IDisposable, so placing this in a using... /// block ensures proper disposal of resources (including all of the IDispose objects carried over from /// libtcod). Actually starting the application is as easy as calling the Start method and specifying /// a previously constructed ApplicationInfo object. using (MyApplication myApp = new MyApplication()) { myApp.Start(myApplicationInfo); } }
static void Main(string[] args) { /// Creating an Application class is similar to creating windows and controls - first we need to define /// the options in an ApplicationInfo class. /// /// Here we give our application a title and a screen size. ApplicationInfo myApplicationInfo = new ApplicationInfo() { Title = "Sample1", ScreenSize = new Size(80, 40) }; /// And then create it. Notice that the Application implements IDisposable, so placing this in a using... /// block ensures proper disposal of resources (including all of the IDispose objects carried over from /// libtcod). Actually starting the application is as easy as calling the Start method and specifying /// a previously constructed ApplicationInfo object. using (MyApplication myApp = new MyApplication()) { myApp.Start(myApplicationInfo); } }