예제 #1
0
        private void InstanceUpdated(Notification notification)
        {
            NativeMenuItem item = this.MenuItemForInstance((VagrantInstance)notification.UserInfo["old_instance"]);

            item.Instance = (VagrantInstance)notification.UserInfo["new_instance"];
            item.Refresh();
            this.RebuildMenu();
        }
        private void InstanceAdded(Notification notification)
        {
            NativeMenuItem item = new NativeMenuItem();

            item.Delegate = this;
            _MenuItems.Add(item);
            item.Instance = (VagrantInstance)notification.UserInfo["instance"];
            item.MenuItem = new ToolStripMenuItem(item.Instance.DisplayName);
            item.Refresh();
            this.RebuildMenu();
        }
예제 #3
0
        public void NativeMenuItemUpdateProviderIdentifier(NativeMenuItem menuItem, string providerIdentifier)
        {
            Bookmark bookmark = BookmarkManager.Instance.GetBookmarkWithPath(menuItem.Instance.Path);

            if (bookmark != null)
            {
                bookmark.ProviderIdentifier = providerIdentifier;
                BookmarkManager.Instance.SaveBookmarks();
            }

            menuItem.Instance.ProviderIdentifier = providerIdentifier;
            menuItem.Refresh();
        }
        public void NativeMenuItemUpdateProviderIdentifier(NativeMenuItem menuItem, string providerIdentifier)
        {
            Bookmark bookmark = BookmarkManager.Instance.GetBookmarkWithPath(menuItem.Instance.Path);

            if (bookmark != null)
            {
                bookmark.ProviderIdentifier = providerIdentifier;
                BookmarkManager.Instance.SaveBookmarks();
            }

            menuItem.Instance.ProviderIdentifier = providerIdentifier;
            menuItem.Refresh();
        }
 private void InstanceAdded(Notification notification)
 {
     NativeMenuItem item = new NativeMenuItem();
     item.Delegate = this;
     _MenuItems.Add(item);
     item.Instance = (VagrantInstance)notification.UserInfo["instance"];
     item.MenuItem = new ToolStripMenuItem(item.Instance.DisplayName);
     item.Refresh();
     this.RebuildMenu();
 }