Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,FullMoonDate")] Moon1 moon1)
        {
            if (id != moon1.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(moon1);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Moon1Exists(moon1.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(moon1));
        }
Exemplo n.º 2
0
 public void OnButtonPressed(VirtualButtonBehaviour vb)
 {
     if (vb.VirtualButtonName == "previewvb")
     {
         Sun.SetActive(false);
         Mercury.SetActive(false);
         Venus.SetActive(false);
         Earth.SetActive(false);
         Moon.SetActive(false);
         Mars.SetActive(false);
         Sun1.SetActive(true);
         Mercury1.SetActive(true);
         Venus1.SetActive(true);
         Earth1.SetActive(true);
         Moon1.SetActive(true);
         Mars1.SetActive(true);
         videoplane.SetActive(false);
     }
     else if (vb.VirtualButtonName == "animationvb")
     {
         UnityEngine.Debug.Log("animationvb Button pressed");
         Sun.SetActive(true);
         Mercury.SetActive(true);
         Venus.SetActive(true);
         Earth.SetActive(true);
         Moon.SetActive(true);
         Mars.SetActive(true);
         Sun1.SetActive(false);
         Mercury1.SetActive(false);
         Venus1.SetActive(false);
         Earth1.SetActive(false);
         Moon1.SetActive(false);
         Mars1.SetActive(false);
         videoplane.SetActive(false);
     }
     else if (vb.VirtualButtonName == "videovb")
     {
         UnityEngine.Debug.Log("Traveller Button pressed");
         Sun.SetActive(false);
         Mercury.SetActive(false);
         Venus.SetActive(false);
         Earth.SetActive(false);
         Moon.SetActive(false);
         Mars.SetActive(false);
         Sun1.SetActive(false);
         Mercury1.SetActive(false);
         Venus1.SetActive(false);
         Earth1.SetActive(false);
         Moon1.SetActive(false);
         Mars1.SetActive(false);
         videoplane.SetActive(true);
     }
     else
     {
         throw new UnityException(vb.VirtualButtonName + "Virtual Button not supported");
     }
 }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("Id,FullMoonDate")] Moon1 moon1)
        {
            if (ModelState.IsValid)
            {
                _context.Add(moon1);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(moon1));
        }
Exemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     awa = GetComponentsInChildren <VirtualButtonBehaviour>();
     for (int i = 0; i < awa.Length; ++i)
     {
         awa[i].RegisterOnButtonPressed(OnButtonPressed);
         awa[i].RegisterOnButtonReleased(OnButtonReleased);
     }
     Sun.SetActive(false);
     Mercury.SetActive(false);
     Venus.SetActive(false);
     Earth.SetActive(false);
     Moon.SetActive(false);
     Mars.SetActive(false);
     Sun1.SetActive(false);
     Mercury1.SetActive(false);
     Venus1.SetActive(false);
     Earth1.SetActive(false);
     Moon1.SetActive(false);
     Mars1.SetActive(false);
     videoplane.SetActive(false);
 }