Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/13/12 16:25:30 (13 years ago)
Author:
ascheibe
Message:

#1174 added a dialog for changing the user password

Location:
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews
Files:
2 added
5 edited

Legend:

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

    r7599 r7611  
    4343      //
    4444      this.changePasswordButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    45       this.changePasswordButton.Location = new System.Drawing.Point(466, 308);
     45      this.changePasswordButton.Location = new System.Drawing.Point(316, 209);
    4646      this.changePasswordButton.Name = "changePasswordButton";
    4747      this.changePasswordButton.Size = new System.Drawing.Size(112, 23);
     
    4949      this.changePasswordButton.Text = "Change Password";
    5050      this.changePasswordButton.UseVisualStyleBackColor = true;
     51      this.changePasswordButton.Click += new System.EventHandler(this.changePasswordButton_Click);
    5152      //
    5253      // label3
     
    6364      this.fullNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6465                  | System.Windows.Forms.AnchorStyles.Right)));
    65       this.fullNameTextBox.Location = new System.Drawing.Point(74, 29);
     66      this.fullNameTextBox.Location = new System.Drawing.Point(69, 29);
    6667      this.fullNameTextBox.Name = "fullNameTextBox";
    67       this.fullNameTextBox.Size = new System.Drawing.Size(507, 20);
     68      this.fullNameTextBox.Size = new System.Drawing.Size(359, 20);
    6869      this.fullNameTextBox.TabIndex = 16;
    6970      //
     
    8081      //
    8182      this.label1.AutoSize = true;
    82       this.label1.Location = new System.Drawing.Point(5, 6);
     83      this.label1.Location = new System.Drawing.Point(0, 6);
    8384      this.label1.Name = "label1";
    8485      this.label1.Size = new System.Drawing.Size(63, 13);
     
    9293                  | System.Windows.Forms.AnchorStyles.Right)));
    9394      this.groupsListBox.FormattingEnabled = true;
    94       this.groupsListBox.Location = new System.Drawing.Point(3, 16);
     95      this.groupsListBox.Location = new System.Drawing.Point(0, 17);
     96      this.groupsListBox.Margin = new System.Windows.Forms.Padding(0);
    9597      this.groupsListBox.Name = "groupsListBox";
    96       this.groupsListBox.Size = new System.Drawing.Size(277, 225);
     98      this.groupsListBox.Size = new System.Drawing.Size(210, 121);
    9799      this.groupsListBox.TabIndex = 14;
    98100      //
     
    103105                  | System.Windows.Forms.AnchorStyles.Right)));
    104106      this.rolesListBox.FormattingEnabled = true;
    105       this.rolesListBox.Location = new System.Drawing.Point(3, 16);
     107      this.rolesListBox.Location = new System.Drawing.Point(0, 17);
     108      this.rolesListBox.Margin = new System.Windows.Forms.Padding(0);
    106109      this.rolesListBox.Name = "rolesListBox";
    107       this.rolesListBox.Size = new System.Drawing.Size(280, 225);
     110      this.rolesListBox.Size = new System.Drawing.Size(211, 121);
    108111      this.rolesListBox.TabIndex = 13;
    109112      //
     
    111114      //
    112115      this.label2.AutoSize = true;
    113       this.label2.Location = new System.Drawing.Point(5, 32);
     116      this.label2.Location = new System.Drawing.Point(0, 32);
    114117      this.label2.Name = "label2";
    115118      this.label2.Size = new System.Drawing.Size(57, 13);
     
    121124      this.userNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    122125                  | System.Windows.Forms.AnchorStyles.Right)));
    123       this.userNameTextBox.Location = new System.Drawing.Point(74, 3);
     126      this.userNameTextBox.Location = new System.Drawing.Point(69, 3);
    124127      this.userNameTextBox.Name = "userNameTextBox";
    125       this.userNameTextBox.Size = new System.Drawing.Size(507, 20);
     128      this.userNameTextBox.Size = new System.Drawing.Size(359, 20);
    126129      this.userNameTextBox.TabIndex = 15;
    127130      //
     
    131134                  | System.Windows.Forms.AnchorStyles.Left)
    132135                  | System.Windows.Forms.AnchorStyles.Right)));
    133       this.splitContainer.Location = new System.Drawing.Point(8, 55);
     136      this.splitContainer.Location = new System.Drawing.Point(3, 55);
    134137      this.splitContainer.Name = "splitContainer";
    135138      //
     
    143146      this.splitContainer.Panel2.Controls.Add(this.label4);
    144147      this.splitContainer.Panel2.Controls.Add(this.groupsListBox);
    145       this.splitContainer.Size = new System.Drawing.Size(573, 247);
    146       this.splitContainer.SplitterDistance = 286;
     148      this.splitContainer.Size = new System.Drawing.Size(425, 148);
     149      this.splitContainer.SplitterDistance = 211;
    147150      this.splitContainer.TabIndex = 20;
    148151      //
     
    158161      this.Controls.Add(this.userNameTextBox);
    159162      this.Name = "LightweightUserInformationView";
    160       this.Size = new System.Drawing.Size(584, 334);
     163      this.Size = new System.Drawing.Size(431, 235);
    161164      this.splitContainer.Panel1.ResumeLayout(false);
    162165      this.splitContainer.Panel1.PerformLayout();
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserInformationView.cs

    r7599 r7611  
    3838    protected override void OnContentChanged() {
    3939      base.OnContentChanged();
     40      rolesListBox.Items.Clear();
     41      groupsListBox.Items.Clear();
     42
    4043      if (Content == null) {
    4144        userNameTextBox.Clear();
    4245        fullNameTextBox.Clear();
    43         rolesListBox.Items.Clear();
    44         groupsListBox.Items.Clear();
    4546      } else {
    4647        userNameTextBox.Text = Content.UserName;
     
    5051      }
    5152    }
     53
     54    private void changePasswordButton_Click(object sender, System.EventArgs e) {
     55      using (ChangePasswordDialog dialog = new ChangePasswordDialog()) {
     56        dialog.ShowDialog(this);
     57      }
     58    }
    5259  }
    5360}
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.Designer.cs

    r7599 r7611  
    2727      this.SuspendLayout();
    2828      //
     29      // refreshButton
     30      //
     31      this.refreshButton.Location = new System.Drawing.Point(4, 3);
     32      //
    2933      // lightweightUserInformationView
    3034      //
     
    3741      this.lightweightUserInformationView.Name = "lightweightUserInformationView";
    3842      this.lightweightUserInformationView.ReadOnly = false;
    39       this.lightweightUserInformationView.Size = new System.Drawing.Size(473, 375);
     43      this.lightweightUserInformationView.Size = new System.Drawing.Size(378, 245);
    4044      this.lightweightUserInformationView.TabIndex = 2;
    4145      //
     
    4650      this.Controls.Add(this.lightweightUserInformationView);
    4751      this.Name = "RefreshableLightweightUserInformationView";
    48       this.Size = new System.Drawing.Size(479, 411);
     52      this.Size = new System.Drawing.Size(384, 281);
    4953      this.Controls.SetChildIndex(this.lightweightUserInformationView, 0);
    5054      this.Controls.SetChildIndex(this.refreshButton, 0);
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.cs

    r7599 r7611  
    2121
    2222using System;
     23using System.Windows.Forms;
    2324
    2425namespace HeuristicLab.Clients.Access.Views {
     
    5657        base.Content_Refreshed(sender, e);
    5758        lightweightUserInformationView.Enabled = true;
    58         lightweightUserInformationView.Content = UserInformation.Instance.User;
     59        if (!UserInformation.Instance.UserExists) {
     60          MessageBox.Show("Couldn't fetch user information from the server." + Environment.NewLine + "Please verify that you have an existing user and that your user name and password is correct. ", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
     61          lightweightUserInformationView.Content = null;
     62        } else {
     63          lightweightUserInformationView.Content = UserInformation.Instance.User;
     64        }
    5965      }
    6066    }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.Designer.cs

    r7599 r7611  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.closeButton = new System.Windows.Forms.Button();
    2627      this.refreshableLightweightUserInformationView = new HeuristicLab.Clients.Access.Views.RefreshableLightweightUserInformationView();
    27       this.closeButton = new System.Windows.Forms.Button();
    2828      this.SuspendLayout();
     29      //
     30      // closeButton
     31      //
     32      this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     33      this.closeButton.Location = new System.Drawing.Point(16, 245);
     34      this.closeButton.Name = "closeButton";
     35      this.closeButton.Size = new System.Drawing.Size(75, 23);
     36      this.closeButton.TabIndex = 1;
     37      this.closeButton.Text = "OK";
     38      this.closeButton.UseVisualStyleBackColor = true;
     39      this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
    2940      //
    3041      // refreshableLightweightUserInformationView
     
    3849      this.refreshableLightweightUserInformationView.Name = "refreshableLightweightUserInformationView";
    3950      this.refreshableLightweightUserInformationView.ReadOnly = false;
    40       this.refreshableLightweightUserInformationView.Size = new System.Drawing.Size(464, 299);
     51      this.refreshableLightweightUserInformationView.Size = new System.Drawing.Size(362, 262);
    4152      this.refreshableLightweightUserInformationView.TabIndex = 0;
    42       //
    43       // closeButton
    44       //
    45       this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    46       this.closeButton.Location = new System.Drawing.Point(401, 328);
    47       this.closeButton.Name = "closeButton";
    48       this.closeButton.Size = new System.Drawing.Size(75, 23);
    49       this.closeButton.TabIndex = 1;
    50       this.closeButton.Text = "OK";
    51       this.closeButton.UseVisualStyleBackColor = true;
    52       this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
    5353      //
    5454      // UserInformationDialog
     
    5757      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    5858      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    59       this.ClientSize = new System.Drawing.Size(488, 363);
     59      this.ClientSize = new System.Drawing.Size(386, 286);
    6060      this.Controls.Add(this.closeButton);
    6161      this.Controls.Add(this.refreshableLightweightUserInformationView);
Note: See TracChangeset for help on using the changeset viewer.