public ExportProjectPolicyDialog(IPolicyProvider policyProvider)
        {
            this.Build();
            this.policyProvider = policyProvider;

            fileEntry.DefaultPath = DefaultFileDialogPolicyDir;
            if (policyProvider is SolutionItem)
            {
                fileEntry.Path = ((SolutionItem)policyProvider).Name + ".mdpolicy";
            }
            else if (policyProvider is Solution)
            {
                fileEntry.Path = ((Solution)policyProvider).Name + ".mdpolicy";
            }

            UpdateWidgets();

            labelPolicies.Text = ApplyPolicyDialog.GetPoliciesDescription(policyProvider.Policies);
        }
Example #2
0
        public ExportProjectPolicyDialog(IPolicyProvider policyProvider)
        {
            this.Build();
            this.policyProvider = policyProvider;

            fileEntry.DefaultPath = DefaultFileDialogPolicyDir;
            if (policyProvider is SolutionItem)
            {
                fileEntry.Path = ((SolutionItem)policyProvider).Name + ".mdpolicy";
            }
            else if (policyProvider is Solution)
            {
                fileEntry.Path = ((Solution)policyProvider).Name + ".mdpolicy";
            }

            fileEntry.FileFilters.AddFilter(GettextCatalog.GetString("MonoDevelop policy files"), "*.mdpolicy");
            fileEntry.FileFilters.AddAllFilesFilter();

            UpdateWidgets();

            labelPolicies.Text = ApplyPolicyDialog.GetPoliciesDescription(policyProvider.Policies);
        }
Example #3
0
		protected override void Run ()
		{
			using (ApplyPolicyDialog dlg = new ApplyPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution))
				MessageService.ShowCustomDialog (dlg);
		}
Example #4
0
		protected override void Run ()
		{
			ApplyPolicyDialog dlg = new ApplyPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution);
			MessageService.RunCustomDialog (dlg);
			dlg.Destroy ();
		}
		protected override void Run ()
		{
			Project project = IdeApp.ProjectOperations.CurrentSelectedProject;
			Solution solution = IdeApp.ProjectOperations.CurrentSelectedSolution;
			using (var dlg = new ApplyPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)solution)) {
				if (MessageService.ShowCustomDialog (dlg) == (int)Gtk.ResponseType.Ok) {
					if (project != null)
						IdeApp.ProjectOperations.SaveAsync (project);
					else
						IdeApp.ProjectOperations.SaveAsync (solution);
				}
			}
		}