Exemplo n.º 1
0
        void AddEntry()
        {
            var newRule = new NameConventionRule();

            newRule.Name = "New Rule";
            var diag   = new NameConventionEditRuleDialog(newRule);
            var result = MessageService.ShowCustomDialog(diag);

            if (result == (int)ResponseType.Ok)
            {
                treeStore.AppendValues(newRule);
            }
            OnPolicyChanged(EventArgs.Empty);
        }
Exemplo n.º 2
0
        void EditSelectedEntry()
        {
            TreeIter iter;

            if (!treeviewConventions.Selection.GetSelected(out iter))
            {
                return;
            }
            var rule   = treeStore.GetValue(iter, 0) as NameConventionRule;
            var diag   = new NameConventionEditRuleDialog(rule);
            int result = MessageService.ShowCustomDialog(diag);

            treeviewConventions.QueueResize();
            if (result == (int)Gtk.ResponseType.Ok)
            {
                OnPolicyChanged(EventArgs.Empty);
            }
        }
		void EditSelectedEntry ()
		{
			TreeIter iter;
			if (!treeviewConventions.Selection.GetSelected (out iter))
				return;
			var rule = treeStore.GetValue (iter, 0) as NameConventionRule;
			var diag = new NameConventionEditRuleDialog (rule);
			int result = MessageService.ShowCustomDialog (diag);
			treeviewConventions.QueueResize ();
			if (result == (int)Gtk.ResponseType.Ok) 
				OnPolicyChanged (EventArgs.Empty);
		}
		void AddEntry ()
		{
			var newRule = new NameConventionRule ();
			newRule.Name = "New Rule";
			var diag = new NameConventionEditRuleDialog (newRule);
			var result = MessageService.ShowCustomDialog (diag);
			if (result == (int)ResponseType.Ok)
				treeStore.AppendValues (newRule);
			OnPolicyChanged (EventArgs.Empty);
		}