/// <summary> /// Load and Initialize Game Components /// </summary> public override void LoadContent() { DepthStencilState depthState = new DepthStencilState(); depthState.DepthBufferEnable = true; depthState.DepthBufferWriteEnable = true; ScreenManager.GraphicsDevice.DepthStencilState = depthState; //Start New Game player = new Avatar(ScreenManager); player.Initialize(); components.Add(player); staticEnvironment = new StaticEnvironment(ScreenManager, ScreenManager.Game, ScreenManager.Game.GraphicsDevice); staticEnvironment.Initialize(); components.Add(staticEnvironment); //start SSVEP stimuli ssvep = new SSVEP(ScreenManager); ssvep.Initialize(); ssvep.DrawOrder = 2; components.Add(ssvep); //Establish BCI2000 comm bciComm = new BCI2000comm(ScreenManager.Game); bciComm.Initialize(); components.Add(bciComm); }
private void CreateWorker() { string wixPath = StaticEnvironment.GetFilePath(Constants.Product.Sdk, Constants.Folder.Bin, "wix.dll", "LinkMe.Framework.Sdk"); // If not found then use this assembly's location. if (wixPath == null) { wixPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); } m_domain = new RemoteDomain(Path.GetDirectoryName(wixPath)); m_wixWorker = m_domain.CreateWixWorker(); // Use the obj sub-folder of the project path as the build folder. string buildFolder = Path.Combine(Path.GetDirectoryName(m_options.ProjectFullPath), Constants.Folder.Obj); string msmFile = m_options.MergeModuleFile; if (Path.GetExtension(msmFile) == ".msm") { msmFile = msmFile.Substring(0, msmFile.Length - 4) + (m_isWin64 ? ".x64" : ".x86") + ".msm"; } else { msmFile += (m_isWin64 ? ".x64" : ".x86"); } System.Version version = m_options.Version == null ? null : (System.Version)m_options.Version.Clone(); string manufacturer = m_options.Manufacturer; m_wixWorker.Initialise(m_isWin64, buildFolder, msmFile, m_options.Guid, version, manufacturer); }
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment) { #if DEBUG Warm("-"); NoteCalls(this.rator); NoteCalls(this.rand0); NoteCalls(this.rand1); rand0TypeHistogram.Note(this.rand0Type); rand1TypeHistogram.Note(this.rand1Type); SCode.location = "StaticLet2"; #endif object ev1; Environment env = environment; Control unev = this.rand1; while (unev.EvalStep(out ev1, ref unev, ref env)) { } ; #if DEBUG SCode.location = "StaticLet2"; #endif if (ev1 == Interpreter.UnwindStack) { ((UnwinderState)env).AddFrame(new Combination2Frame0(this, environment)); environment = env; answer = Interpreter.UnwindStack; return(false); } object ev0; env = environment; unev = this.rand0; while (unev.EvalStep(out ev0, ref unev, ref env)) { } ; #if DEBUG SCode.location = "StaticLet2"; #endif if (ev0 == Interpreter.UnwindStack) { ((UnwinderState)env).AddFrame(new Combination2Frame1(this, environment, ev1)); environment = env; answer = Interpreter.UnwindStack; return(false); } object [] cells = environment.GetValueCells(this.lambda.StaticMapping); #if DEBUG SCode.location = "StaticLet2"; #endif // StaticClosure cl = new StaticClosure ((StaticLambda) this.rator, environment); StaticClosure cl = new StaticClosure(this.lambda, environment.BaseEnvironment, cells); expression = this.body; environment = new StaticEnvironment(cl, new object [] { ev0, ev1 }); answer = null; return(true); }
public override bool Continue(out object answer, ref Control expression, ref Environment environment, object value) { StaticClosure cl = new StaticClosure(this.expression.lambda, environment.BaseEnvironment, environment.GetValueCells(this.expression.staticMapping)); expression = this.expression.body; environment = new StaticEnvironment(cl, new object [] { value }); answer = null; return(true); }
private IList <FeaturedEmployerModel> GetFeaturedEmployers() { return((from e in _featuredQuery.GetFeaturedEmployers() orderby e.LogoOrder select new FeaturedEmployerModel { Name = e.Name, SearchUrl = SearchRoutes.Search.GenerateUrl(new { advertiser = e.Name, sortOrder = 2 }), LogoUrl = new ContentUrl(StaticEnvironment.GetFileVersion(Assembly.GetExecutingAssembly()), e.LogoUrl) }).ToList()); }
public void TestBundleVersion() { // Bundle versions change across releases, which sometimes means that old versions are asked for. // These need to be redirected to the current version. var otherVersionUrl = new ReadOnlyApplicationUrl("~/bundle/12.7.3.3/css/site1.aspx?v=J_B3Ka2u_VXMW5uzq-yJCcXh4nB_AJAzw-ObqkEnyWE1"); var version = StaticEnvironment.GetFileVersion(Assembly.GetExecutingAssembly()); var currentVersionUrl = new ReadOnlyApplicationUrl("~/bundle/" + version + "/css/site1.aspx?v=J_B3Ka2u_VXMW5uzq-yJCcXh4nB_AJAzw-ObqkEnyWE1"); AssertNoRedirect(currentVersionUrl); AssertRedirect(otherVersionUrl, currentVersionUrl, currentVersionUrl); }
public static void SetInstallFolder(string installFolder, EnvironmentType environmentType) { // Set the environment values for the product itself. StaticEnvironment.SetInstallFolder(installFolder); StaticEnvironment.SetInstallType(environmentType); // Set the environment values for the SDK as well. StaticEnvironment.SetInstallFolder(Environment.Constants.Product.Sdk, installFolder); StaticEnvironment.SetInstallType(Environment.Constants.Product.Sdk, environmentType); Console.WriteLine("Install folder set to '" + installFolder + "'."); }
public bool Apply(out object answer, ref Control expression, ref Environment environment, object [] args) { #if DEBUG this.BumpCallCount(); SCode.location = "StaticClosure.Apply"; SCode.NoteCalls(this, this.closureLambda.Body); #endif if (args.Length != this.arity) { throw new NotImplementedException(); } expression = this.closureLambda.Body; environment = new StaticEnvironment(this, args); answer = null; // keep the compiler happy return(true); }
public override int Save(string fileToBeSaved, int remember, uint formatIndex) { // Would like to add the targets import in InitializeProjectProperties but // using relative paths can cause issues when the project is created from the template // where the relative import path is evaluated against the template path rather // than the eventual project path. // If the file name here and the the file name on the build engine's project // are the same then fix up the import. if (string.Compare(fileToBeSaved, BuildProject.FullFileName, true) == 0) { string[] targetsFiles = GetProjectTargetsFiles(); if (targetsFiles != null) { foreach (string targetsFile in targetsFiles) { // Look for the targets import. bool found = false; foreach (Import import in BuildProject.Imports) { if (string.Compare(Path.GetFileName(import.EvaluatedProjectPath), targetsFile, true) == 0) { found = true; break; } } if (!found) { // Add the import now. string projectPath = Path.GetDirectoryName(FileName); string targetsPath = StaticEnvironment.GetFilePath(Constants.Product.Sdk, Path.Combine(Constants.Folder.Bin, Constants.Folder.Targets), targetsFile); string import = FilePath.GetRelativePath(targetsPath, projectPath); BuildProject.AddNewImport(import, string.Empty); } } } } return(base.Save(fileToBeSaved, remember, formatIndex)); }
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment) { #if DEBUG Warm("-"); NoteCalls(this.body); bodyTypeHistogram.Note(this.bodyType); SCode.location = "StaticLet1Q"; #endif // StaticClosure cl = new StaticClosure ((StaticLambda) this.rator, environment); object [] valueCells = environment.GetValueCells(this.lambda.StaticMapping); #if DEBUG SCode.location = "StaticLet1Q"; #endif StaticClosure cl = new StaticClosure(this.lambda, environment.BaseEnvironment, valueCells); expression = this.body; environment = new StaticEnvironment(cl, new object [] { this.rand0Value }); answer = null; return(true); }
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment) { #if DEBUG Warm ("-"); NoteCalls (this.rator); SCode.location = "StaticLet2QQ"; #endif object ev1 = this.rand1Value; object ev0 = this.rand0Value; object [] cells = environment.GetValueCells (this.lambda.StaticMapping); #if DEBUG SCode.location = "StaticLet2QQ"; #endif // StaticClosure cl = new StaticClosure ((StaticLambda) this.rator, environment); StaticClosure cl = new StaticClosure (this.lambda, environment.BaseEnvironment, cells); expression = this.body; environment = new StaticEnvironment (cl, new object [] { ev0, ev1 }); answer = null; return true; }
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment) { #if DEBUG Warm ("-"); NoteCalls (this.rator); NoteCalls (this.rand1); rand1TypeHistogram.Note (this.rand1Type); SCode.location = "StaticLet2Q"; #endif object ev1; Environment env = environment; Control unev = this.rand1; while (unev.EvalStep (out ev1, ref unev, ref env)) { }; #if DEBUG SCode.location = "StaticLet2Q"; #endif if (ev1 == Interpreter.UnwindStack) { ((UnwinderState) env).AddFrame (new Combination2Frame0 (this, environment)); environment = env; answer = Interpreter.UnwindStack; return false; } object ev0 = this.rand0Value; object [] cells = environment.GetValueCells (this.lambda.StaticMapping); #if DEBUG SCode.location = "StaticLet2Q"; #endif // StaticClosure cl = new StaticClosure ((StaticLambda) this.rator, environment); StaticClosure cl = new StaticClosure (this.lambda, environment.BaseEnvironment, cells); expression = this.body; environment = new StaticEnvironment (cl, new object [] { ev0, ev1 }); answer = null; return true; }