Ejemplo n.º 1
0
        internal void AddMenuItem(string name, string parent, SingleJobHandler handler)
        {
            ToolStripMenuItem item = new ToolStripMenuItem(name);

            item.Click += delegate(object sender, EventArgs e)
            {
                Debug.Assert(queueListView.SelectedItems.Count == 1);
                TaggedJob j = jobs[queueListView.SelectedItems[0].Text];
                handler(j);
            };
            singleJobHandlers.Add(item);
            addItem(item, parent);
        }
Ejemplo n.º 2
0
 internal void AddMenuItem(string name, string parent, SingleJobHandler handler)
 {
     ToolStripMenuItem item = new ToolStripMenuItem(name);
     item.Click += delegate(object sender, EventArgs e)
     {
         Debug.Assert(queueListView.SelectedItems.Count == 1);
         TaggedJob j = jobs[queueListView.SelectedItems[0].Text];
         handler(j);
     };
     singleJobHandlers.Add(item);
     addItem(item, parent);
 }