Example #1
0
        private void AddFileMenu(Guid rootMenuId)
        {
            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id    = rootMenuId,
                Title = "File",
                Order = 10
            });

            //AddTopMenu(new ShAppTopMenuItemDefinition
            //{
            //    Id = new Guid("11BC8EBB-322D-4156-8B02-34D360FB073A"),
            //    ParentItemId = rootMenuId,
            //    Title = "New",
            //    Click = ShBind.Cmd(MpCommands.Instance.NewSolution).Bind,
            //    Order = 50
            //});

            //AddTopMenu(new ShAppTopMenuItemDefinition
            //{
            //    Id = new Guid("FF910BFF-1BA9-4988-9FC0-705667258BDE"),
            //    ParentItemId = rootMenuId,
            //    Title = "Open",
            //    Click = ShBind.Cmd(MpCommands.Instance.OpenSolution).Bind,
            //    Order = 60
            //});


            //AddTopMenu(new ShAppTopMenuItemDefinition
            //{
            //    Id = new Guid("FD7533F8-0267-4FC4-8603-8C4E8E5F1E34"),
            //    ParentItemId = rootMenuId,
            //    Title = "Save",
            //    StartsGroup = true,
            //    Click = ShBind.Cmd(MpCommands.Instance.SaveSolution).Bind,
            //    Order = 60
            //});


            //AddTopMenu(new ShAppTopMenuItemDefinition
            //{
            //    Id = new Guid("4E5B5FA7-36B8-44E7-9461-717C2AB69DE0"),
            //    ParentItemId = rootMenuId,
            //    Title = "Save As...",
            //    Click = ShBind.Cmd(MpCommands.Instance.SaveSolutionAs).Bind,
            //    Order = 60
            //});

            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id           = new Guid("98788738-1ACB-41EF-A680-674C393A9E11"),
                ParentItemId = rootMenuId,
                StartsGroup  = true,
                Title        = "Exit",
                Click        = ShBind.Cmd(MpCommands.Instance.ExitApp).Bind,
                Order        = 150
            });
        }
Example #2
0
        private void AddToolsMenu(Guid rootMenuId)
        {
            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id    = rootMenuId,
                Title = "Tools",
                Order = 10
            });

            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id           = new Guid("9DAB21BD-72FC-4E68-9457-4E417FC1DD3E"),
                ParentItemId = rootMenuId,
                Title        = "Options",
                Click        = ShBind.Cmd(MpCommands.Instance.ShowOptionsWindow).Bind,
                Order        = 50
            });
        }
Example #3
0
        private void AddHelpMenu(Guid rootMenuId)
        {
            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id    = rootMenuId,
                Title = "Help",
                Order = 50
            });


            AddTopMenu(new ShAppTopMenuItemDefinition
            {
                Id           = new Guid("541FF399-99E1-4950-ACF0-017607BF2D32"),
                ParentItemId = rootMenuId,
                Title        = "About",
                Click        = ShBind.Cmd(MpCommands.Instance.ShowAboutWindow).Bind,
                Order        = 50
            });
        }
        public override List <ShAppStartPageItemDefinition> GetMenuItems()
        {
            var result = new List <ShAppStartPageItemDefinition>();

            // start
            var newSharePointConnection = new ShAppStartPageItemDefinition
            {
                Title       = "Add SharePoint connection...",
                Id          = new Guid("18281F23-352B-4D7E-86FF-032C2F90A4A6"),
                Order       = 100,
                StartsGroup = false,
                Location    = "start",
                Click       = ShBind.Cmd(MpCommands.Instance.NewSharePointConnection).Bind
            };

            var newNuGetConnection = new ShAppStartPageItemDefinition
            {
                Title       = "Add NuGet Gallery connection...",
                Id          = new Guid("A06AB89E-6A91-4D0C-A972-F0FA350DA52B"),
                Order       = 200,
                StartsGroup = false,
                Location    = "start",
                Click       = ShBind.Cmd(MpCommands.Instance.NewNuGetGalleryConnection).Bind
            };

            result.Add(newSharePointConnection);
            result.Add(newNuGetConnection);

            // help
            result.Add(new ShAppStartPageItemDefinition
            {
                Title       = "MetaPack documentation",
                Id          = new Guid("68FD6EEA-D07D-4CAE-930F-0E31FA00C823"),
                Order       = 100,
                StartsGroup = false,
                Location    = "help",
                Click       = (s, e) =>
                {
                    Process.Start("http://docs.subpointsolutions.com/metapack");
                }
            });

            result.Add(new ShAppStartPageItemDefinition
            {
                Title       = "Community",
                Id          = new Guid("E7213962-F5F4-4B88-BF76-CA4A536F83D1"),
                Order       = 200,
                StartsGroup = false,
                Location    = "help",
                Click       = (s, e) =>
                {
                    Process.Start("https://www.yammer.com/spmeta2feedback");
                }
            });

            result.Add(new ShAppStartPageItemDefinition
            {
                Title       = "Report an issue",
                Id          = new Guid("C2E50021-E2AB-4036-BAD9-6FBF0C634819"),
                Order       = 300,
                StartsGroup = false,
                Location    = "help",
                Click       = (s, e) =>
                {
                    Process.Start("https://github.com/SubPointSolutions/metapack/issues");
                }
            });

            result.Add(new ShAppStartPageItemDefinition
            {
                Title       = "MetaPack CLI",
                Id          = new Guid("8D1E3514-465E-4402-90DD-78F7EC0F838D"),
                Order       = 400,
                StartsGroup = false,
                Location    = "help",
                Click       = (s, e) =>
                {
                    Process.Start("http://docs.subpointsolutions.com/metapack/cli");
                }
            });

            result.Add(new ShAppStartPageItemDefinition
            {
                Title       = "Add SharePoint connection",
                Id          = new Guid("93567388-F3D2-4C55-95A1-E8BC2C4DCF3E"),
                Order       = 500,
                StartsGroup = false,
                Location    = "help",
                Click       = (s, e) =>
                {
                    MpCommands.Instance.NewSharePointConnection();
                }
            });



            return(result);
        }