Esempio n. 1
0
 public void setProfile(EProfile p)
 {
     Profile = p;
     App.screenTransform = CoordHelper.Instance.getCurrentMatrix();
     UpdatePosition();
 }
Esempio n. 2
0
 public float getLeftMargin(EProfile profile)
 {
     return leftMargin[profile];
 }
Esempio n. 3
0
        public Vector2 getScoreValue(GameString text, EProfile board)
        {
            if (board == EProfile.ONEPLAYER)
                return new Vector2(getRightBoard(EProfile.ONEPLAYER) + paddingTextX , scorePosY - paddingTextY/2 + textBoxH);

            return new Vector2(leftMargin[EProfile.TWOPLAYER] - TextManager.Instance.getSizeString(text.Font, text.Value).X * text.Scale - paddingTextX,
                                scorePosY - paddingTextY / 2 + textBoxH);
        }
Esempio n. 4
0
        public Rectangle getScoreValueBox(GameString text, EProfile board)
        {
            if (board == EProfile.ONEPLAYER)
                return new Rectangle((int)(getRightBoard(EProfile.ONEPLAYER)), (int)(scorePosY + textBoxH),
                                     (int)(TextManager.Instance.getSizeString(text.Font, text.Value).X * text.Scale + Constants.Measures.paddingTextX * 2),
                                     (int)(TextManager.Instance.getSizeString(text.Font, text.Value).Y * 0.70 * text.Scale));

            return new Rectangle((int)(leftMargin[EProfile.TWOPLAYER] - TextManager.Instance.getSizeString(text.Font, text.Value).X * text.Scale - Constants.Measures.paddingTextX * 2 - Constants.Measures.borderSize), (int)(scorePosY + textBoxH),
                              (int)(TextManager.Instance.getSizeString(text.Font, text.Value).X * text.Scale + Constants.Measures.paddingTextX * 2),
                              (int)(TextManager.Instance.getSizeString(text.Font, text.Value).Y * 0.70 * text.Scale));
        }
Esempio n. 5
0
 public Rectangle getNextValueBox(EProfile board)
 {
     if (board == EProfile.ONEPLAYER)
         return new Rectangle((int)getRightBoard(EProfile.ONEPLAYER), (int)(nextPosY + textBoxH), (int)nextBoxW, (int)nextBoxH);
     return new Rectangle((int)(leftMargin[EProfile.TWOPLAYER] - nextBoxW) - Constants.Measures.borderSize, (int)(nextPosY + textBoxH), (int)nextBoxW, (int)nextBoxH);
 }
Esempio n. 6
0
 public float getRightBoard(EProfile board)
 {
     if (board == EProfile.ONEPLAYER)
         return leftMargin[EProfile.ONEPLAYER] + Constants.Measures.boardWidth + Constants.Measures.borderSize;
     return leftMargin[EProfile.TWOPLAYER] + Constants.Measures.boardWidth + Constants.Measures.borderSize;
 }
Esempio n. 7
0
 public Vector2 getNextValue(EProfile eProfile, Block b)
 {
     if (eProfile == EProfile.ONEPLAYER)
         return new Vector2(CoordHelper.Instance.getLeftMargin(eProfile) + (b.PosRel.X + 10.5f) * Constants.Measures.blockSize, Constants.Measures.upBoardMargin + (b.PosRel.Y + 1.5f) * Constants.Measures.blockSize);
     return new Vector2(CoordHelper.Instance.getLeftMargin(eProfile) - nextBoxW - Constants.Measures.borderSize + (b.PosRel.X + 0.5f) * Constants.Measures.blockSize, Constants.Measures.upBoardMargin + (b.PosRel.Y + 1.5f) * Constants.Measures.blockSize);
 }
Esempio n. 8
0
 public string GetProfile(EProfile profile)
 {
     return(profile.ToString());
 }
Esempio n. 9
0
 public void UpDateProfile(EProfile profile)
 {
     Profile      = profile;
     DateofChange = DateTime.Now;
 }
Esempio n. 10
0
 public AuthorizeSIEAttribute(EProfile profile) => _profile = profile;
        private void _SendEmailProfile(EProfile profile, bool edit)
        {
            List<string> email = new List<string>() { "*****@*****.**" };
            PETiano petiano = LoggedPETiano.GetLogedPETiano();

            if (edit)
            {
                if (profile != EProfile.Common)
                    EmailBuilder.Build(email, "PETUtility Perfil", string.Concat("(", petiano.Id, ") ", petiano.Name, " editou sua conta para ter o perfil ", profile.GetDescription()));
            }
            else
            {
                if(profile != EProfile.Common)
                    EmailBuilder.Build(email, "PETUtility Perfil", string.Concat("(", petiano.Id, ") ", petiano.Name, " criou uma conta nova com o perfil ", profile.GetDescription()));
            }
        }