Example #1
0
        public bool RenameEntry(TextEntry entry, string newName)
        {
            bool result = true;

            try
            {
                MsbtEntry ent = (MsbtEntry)entry;
                _msbt.RenameLabel(ent.EditedLabel, newName);
            }
            catch (Exception)
            {
                result = false;
            }

            return(result);
        }
Example #2
0
        public bool DeleteEntry(TextEntry entry)
        {
            bool result = true;

            try
            {
                MsbtEntry ent = (MsbtEntry)entry;
                _msbt.RemoveLabel(ent.EditedLabel);
                _entries.Remove(ent);
            }
            catch (Exception)
            {
                result = false;
            }

            return(result);
        }
Example #3
0
        public bool AddEntry(TextEntry entry)
        {
            bool result = true;

            try
            {
                MsbtEntry ent = (MsbtEntry)entry;
                ent.EditedLabel = _msbt.AddLabel(entry.Name);
                _entries.Add((MsbtEntry)entry);
            }
            catch (Exception)
            {
                result = false;
            }

            return(result);
        }