コード例 #1
0
        private void edit_entry(InternalItem item)
        {
            var dialog = new UserMenuEntryEditDialog();

            dialog.SetEntry(item.internalData);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            dialog.Apply();
            item.UpdateView();
        }
コード例 #2
0
        private void new_entry()
        {
            var new_entry = new UserMenuEntry(string.Empty, string.Empty);
            var dialog    = new UserMenuEntryEditDialog();

            dialog.SetEntry(new_entry);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            dialog.Apply();

            internal_menu.Add(new_entry);
            listViewInternal.Items.Add(new InternalItem(new_entry));
        }