private void ConstructLevel(int id) { if (_rCube != null) { return; } _lvlTmp = LevelTemplates.LvlTmp; // load meshes GlobalFieldMesh = MeshReader.LoadMesh("Assets/Tile.obj.model"); GlobalCubeMesh = MeshReader.LoadMesh("Assets/Cube.obj.model"); // load textures var imgData = RContext.LoadImage("Assets/tex_stone.jpg"); TextureField = RContext.CreateTexture(imgData); imgData = RContext.LoadImage("Assets/tex_cube.jpg"); TextureCube = RContext.CreateTexture(imgData); // camera _camPosition = -3000; // colh _objOrientation = float4x4.CreateRotationX(MathHelper.Pi / 2); // create cube and set vars _rCube = new RollingCube(this); _startXy = new int[2]; _curLvlId = id; // load level LoadLevel(id); }
public ActionResult OnPost() { RContext context = new RContext(); Account account = context.Accounts.Where(u => u.Username == Username).FirstOrDefault(); if (account == null) { return(Content("Incorrecte gebruikersnaam en/of wachtwoord! u wordt automatisch terug gestuurd <script>setTimeout(() => { window.location.href='/' }, 5000)</script>", "text/html")); } else { if (BCrypt.Net.BCrypt.Verify(Password, account.Password)) { Auth auth = context.Auth.Where(a => a.Username == Username).FirstOrDefault(); if (auth == null) { return(Content("Een fout is gebeurd, rapporteer dit!", "text/html")); } else { Response.Cookies.Append("token", auth.Token); return(new RedirectResult("Index")); } } else { return(Content("Incorrecte gebruikersnaam en/of wachtwoord! u wordt automatisch terug gestuurd <script>setTimeout(() => { window.location.href='/' }, 5000)</script>", "text/html")); } } }
public static void Main(string[] args) { var db = new RContext(); //db.ArgeDB4.Database.EnsureCreated(); //db.ArgeDB4.Invoices.Add(new Invoice { InvoiceNumber = "0015", Total = "18.00 TL" }); Console.WriteLine("All record in MS SQL database:"); foreach (var blog in db.ArgeDB.Blogs) { Console.WriteLine(" - {0}", blog.Url); } Console.WriteLine("\n______"); Console.WriteLine("All record in PostgreSQL database:"); foreach (var student in db.ArgeDB2.Students) { Console.WriteLine(" - {0}", student.FirstName + " " + student.LastName); } Console.WriteLine("\n______"); //Console.WriteLine("All record in MySQL database:"); //foreach (var invoice in db.ArgeDB4.Invoices) //{ // Console.WriteLine(" - {0}", invoice.InvoiceNumber + " = " + invoice.Total); //} //Console.WriteLine("\n______"); Console.WriteLine("All record in MongoDB database:"); var collection = db.ArgeDB3.Orders; var cursorFind = collection.Find(new BsonDocument()).ToCursor(); foreach (var document in cursorFind.ToEnumerable()) { Console.WriteLine(document); } Console.WriteLine("\n______"); //var query = db.ArgeDB2.Students.Where(x => x.FirstName=="Gözde"); //Console.WriteLine(query); }
public ActionResult OnPost() { if (Username.Length < 3 || Password.Length < 3) { return(Content("Uw gebruikersnaam en wachtwoord moeten minimaal uit 3 tekens bestaan, u wordt automatisch terug gestuurd <script>setTimeout(() => { window.location.href='/Accounts/Register' }, 5000)</script>", "text/html")); } RContext context = new RContext(); Account account = context.Accounts.Where(user => user.Username == Username).FirstOrDefault(); if (account != null) { return(Content("Er bestaat al een gebruiker met deze gebruikersnaam, u wordt automatisch terug gestuurd <script>setTimeout(() => { window.location.href='/' }, 5000)</script>", "text/html")); } else { context.Accounts.Add(new Account() { AccountId = (ulong)random.Next(0, int.MaxValue), Password = BCrypt.Net.BCrypt.HashPassword(Password), Points = 0, Username = Username }); Auth auth = new Auth() { Token = Guid.NewGuid().ToString(), Username = Username }; context.Auth.Add(auth); Response.Cookies.Append("token", auth.Token); context.SaveChanges(); return(new RedirectResult("Index")); } }
public RContext r() { RContext _localctx = new RContext(_ctx, State); EnterRule(_localctx, 0, RULE_r); try { EnterOuterAlt(_localctx, 1); { State = 2; Match(T__0); State = 3; Match(ID); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.ReportError(this, re); _errHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public RContext r() { RContext _localctx = new RContext(Context, State); EnterRule(_localctx, 0, RULE_r); try { EnterOuterAlt(_localctx, 1); { State = 12; position(); State = 13; modifiers(); } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public RContext r() { RContext _localctx = new RContext(Context, State); EnterRule(_localctx, 0, RULE_r); try { EnterOuterAlt(_localctx, 1); { State = 2; Match(T__0); State = 3; _localctx._ID = Match(ID); UnityEngine.Debug.Log("Antlr say: Hello, " + (_localctx._ID != null?_localctx._ID.Text:null)); } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public void OnGet() { if (!string.IsNullOrEmpty(Request.Query["account"])) { ulong AccountId = ulong.Parse(Request.Query["account"]); int Points = int.Parse(Request.Query["points"]); Debug.WriteLine($"Account: {AccountId}; points: {Points}"); if (AccountId < 0) { return; } RContext context = new RContext(); Account acc = context.Accounts.Where(e => e.AccountId == AccountId).FirstOrDefault(); acc.Points += Points; context.SaveChanges(); } }
protected bool Equals(RContext other) { return(other != null && CallFlag == other.CallFlag); }
public CreateReservationRequestHandler(RContext context) { _context = context; }
public RContext r() { RContext _localctx = new RContext(Context, State); EnterRule(_localctx, 0, RULE_r); try { EnterOuterAlt(_localctx, 1); { State = 2; Match(T__0); State = 3; _localctx._ID = Match(ID); UnityEngine.Debug.Log("Antlr say: Hello, " + (_localctx._ID!=null?_localctx._ID.Text:null)); } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return _localctx; }
public BebidaRepository(RContext context) { this._context = context; }
public RefeicaoRepository(RContext context) { this._context = context; }
public UsuarioRepository(RContext context) { this._context = context; }
public PedidoRepository(RContext context) { this._context = context; }
public GetRoomFilterRequestHandler(RContext context) { _context = context; }
public void Render(float4x4 mtxRot) { if (WonDeadAnimation()) { return; } LoadAnimation(); var eyeF = new float3(0, 0, _camPosition); var targetF = new float3(0, 0, 0); var upF = new float3(0, 1, 0); if (!UseStereo3D) { // normal mode var lookAt = float4x4.LookAt(eyeF, targetF, upF); // colh CamTrans = _camTranslation*mtxRot*lookAt; CamTrans = lookAt * mtxRot * _camTranslation; RContext.SetShaderParamTexture(VTextureObj, TextureField); foreach (var feld in _levelFeld) { if (feld != null) { feld.Render(_objOrientation); } } RContext.SetShaderParamTexture(VTextureObj, TextureCube); if (_rCube != null) { _rCube.RenderCube(); } } else { // 3d mode _stereo3D.Prepare(Stereo3DEye.Left); for (var x = 0; x < 2; x++) { var lookAt = _stereo3D.LookAt3D(_stereo3D.CurrentEye, eyeF, targetF, upF); // colh CamTrans = _camTranslation*mtxRot*lookAt; CamTrans = lookAt * mtxRot * _camTranslation; var renderOnly = (_stereo3D.CurrentEye == Stereo3DEye.Left); RContext.SetShaderParamTexture(VTextureObj, TextureField); foreach (var feld in _levelFeld) { if (feld != null) { feld.Render(_objOrientation, renderOnly); } } RContext.SetShaderParamTexture(VTextureObj, TextureCube); if (_rCube != null) { _rCube.RenderCube(renderOnly); } _stereo3D.Save(); if (x == 0) { _stereo3D.Prepare(Stereo3DEye.Right); } } } }
public GetReservationFilterRequestHandler(RContext context) { _context = context; }
public SobremesaRepository(RContext context) { this._context = context; }
protected bool Equals(RContext other) { return other != null && CallFlag == other.CallFlag; }
protected bool Equals(RContext other) => other != null && CallFlag == other.CallFlag;
public IngredienteRepository(RContext context) { this._context = context; }