Ejemplo n.º 1
0
        public string GetSymbol(PassContent pc)
        {
            switch (pc)
            {
            case PassContent.NAME:
                return(" NAME");

            case PassContent.LETTER:
                return(" A..z");

            case PassContent.BigLetter:
                return(" AZ");

            case PassContent.SmallLetter:
                return(" az");

            case PassContent.NUMBER:
                return(" #");

                break;

            case PassContent.YEAR:
                return(" ГоД");

            case PassContent.LowLine:
                return("_");

            case PassContent.END:
                return("");

            default:
                return("");
            }
        }
Ejemplo n.º 2
0
        public void Add(PassContent newchar)
        {
            bool passwordLineIsFull = true;

            for (int i = 0; i < PasswordLine.Length; i++)
            {
                if (PasswordLine[i] == PassContent.END)
                {
                    CurrentPosition = i;
                    PasswordLine[CurrentPosition] = newchar;
                    passwordLineIsFull            = false;
                    break;
                }
            }
            if (passwordLineIsFull)
            {
                MessageBox.Show("Пароль не может быть длиннее 13 символов!");
                PositionOnStart();
                throw new IndexOutOfRangeException();
            }
        }