public void CleanID(int ID)
 {
     for (int k = 0; k < database.Count; k++)
     {
         if (database[k].ownerID == ID)
         {
             database[k] = new TxtDialogue();
         }
     }
 }
    public int InsertToDB(TxtDialogue dialogue)
    {
        int dialoguePos;

        if (database.Count == 0)
        {
            database.Add(new TxtDialogue());
        }

        dialoguePos = FindLastEmptySpot();

        if (dialoguePos == 0)
        {
            dialoguePos = database.Count;
            database.Add(dialogue);
        }
        else
        {
            database[dialoguePos] = dialogue;
        }

        return(dialoguePos);
    }