public IEnumerable<TabblesApi.MenuItem> menuItems()
 {
     var l = new List<TabblesApi.MenuItem>();
     var mi = new TabblesApi.MenuItem
     {
         Name = "Show",
         Tooltip = "Show the plugin window",
         // when the menu item is clicked...
         onItemClicked = () =>
         {
             //... show the plugin main window. This must be done in the gui thread as WPF is not multithreaded.
             TabblesApi.API.ExecuteActionInGuiThread(() =>
             {
                 var wi = new MainWindow();
                 wi.Show();
             });
         }
     };
     l.Add(mi);
     return l;
 }
Example #2
0
        public IEnumerable <TabblesApi.MenuItem> menuItems()
        {
            var l  = new List <TabblesApi.MenuItem>();
            var mi = new TabblesApi.MenuItem
            {
                Name    = "Show",
                Tooltip = "Show the plugin window",
                // when the menu item is clicked...
                onItemClicked = () =>
                {
                    //... show the plugin main window. This must be done in the gui thread as WPF is not multithreaded.
                    TabblesApi.API.ExecuteActionInGuiThread(() =>
                    {
                        var wi = new MainWindow();
                        wi.Show();
                    });
                }
            };

            l.Add(mi);
            return(l);
        }