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(""); } }
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(); } }