// Use this for initialization //*****************************************************************************************// void Start() { inventory = new Inventory(); inventory.setInventorySize(inventory_max_size); GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <GameController>(); } if (gameController == null) { Debug.Log("Cannot find 'GameController' script"); } horloge = gameControllerObject.GetComponent <Horloge>(); movescript = this.GetComponent <ClickerMover>(); HungerStatus = "satieted"; sleepStatut = "Awake"; jobstatut = "idle"; updateStatutText(); eatscript = gameObject.GetComponent <eatscript>(); sleepscript = gameObject.GetComponent <sleepscript>(); iseating = false; isSleaping = false; }
public async Task <IActionResult> Edit(int id, [Bind("Id,Type,Naam,Prijs,Merk,Kleur,Aantal,Afbeelding,Aantal_gekocht,CategorieId")] Horloge horloge) { if (id != horloge.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(horloge); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HorlogeExists(horloge.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["CategorieId"] = new SelectList(_context.Categories, "Id", "Id", horloge.CategorieId); return(View(horloge)); }
public async Task <IActionResult> Create([Bind("Id,Type,Naam,Prijs,Merk,Kleur,Aantal,Afbeelding,Aantal_gekocht,CategorieId")] Horloge horloge) { if (ModelState.IsValid) { _context.Add(horloge); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CategorieId"] = new SelectList(_context.Categories, "Id", "Id", horloge.CategorieId); return(View(horloge)); }
// GET: Horloge public ActionResult Index() { Horloge heure = new Horloge() { Heure = DateTime.Now, Pays = "Angleterre" }; TimeZone fh = TimeZone.CurrentTimeZone; //// ViewBag.FuseauHoraire = fh; ViewData["FuseauHoraire"] = fh; return(View(heure)); }
private void Start() { caseActuelle = 0; cases = new List <List <EvenementAbstract> >(); for (var i = 0; i < 12; i++) { cases.Add(new List <EvenementAbstract>()); } var evenements = EvenementAbstract.loopThrough(); foreach (var evenement in evenements) { AjouterUnEvenementSurToutSesCreneaux(evenement); } horloge = FindObjectOfType <Horloge>(); generationEvenement = FindObjectOfType <GenerationEvenement>(); }
private void InitHorloge() { _horloge = new Horloge(); DateHeureTBK.DataContext = new HorlogeVM(_horloge); _horloge.SurToutesLesMinutes += _horloge_SurToutesLesMinutes; }
private void Start() { horloge = FindObjectOfType <Horloge>(); }
private void InitHorloge() { _horloge = new Horloge(); DateHeureTBK.DataContext = new HorlogeVM(_horloge); }
private void ShowHorloge() { labelHorloge.Text = Horloge.GetStringFormat(); }
// Use this for initialization private void Awake() { instance = this; LoadState(); }
public async Task <IActionResult> PostHorloge(List <IFormFile> files) { long size = files.Sum(f => f.Length); string error = ""; // full path to file in temp location var filePath = Path.GetTempFileName(); foreach (var formFile in files) { if (formFile.Length > 0) { if (formFile.FileName.EndsWith(".csv")) { using (var stream = new FileStream(filePath, FileMode.Create)) { await formFile.CopyToAsync(stream); } var sr = new StreamReader(formFile.OpenReadStream()); try { while (!sr.EndOfStream) { var line = sr.ReadLine(); var data = line.Split(new[] { ',' }); var horloge = new Horloge() { Type = data[0], Naam = data[1], Prijs = /* Veranderen naar Float?*/ int.Parse(data[2]), Merk = data[3], Kleur = data[4], Aantal = int.Parse(data[5]), Afbeelding = data[6], Aantal_gekocht = int.Parse(data[7]), CategorieId = 1 }; _context.Horloges.Add(horloge); } } catch (FormatException ex) { System.Console.WriteLine(ex.Message); System.Console.WriteLine("CATCHED ERRRRRRROR-------------------------------------"); error = "ERROR"; } catch (IndexOutOfRangeException e) { System.Console.WriteLine(e.Message); System.Console.WriteLine("ERRRRRRRRRRRRRRRRORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"); error = "ERROR"; } _context.SaveChanges(); } else { return(RedirectToAction("Error")); } } } if (error == "ERROR") { return(RedirectToAction("Error")); } // process uploaded files // Don't rely on or trust the FileName property without validation. return(RedirectToAction("Succes")); }
public RDVAvrinStatus() : base(Horloge.getCreneauxLeftTo(1, 9), "Rdv Avrin", "Vous avez rdv avec Avrin", (int)StatusEnum.RdvAvrin, false) { }