Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Joona Romppanen
/
Moya Info Tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6ec28ff3
authored
Jun 09, 2017
by
Joona Romppanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix image ifecycle for user details editor
1 parent
43b5f7d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
MoyaSignup/TakePictureControl.cs
MoyaSignup/UserDetailsEditor.Designer.cs
MoyaSignup/UserDetailsEditor.cs
MoyaSignup/TakePictureControl.cs
View file @
6ec28ff
...
...
@@ -51,6 +51,7 @@ namespace MoyaSignup
public
void
loadUserImage
(
User
user
)
{
pbIncoming
.
Image
?.
Dispose
();
PictureTaken
=
false
;
if
(
user
.
UserId
==
0
)
return
;
...
...
@@ -62,7 +63,8 @@ namespace MoyaSignup
{
using
(
Stream
stream
=
response
.
GetResponseStream
())
{
pbIncoming
.
Image
=
Bitmap
.
FromStream
(
stream
);
pbIncoming
.
Image
=
Image
.
FromStream
(
stream
);
pbIncoming
.
Update
();
}
}
...
...
MoyaSignup/UserDetailsEditor.Designer.cs
View file @
6ec28ff
...
...
@@ -285,7 +285,6 @@
this
.
lblMessage
.
Name
=
"lblMessage"
;
this
.
lblMessage
.
Size
=
new
System
.
Drawing
.
Size
(
555
,
73
);
this
.
lblMessage
.
TabIndex
=
23
;
this
.
lblMessage
.
Text
=
"label3"
;
this
.
lblMessage
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// dateTimePickerAge
...
...
MoyaSignup/UserDetailsEditor.cs
View file @
6ec28ff
...
...
@@ -93,7 +93,9 @@ namespace MoyaSignup
if
(
user
.
UserId
==
0
)
{
// new user
takePictureControl1
.
Clear
();
takePictureControl1
.
TakePicture
();
lblMessage
.
Text
=
""
;
txtFirstName
.
ReadOnly
=
false
;
txtLastName
.
ReadOnly
=
false
;
txtNick
.
ReadOnly
=
false
;
...
...
@@ -125,12 +127,12 @@ namespace MoyaSignup
{
// old user
takePictureControl1
.
loadUserImage
(
user
);
lblMessage
.
Text
=
"Voit pyytää muutoksia tietoihin infotiskillä"
;
btnSaveData
.
Text
=
"Tallenna kuva ja tulosta lipputosite"
;
btnSaveData
.
Visible
=
true
;
}
currentUser
=
user
;
lblMessage
.
Text
=
"Voit pyytää muutoksia tietoihin infotiskillä"
;
}
...
...
@@ -213,8 +215,8 @@ namespace MoyaSignup
private
void
UserDetailsEditor_Load
(
object
sender
,
EventArgs
e
)
{
lblMessage
.
Text
=
""
;
takePictureControl1
.
Clear
();
//
lblMessage.Text = "";
//
takePictureControl1.Clear();
takePictureControl1
.
Changed
+=
takePictureControl1_Changed
;
//if(Debugger.IsAttached)
// btnSaveData.Visible = true;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment