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

			fileEntry.Action = FileChooserAction.Save;
			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 (BrandingService.BrandApplicationName (GettextCatalog.GetString ("MonoDevelop policy files")), "*.mdpolicy");
			fileEntry.FileFilters.AddAllFilesFilter ();
			
			fileEntry.PathChanged += delegate {
				UpdateWidgets ();
			};
			entryName.Changed += delegate {
				UpdateWidgets ();
			};
			
			tree = new PoliciesListSummaryTree ();
			policiesScroll.Add (tree);
			tree.Show ();
			
			tree.SetPolicies (policyProvider.Policies);
			if (!tree.HasPolicies) {
				tree.Message = GettextCatalog.GetString ("No policies");
				buttonOk.Sensitive = false;
			}
			
			UpdateWidgets ();
		}
        public ApplyPolicyDialog(IPolicyProvider policyProvider)
        {
            this.policyProvider = policyProvider;

            this.Build();
            tree = new PoliciesListSummaryTree();
            policiesScroll.Add(tree);
            tree.Show();

            foreach (PolicySet pset in PolicyService.GetPolicySets())
            {
                if (pset.Visible)
                {
                    combPolicies.AppendText(pset.Name);
                }
            }

            fileEntry.DefaultPath = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
            fileEntry.FileFilters.AddFilter(BrandingService.BrandApplicationName(GettextCatalog.GetString("MonoDevelop policy files")), "*.mdpolicy");
            fileEntry.FileFilters.AddAllFilesFilter();
            combPolicies.Active = 0;
            OnRadioCustomToggled(null, null);
            UpdateContentLabels();

            combPolicies.Accessible.Name = "ApplyPolicyDialog.PolicyCombo";
            combPolicies.SetAccessibilityLabelRelationship(label2);
            CombPolicies_Changed(null, null);
            combPolicies.Changed += CombPolicies_Changed;
        }
		public ApplyPolicyDialog (IPolicyProvider policyProvider)
		{
			this.policyProvider = policyProvider;
			
			this.Build ();
			tree = new PoliciesListSummaryTree ();
			policiesScroll.Add (tree);
			tree.Show ();
			
			foreach (PolicySet pset in PolicyService.GetPolicySets ())
				if (pset.Visible)
					combPolicies.AppendText (pset.Name);
			
			fileEntry.DefaultPath = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
			fileEntry.FileFilters.AddFilter (BrandingService.BrandApplicationName (GettextCatalog.GetString ("MonoDevelop policy files")), "*.mdpolicy");
			fileEntry.FileFilters.AddAllFilesFilter ();
			combPolicies.Active = 0;
			OnRadioCustomToggled (null, null);
			UpdateContentLabels ();
		}
Exemple #4
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();

            fileEntry.PathChanged += delegate
            {
                UpdateWidgets();
            };
            entryName.Changed += delegate
            {
                UpdateWidgets();
            };

            tree = new PoliciesListSummaryTree();
            policiesScroll.Add(tree);
            tree.Show();

            tree.SetPolicies(policyProvider.Policies);
            if (!tree.HasPolicies)
            {
                tree.Message       = GettextCatalog.GetString("No policies");
                buttonOk.Sensitive = false;
            }

            UpdateWidgets();
        }
        public ApplyPolicyDialog(IPolicyProvider policyProvider)
        {
            this.policyProvider = policyProvider;

            this.Build();
            tree = new PoliciesListSummaryTree();
            policiesScroll.Add(tree);
            tree.Show();

            foreach (PolicySet pset in PolicyService.GetPolicySets())
            {
                if (pset.Visible)
                {
                    combPolicies.AppendText(pset.Name);
                }
            }

            fileEntry.DefaultPath = ExportProjectPolicyDialog.DefaultFileDialogPolicyDir;
            fileEntry.FileFilters.AddFilter(GettextCatalog.GetString("MonoDevelop policy files"), "*.mdpolicy");
            fileEntry.FileFilters.AddAllFilesFilter();
            combPolicies.Active = 0;
            OnRadioCustomToggled(null, null);
            UpdateContentLabels();
        }