Example #1
0
        void HandleFromProject(object sender, EventArgs e)
        {
            ImportProjectPolicyDialog dlg = new ImportProjectPolicyDialog();

            try {
                if (MessageService.RunCustomDialog(dlg, this) == (int)Gtk.ResponseType.Ok)
                {
                    PolicySet pset = new PolicySet();
                    pset.CopyFrom(dlg.SelectedItem.Policies);
                    pset.Name = GetValidName(dlg.PolicyName);
                    sets.Add(pset);
                    FillPolicySets();
                    policiesCombo.Active = sets.IndexOf(pset);
                }
            } finally {
                dlg.Destroy();
            }
        }
		void HandleFromProject (object sender, EventArgs e)
		{
			ImportProjectPolicyDialog dlg = new ImportProjectPolicyDialog ();
			try {
				if (MessageService.RunCustomDialog (dlg, this) == (int) Gtk.ResponseType.Ok) {
					PolicySet pset = new PolicySet ();
					pset.CopyFrom (dlg.SelectedItem.Policies);
					pset.Name = GetUnusedName (dlg.PolicyName);
					sets.Add (pset);
					FillPolicySets ();
					policiesCombo.Active = sets.IndexOf (pset);
				}
			} finally {
				dlg.Destroy ();
			}
		}