public ComosWebOnlineFirst(ComosWeb comosweb) { m_Platform = Services.XServices.Instance.GetService <Services.IPlatformSystem>(); m_ComosWebOnline = comosweb; m_Url = comosweb.URL; m_Database = Services.XServices.Instance.GetService <Services.IDatabase>(); m_ComosWebOffline = new ComosWebOffline(m_Database, comosweb.URL); }
static void Main(string[] args) { Context ctx = new Context(); IPlatformSystem platformSystem = ctx.Add <Sdl.SdlPlatformSystem>(); JobSystem jobSystem = ctx.Add <JobSystem>(); ctx.Add <Sdl.SdlInputSystem>(); ctx.Add <Sdl.SdlSwapChainSystem>(); Sdl.SdlSpriteRenderSystem spriteRenderSyetem = ctx.Add <Sdl.SdlSpriteRenderSystem>(); ctx.Init(); Sdl.Sprite player = spriteRenderSyetem.LoadSprite("Content/Player.png"); while (platformSystem.Run) { jobSystem.BeginFrame(); spriteRenderSyetem.PlaceSprite(player); jobSystem.CompliteFrame(); } }
public IDatabase Open(string filename) { try { m_PlatformSystem = XServices.Instance.GetService <IPlatformSystem>(); string folder = m_PlatformSystem.GetPersonalFolderPath(); string dbname = System.IO.Path.Combine(folder, filename); //m_PlatformSystem.DeleteFile(dbname); m_DB = new SqliteConnection("Data Source=" + dbname); m_DB.Open(); if (!m_PlatformSystem.FileExists(dbname)) { throw new Exception("Failed to create database!"); } CreateTablesIfNotExists(); } catch (Exception e) { throw e; } return(this); }