Example #1
0
        private void EditNode(TreeNode selectedNode)
        {
            var agentConfig = _agentConfigs.Single(x =>
                                                   x.GetType().Name.Replace("AgentConfig", "") == selectedNode.Parent.Parent.Name);
            var eventName = selectedNode.Parent.Name;
            var handler   = agentConfig.GetHandler(eventName, selectedNode.Text);

            Debug.Assert(handler != null, "handler != null");

            var entry = new Entry(agentConfig, eventName, handler);
            var form  = new EntryForm(this, _agentConfigs, entry);

            form.Show();
        }
Example #2
0
        private void buttonNewEntry_Click(object sender, EventArgs e)
        {
            var form = new EntryForm(this, _agentConfigs);

            form.Show(this);
        }