public RBFLibraryEditor()
        {
            InitializeComponent();

            SortedDictionary <string, RBFLibEntry> entries = RBFLibrary.GetAllEntries();

            foreach (RBFLibEntry entry in entries.Values)
            {
                _lbxEntries.Items.Add(entry);
            }

            RBFLibrary.EntryAdded   += RBFLibraryEntryAdded;
            RBFLibrary.EntryRemoved += RBFLibraryEntryRemoved;
        }
Exemple #2
0
        private void BtnOkClick(object sender, EventArgs e)
        {
            if (m_tbxName.Text == string.Empty)
            {
                UIHelper.ShowError("The selected name is invalid!");
                return;
            }
            if (m_rtbTags.Text == string.Empty)
            {
                UIHelper.ShowError("Please enter at least ONE tag.");
                return;
            }

            if (!s_addTags && RBFLibrary.GetAllEntries().ContainsKey(m_tbxName.Text))
            {
                UIHelper.ShowError("The selected name is already in use by another value.");
                return;
            }
            DialogResult = DialogResult.OK;
            Close();
            return;
        }
        private void TbxTagFilterTextChanged(object sender, EventArgs e)
        {
            _lbxEntries.Items.Clear();
            SortedDictionary <string, RBFLibEntry> entries = _tbx_tagFilter.Text == string.Empty ? RBFLibrary.GetAllEntries() : RBFLibrary.GetEntriesForTag(_tbx_tagFilter.Text);

            if (entries == null)
            {
                return;
            }

            foreach (RBFLibEntry entry in entries.Values)
            {
                _lbxEntries.Items.Add(entry);
            }
        }