Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/11/12 14:29:26 (12 years ago)
Author:
ascheibe
Message:

#1648

  • always update the client information
  • allow a normal user to change the FullName and E-Mail
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserInformationView.cs

    r7942 r7982  
    2020#endregion
    2121
     22using System;
    2223using System.Windows.Forms;
    2324using HeuristicLab.MainForm;
     
    4748        userNameTextBox.Clear();
    4849        fullNameTextBox.Clear();
     50        emailTextBox.Clear();
    4951      } else {
    5052        userNameTextBox.Text = Content.UserName;
    5153        fullNameTextBox.Text = Content.FullName;
     54        emailTextBox.Text = Content.EMail;
    5255
    5356        foreach (Role r in Content.Roles)
     
    8992      return listViewItem;
    9093    }
     94
     95    private void fullNameTextBox_TextChanged(object sender, System.EventArgs e) {
     96      if (UserInformation.Instance.User.FullName != fullNameTextBox.Text) {
     97        UserInformation.Instance.User.FullName = fullNameTextBox.Text;
     98        OnUserInformationChanged();
     99      }
     100    }
     101
     102    private void emailTextBox_TextChanged(object sender, System.EventArgs e) {
     103      if (UserInformation.Instance.User.EMail != emailTextBox.Text) {
     104        UserInformation.Instance.User.EMail = emailTextBox.Text;
     105        OnUserInformationChanged();
     106      }
     107    }
     108
     109    #region Events
     110    public event EventHandler UserInformationChanged;
     111    private void OnUserInformationChanged() {
     112      EventHandler handler = UserInformationChanged;
     113      if (handler != null) handler(this, EventArgs.Empty);
     114    }
     115    #endregion
    91116  }
    92117}
Note: See TracChangeset for help on using the changeset viewer.