static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); GameModel gameModel = new GameModel(); Table tableView = new Table(); MainForm MainFormView = new MainForm(gameModel, tableView); GameController gameController = new GameController(); tableView.Model = gameModel; gameController.Model = gameModel; gameController.TableView = tableView; gameController.MainView = MainFormView; Application.Run(MainFormView); }
public static void SerializeToXML(string filename, GameModel ob) { XmlSerializer serializer = new XmlSerializer(typeof(GameModel)); TextWriter textWriter = new StreamWriter(filename + ".xml"); serializer.Serialize(textWriter, ob); textWriter.Close(); }