Esempio n. 1
0
        public IActionResult VerifyPin(PinForm form)
        {
            string URL = form.Link.Split("Access")[0] + "Board/";
            string name = form.Link.Split('/').Last();

            if (ModelState.IsValid)
            {
                int pin = int.Parse(form.p1.ToString() + form.p2.ToString() + form.p3.ToString() + form.p4.ToString());
                BoardModel board = _boardRepository.FindBoardByUniqueName(name);

                if (board != null)
                {
                    if (_boardRepository.CompareBoardByPin(board.BoardId, pin))
                    {
                        return Redirect(URL + board.BoardId);
                    }
                    else
                    {
                        TempData["error"] = "Wrong pin.";
                    }
                }
                else
                {
                    TempData["error"] = "Wrong link.";
                }
            }
            else
            {
                TempData["error"] = "Wrong format.";
            }
            return RedirectToAction("Access", new { boardUName = name });
        }
Esempio n. 2
0
        private void Password_Click(object sender, EventArgs e)
        {
            Label password = sender as Label;

            PinForm pf = new PinForm(LoggedUser, password, DisabledControls, Password_Click);

            pf.Show();
            FormUtilities.DisableControls(DisabledControls.ToArray());
        }
Esempio n. 3
0
        private void DoubleClick_PinNote(object sender, EventArgs e)
        {
            if (isPinned == false)
            {
                // new form
                PinnedForm           = new PinForm();
                PinnedForm.MdiParent = null;

                // set form content
                PinnedForm.setContent(this.lbContent.Text);
                PinnedForm.setName(Int32.Parse(this.Name));
                PinnedForm.setTittle(this.lbTittle.Text);

                // show form
                PinnedForm.Show();
                PinnedForm.Size = new System.Drawing.Size(250, 180);


                //isPinned = true;
            }
        }
Esempio n. 4
0
    /// <summary>
    /// Generate the pin table
    /// </summary>
    void Initialize()
    {
        switch (_geometry)
        {
        case ENUM_Geometry.cube:
            _pinTable = gameObject.AddComponent <Cube>();
            break;

        case ENUM_Geometry.KeyboardDisplacement:
            _pinTable = gameObject.AddComponent <Cube>();
            _CameraForPlayer.transform.position = new Vector3(1000f, 1000f, 1000f);
            break;

        default:
            _pinTable = gameObject.AddComponent <Pyramide> ();
            break;
        }

        _pinTable.Initialize(_size, _baseSize, _spaceBetweenEachVoxel);

        GetComponent <MeshRenderer> ().material = _materialForMesh;
        SetShader((int)_geometry);
    }