private void ANS_Click(object sender, EventArgs e)
 {
     Screen.Text = ans.ToString();
     if (operador == "+")
     {
         first  = 0;
         second = 0;
     }
     else if (operador == "-")
     {
         first  = 0;
         second = 0;
     }
     else if (operador == "X")
     {
         first  = 1;
         second = 1;
     }
     else if (operador == "÷")
     {
         first  = 1;
         second = 1;
     }
     Screen2.Clear();
 }
Example #2
0
        public ActionResult ReserveForScreen2(ReservedSeat obj, Screen2 scr)
        {
            if (ModelState.IsValid)
            {
                /*obj.Name = data["customerName"].ToString();
                 * obj.Surname = data["customerSurname"].ToString();
                 * obj.Time = data["movieTime"].ToString(); */

                string   numOfSeat = obj.ReservedSeats;
                string[] arraySeat = numOfSeat.Split(',');

                for (int i = 0; i < arraySeat.Length; i++)
                {
                    string sn = arraySeat[i];
                    db.Screen2.Where(
                        a => a.SeatNumber == sn
                        ).Single().isReserved = true;
                }
                db.ReservedSeats.Add(obj);
                db.SaveChanges();

                return(RedirectToAction("Reservation"));
            }
            else
            {
                ModelState.Clear();
                ViewBag.Error = "Something went wrong. Try again or contact with Administrator.";
                return(RedirectToAction("Reservation", obj));
            }
        }
Example #3
0
    public void setButton(Screen2 _scr2, string _name, DateTime _departDate, DateTime _arriveDate, int _vacaKind, int _vacaApplyKind)
    {
        scr2          = _scr2;
        name          = _name;
        departDate    = _departDate;
        arriveDate    = _arriveDate;
        vacakind      = _vacaKind;
        vacaApplyKind = _vacaApplyKind;

        text_name.text       = "ID : " + name;
        text_departDate.text = (departDate.Year + "/" + departDate.Month + "/" + departDate.Day);
        text_arriveDate.text = (arriveDate.Year + "/" + arriveDate.Month + "/" + arriveDate.Day);
        TimeSpan dateDiff = arriveDate - departDate;

        text_Datelen.text = "Period : " + dateDiff.Days + "days";
        if (vacakind == 0)
        {
            text_vacaKind.text = "Vacakind : GeneralVacation";
        }
        else
        {
            text_vacaKind.text = "Vacakind : SpeicalVacation";
        }

        if (vacaApplyKind == 0)
        {
            img_vacaApplyKind.color = new Color(0.078f, 0.568f, 1f);
            img_vacaApplyKind.transform.GetChild(0).GetComponent <Text>().text = "New";
        }
        else
        {
            img_vacaApplyKind.color = new Color(1f, 0.403f, 0.364f);
            img_vacaApplyKind.transform.GetChild(0).GetComponent <Text>().text = "Cancelled";
        }
    }
Example #4
0
    private void Update()
    {
        switch (currentUI)
        {
        case 3:
            Screen3.SetActive(true);
            Screen2.SetActive(false);
            Screen1.SetActive(false);
            break;

        case 2:
            Screen3.SetActive(false);
            Screen2.SetActive(true);
            Screen1.SetActive(false);
            break;

        case 1:
            Screen3.SetActive(false);
            Screen2.SetActive(false);
            Screen1.SetActive(true);
            break;

        default:
            Debug.Log("UI out of range");
            break;
        }
    }
        public void Navigate_and_reset()
        {
            var screen1 = new Screen1();
            var screen2 = new Screen2();

            navigator.NavigateAndReset(screen1, screen2);
            Assert.AreEqual(2, navigator.NavigationStack.Count());
            Assert.AreEqual(screen2, shell.ActiveItem);
        }
Example #6
0
    // Use this for initialization
    void Start()
    {
        audioSource = gameObject.AddComponent<AudioSource>();    // AudioSorceコンポーネントを追加し、変数に代入.
        audioSource.clip = sound;       // 鳴らす音(変数)を格納.
        audioSource.loop = false;       // 音のループなし。
        stageScene = GameObject.Find("GameRoot").GetComponent<Screen2>();	// 『GameRoot』オブジェクトを探し、そのオブジェクトが持っているスクリプトを代入。

        rb = GetComponent<Rigidbody>();
        rb.velocity = new Vector3(10.0f, 10.0f, 0.0f);
    }
        public void Navigate_root()
        {
            var s1 = new Screen1();
            var s2 = new Screen2();
            var s3 = new Screen3();

            navigator.NavigateRoot(s1);
            navigator.Navigate(s2);
            navigator.NavigateRoot(s3);
            Assert.AreEqual(shell.ActiveItem, s3);
        }
 private void DEL_Click(object sender, EventArgs e)
 {
     if (Screen.Text.Length == 1)
     {
         Screen.Text = "0";
     }
     else
     {
         Screen.Text = Screen.Text.Substring(0, Screen.Text.Length - 1);
     }
     Screen2.Clear();
 }
Example #9
0
 public void Transitions()
 {
     Screen2.SetActive(true);
     Screen1.SetActive(false);
 }
 private void Close_Click(object sender, RoutedEventArgs e)
 {
     Screen2.Close();
 }
 private void AC_Click(object sender, EventArgs e)
 {
     Screen.Clear();
     Screen2.Clear();
 }
Example #12
0
 public void NextScreen()
 {
     Screen2.Open();
 }
Example #13
0
 private void PreviousUI()
 {
     Screen1.Previous();
     Screen2.Previous();
     Screen3.Previous();
 }
Example #14
0
 private void NextUI()
 {
     Screen1.Next();
     Screen2.Next();
     Screen3.Next();
 }