Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CampaignRepositorySql da = new CampaignRepositorySql();

            CampaignInfo cinfo = new CampaignInfo()
            {
                campaignId = "",
                campaignName = "test",
                FieldDimension = new clsSektorKoordinaten(6, 6, 0),
                ListPlayerInfo = new List<PlayerInfo>(){ new PlayerInfo(){playerName = "asdf"} }
            };

            CampaignController ctrl = (CampaignController) da.createNewCampaign(cinfo);

            //GcmlDataAccessEF data = new GcmlDataAccessEF();

            //PlayerInfo pinfo = data.getPlayer("test123");

            //data.createNewCampaign(cinfo);

            //GcmlDataAccess.GcmlDataAccessEF accessSqlServer = new GcmlDataAccess.GcmlDataAccessEF();
            //accessSqlServer.safeCampaignState(state);
            //state.ListPlayers.Add(new PlayerInfo() { playerId = "1234", playerName = "asdf" });

            //accessSqlServer.safeCampaignState(state);
        }
Exemplo n.º 2
0
 static void Main( string[] args )
 {
     // This sample uses an ApplicationMutex to prevent running the game multiple times at once.
     // Useful for games where progress or settings might be overwritten if two instances are running at the same time.
     gcmlData = new CampaignRepositorySql();
     using( NuclearWinter.ApplicationMutex mutex = new NuclearWinter.ApplicationMutex() )
     {
         if( mutex.HasHandle )
         {
             using( GCML_XNA_Client game = new GCML_XNA_Client() )
             {
                 game.Run();
             }
         }
         else
         {
             System.Windows.Forms.MessageBox.Show( "An instance of NuclearSample is already running.", "Could not start NuclearSample", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Stop );
         }
     }
 }