- Timestamp:
- 06/11/12 14:29:26 (12 years ago)
- Location:
- branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserInformationView.Designer.cs
r7942 r7982 33 33 this.userNameTextBox = new System.Windows.Forms.TextBox(); 34 34 this.splitContainer = new System.Windows.Forms.SplitContainer(); 35 this.rolesListView = new System.Windows.Forms.ListView(); 36 this.columnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 this.imageList = new System.Windows.Forms.ImageList(this.components); 35 38 this.groupsListView = new System.Windows.Forms.ListView(); 36 this.rolesListView = new System.Windows.Forms.ListView();37 this.imageList = new System.Windows.Forms.ImageList(this.components);38 this.columnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));39 39 this.groupsColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 40 this.label5 = new System.Windows.Forms.Label(); 41 this.emailTextBox = new System.Windows.Forms.TextBox(); 40 42 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 41 43 this.splitContainer.Panel1.SuspendLayout(); … … 47 49 // 48 50 this.changePasswordButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 49 this.changePasswordButton.Location = new System.Drawing.Point(316, 2 09);51 this.changePasswordButton.Location = new System.Drawing.Point(316, 231); 50 52 this.changePasswordButton.Name = "changePasswordButton"; 51 53 this.changePasswordButton.Size = new System.Drawing.Size(112, 23); … … 72 74 this.fullNameTextBox.Size = new System.Drawing.Size(359, 20); 73 75 this.fullNameTextBox.TabIndex = 16; 76 this.fullNameTextBox.TextChanged += new System.EventHandler(this.fullNameTextBox_TextChanged); 74 77 // 75 78 // label4 … … 106 109 this.userNameTextBox.Location = new System.Drawing.Point(69, 3); 107 110 this.userNameTextBox.Name = "userNameTextBox"; 111 this.userNameTextBox.ReadOnly = true; 108 112 this.userNameTextBox.Size = new System.Drawing.Size(359, 20); 109 113 this.userNameTextBox.TabIndex = 15; … … 114 118 | System.Windows.Forms.AnchorStyles.Left) 115 119 | System.Windows.Forms.AnchorStyles.Right))); 116 this.splitContainer.Location = new System.Drawing.Point(3, 55);120 this.splitContainer.Location = new System.Drawing.Point(3, 81); 117 121 this.splitContainer.Name = "splitContainer"; 118 122 // … … 126 130 this.splitContainer.Panel2.Controls.Add(this.groupsListView); 127 131 this.splitContainer.Panel2.Controls.Add(this.label4); 128 this.splitContainer.Size = new System.Drawing.Size(425, 14 8);132 this.splitContainer.Size = new System.Drawing.Size(425, 144); 129 133 this.splitContainer.SplitterDistance = 211; 130 134 this.splitContainer.TabIndex = 20; 135 // 136 // rolesListView 137 // 138 this.rolesListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 139 | System.Windows.Forms.AnchorStyles.Left) 140 | System.Windows.Forms.AnchorStyles.Right))); 141 this.rolesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 142 this.columnHeader}); 143 this.rolesListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 144 this.rolesListView.HideSelection = false; 145 this.rolesListView.Location = new System.Drawing.Point(3, 16); 146 this.rolesListView.Name = "rolesListView"; 147 this.rolesListView.Size = new System.Drawing.Size(205, 125); 148 this.rolesListView.SmallImageList = this.imageList; 149 this.rolesListView.TabIndex = 18; 150 this.rolesListView.UseCompatibleStateImageBehavior = false; 151 this.rolesListView.View = System.Windows.Forms.View.Details; 152 // 153 // columnHeader 154 // 155 this.columnHeader.Width = 100; 156 // 157 // imageList 158 // 159 this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 160 this.imageList.ImageSize = new System.Drawing.Size(16, 16); 161 this.imageList.TransparentColor = System.Drawing.Color.Transparent; 131 162 // 132 163 // groupsListView … … 141 172 this.groupsListView.Location = new System.Drawing.Point(3, 16); 142 173 this.groupsListView.Name = "groupsListView"; 143 this.groupsListView.Size = new System.Drawing.Size(204, 12 9);174 this.groupsListView.Size = new System.Drawing.Size(204, 125); 144 175 this.groupsListView.SmallImageList = this.imageList; 145 176 this.groupsListView.TabIndex = 19; … … 147 178 this.groupsListView.View = System.Windows.Forms.View.Details; 148 179 // 149 // rolesListView150 //151 this.rolesListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)152 | System.Windows.Forms.AnchorStyles.Left)153 | System.Windows.Forms.AnchorStyles.Right)));154 this.rolesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {155 this.columnHeader});156 this.rolesListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;157 this.rolesListView.HideSelection = false;158 this.rolesListView.Location = new System.Drawing.Point(3, 16);159 this.rolesListView.Name = "rolesListView";160 this.rolesListView.Size = new System.Drawing.Size(205, 129);161 this.rolesListView.SmallImageList = this.imageList;162 this.rolesListView.TabIndex = 18;163 this.rolesListView.UseCompatibleStateImageBehavior = false;164 this.rolesListView.View = System.Windows.Forms.View.Details;165 //166 // imageList167 //168 this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;169 this.imageList.ImageSize = new System.Drawing.Size(16, 16);170 this.imageList.TransparentColor = System.Drawing.Color.Transparent;171 //172 // columnHeader173 //174 this.columnHeader.Width = 100;175 //176 180 // groupsColumnHeader 177 181 // 178 182 this.groupsColumnHeader.Width = 100; 183 // 184 // label5 185 // 186 this.label5.AutoSize = true; 187 this.label5.Location = new System.Drawing.Point(0, 58); 188 this.label5.Name = "label5"; 189 this.label5.Size = new System.Drawing.Size(39, 13); 190 this.label5.TabIndex = 21; 191 this.label5.Text = "E-Mail:"; 192 // 193 // emailTextBox 194 // 195 this.emailTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 196 | System.Windows.Forms.AnchorStyles.Right))); 197 this.emailTextBox.Location = new System.Drawing.Point(69, 55); 198 this.emailTextBox.Name = "emailTextBox"; 199 this.emailTextBox.Size = new System.Drawing.Size(359, 20); 200 this.emailTextBox.TabIndex = 22; 201 this.emailTextBox.TextChanged += new System.EventHandler(this.emailTextBox_TextChanged); 179 202 // 180 203 // LightweightUserInformationView … … 182 205 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 183 206 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 207 this.Controls.Add(this.emailTextBox); 208 this.Controls.Add(this.label5); 184 209 this.Controls.Add(this.splitContainer); 185 210 this.Controls.Add(this.changePasswordButton); … … 189 214 this.Controls.Add(this.userNameTextBox); 190 215 this.Name = "LightweightUserInformationView"; 191 this.Size = new System.Drawing.Size(431, 2 35);216 this.Size = new System.Drawing.Size(431, 257); 192 217 this.splitContainer.Panel1.ResumeLayout(false); 193 218 this.splitContainer.Panel1.PerformLayout(); … … 216 241 private System.Windows.Forms.ColumnHeader columnHeader; 217 242 private System.Windows.Forms.ColumnHeader groupsColumnHeader; 243 private System.Windows.Forms.Label label5; 244 private System.Windows.Forms.TextBox emailTextBox; 218 245 } 219 246 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserInformationView.cs
r7942 r7982 20 20 #endregion 21 21 22 using System; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.MainForm; … … 47 48 userNameTextBox.Clear(); 48 49 fullNameTextBox.Clear(); 50 emailTextBox.Clear(); 49 51 } else { 50 52 userNameTextBox.Text = Content.UserName; 51 53 fullNameTextBox.Text = Content.FullName; 54 emailTextBox.Text = Content.EMail; 52 55 53 56 foreach (Role r in Content.Roles) … … 89 92 return listViewItem; 90 93 } 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 91 116 } 92 117 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.Designer.cs
r7611 r7982 1 namespace HeuristicLab.Clients.Access.Views { 1 using System; 2 namespace HeuristicLab.Clients.Access.Views { 2 3 partial class RefreshableLightweightUserInformationView { 3 4 /// <summary> … … 12 13 protected override void Dispose(bool disposing) { 13 14 if (disposing && (components != null)) { 15 lightweightUserInformationView.UserInformationChanged -= new EventHandler(lightweightUserInformationView_Changed); 14 16 components.Dispose(); 15 17 } … … 24 26 /// </summary> 25 27 private void InitializeComponent() { 28 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RefreshableLightweightUserInformationView)); 26 29 this.lightweightUserInformationView = new HeuristicLab.Clients.Access.Views.LightweightUserInformationView(); 30 this.storeButton = new System.Windows.Forms.Button(); 27 31 this.SuspendLayout(); 28 32 // … … 44 48 this.lightweightUserInformationView.TabIndex = 2; 45 49 // 50 // storeButton 51 // 52 this.storeButton.Enabled = false; 53 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; 54 this.storeButton.Location = new System.Drawing.Point(34, 3); 55 this.storeButton.Name = "storeButton"; 56 this.storeButton.Size = new System.Drawing.Size(24, 24); 57 this.storeButton.TabIndex = 3; 58 this.storeButton.UseVisualStyleBackColor = true; 59 this.storeButton.Click += new System.EventHandler(this.storeButton_Click); 60 // 46 61 // RefreshableLightweightUserInformationView 47 62 // … … 49 64 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 50 65 this.Controls.Add(this.lightweightUserInformationView); 66 this.Controls.Add(this.storeButton); 51 67 this.Name = "RefreshableLightweightUserInformationView"; 52 68 this.Size = new System.Drawing.Size(384, 281); 69 this.Controls.SetChildIndex(this.storeButton, 0); 53 70 this.Controls.SetChildIndex(this.lightweightUserInformationView, 0); 54 71 this.Controls.SetChildIndex(this.refreshButton, 0); … … 60 77 61 78 private LightweightUserInformationView lightweightUserInformationView; 79 private System.Windows.Forms.Button storeButton; 62 80 63 81 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.cs
r7635 r7982 32 32 private void RefreshUserData() { 33 33 UserInformation.Instance.Refresh(); 34 lightweightUserInformationView.UserInformationChanged += new EventHandler(lightweightUserInformationView_Changed); 35 } 36 37 void lightweightUserInformationView_Changed(object sender, EventArgs e) { 38 if (!storeButton.Enabled) storeButton.Enabled = true; 34 39 } 35 40 … … 44 49 base.Content_Refreshing(sender, e); 45 50 lightweightUserInformationView.Enabled = false; 51 storeButton.Enabled = false; 46 52 } 47 53 } … … 61 67 } 62 68 } 69 70 private void storeButton_Click(object sender, EventArgs e) { 71 AccessClient.Instance.ExecuteActionAsync(new Action(delegate { 72 AccessClient.CallAccessService(x => x.UpdateLightweightUser(UserInformation.Instance.User)); 73 }), HeuristicLab.PluginInfrastructure.ErrorHandling.ShowErrorDialog); 74 } 63 75 } 64 76 }
Note: See TracChangeset
for help on using the changeset viewer.