Beispiel #1
0
 public void AppendChunk(PasswordChunk pChunk)
 {
     if ((pChunk != null) && (pChunk.ChunkType != PasswordChunkType.None) && (!string.IsNullOrEmpty(pChunk.Text)))
     {
         Chunks.Add(pChunk);
     }
 }
Beispiel #2
0
        public void AppendChunk(PasswordChunk pChunk, int pIndex)
        {
            if ((pChunk == null) || (pChunk.ChunkType == PasswordChunkType.None) || (string.IsNullOrEmpty(pChunk.Text)))
            {
                return;
            }
            if ((pIndex < 0))
            {
                return;
            }

            if (pIndex >= Chunks.Count - 1)
            {
                Chunks.Add(pChunk);
            }

            Chunks.Insert(pIndex, pChunk);
        }
Beispiel #3
0
        public void ReplaceChunk(PasswordChunk pChunk, int pIndex)
        {
            if ((pChunk == null) || (pChunk.ChunkType == PasswordChunkType.None) || (string.IsNullOrEmpty(pChunk.Text)))
            {
                return;
            }
            if ((pIndex < 0))
            {
                return;
            }

            if (pIndex >= Chunks.Count - 1)
            {
                pIndex = Chunks.Count - 1;
            }

            Chunks[pIndex] = pChunk;
        }