예제 #1
0
 protected void OnUsersEditActivated(object sender, EventArgs e)
 {
     if (config.CanPerform (IMR_PERM.USER_EDIT)) {
         if (userListWin == null) {
             UserListWin win = new UserListWin (config);
             win.TransientFor = this;
             win.DeleteEvent += delegate { userListWin = null; };
             win.DestroyEvent += delegate { userListWin = null; };
             win.Show ();
             userListWin = win;
         } else {
             userListWin.Present ();
         }
     } else if (config.CanPerform (IMR_PERM.USER_EDIT_SELF)) {
         UserEditorWin win = new UserEditorWin (UserEditorWin.TYPE.EDIT_SELF, config);
         win.Show ();
     }
 }
예제 #2
0
 protected void OnUsersNewActivated(object sender, EventArgs e)
 {
     UserEditorWin win = new UserEditorWin (UserEditorWin.TYPE.NEW, config);
     win.TransientFor = this;
     win.Show ();
 }
예제 #3
0
        private void EditSelected()
        {
            Gtk.ITreeNode[] selected = selection.SelectedNodes;
            if (selected.Length != 1) {
                throw new Exception ("Selection must be 1");
            }

            UserListNode node = (UserListNode) selected[0];
            UserEditorWin win = new UserEditorWin (UserEditorWin.TYPE.EDIT, config, node.Data);
            win.Show ();
        }