Example #1
0
        private void AdvancedEditorToolStripMenuItemClick(object sender, EventArgs e)
        {
            var proj = ProjectsRepo.FindFirstProject(_currentProject);

            Debug.Assert(proj == _currentProject, "Duplicate projects are found out");
            using (PomAdvancedEditor form = new PomAdvancedEditor(CurrentProjectView, ProjectsRepo))
            {
                form.ShowDialog();
            }
            RefreshPropertyGrid();
        }
Example #2
0
        private List <ContextAction> GetActions()
        {
            List <ContextAction> actionsList = new List <ContextAction>();
            ContextAction        action      = new ContextAction
            {
                IsApplicable    = p => true,
                DelegatedAction = source =>
                {
                    var proj = ProjectsRepo.FindFirstProject(source);
                    using (PomTextEditorForm form = new PomTextEditorForm((Project)proj))
                    {
                        form.ShowDialog();
                    }
                    RefreshPropertyGrid();
                },
                Title = "Edit as text",
            };

            actionsList.Add(action);
            action = new ContextAction
            {
                IsApplicable    = p => true,
                DelegatedAction = source =>
                {
                    var proj = ProjectsRepo.FindFirstProject(source);
                    using (PomAdvancedEditor form = new PomAdvancedEditor(CurrentProjectView, ProjectsRepo))
                    {
                        form.ShowDialog();
                    }
                    RefreshPropertyGrid();
                },
                Title = "Advanced editor",
            };
            actionsList.Add(action);

            return(actionsList);

            // REVIEW: add cascade switch to snapshot for release projects
        }