Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Samuel.Gaudemer
MoveOnProgress
Commits
34deed22
Commit
34deed22
authored
Feb 24, 2022
by
Louise.Treuil
Browse files
Merge branch 'Louise' into 'dev'
update UserData See merge request
Samuel.Gaudemer/moveonprogress!2
parents
5501f4da
50bb2980
Changes
13
Hide whitespace changes
Inline
Side-by-side
Assets/Scripts/Menus/Acquisition/Controller/AcquisitionController.cs
View file @
34deed22
...
...
@@ -253,7 +253,7 @@ namespace Menus.Acquisition.Controller
private
string
GetUniqueFileName
()
{
return
app
.
model
.
GetCurrentUser
().
LastName
+
app
.
model
.
GetCurrentUser
().
FirstNa
me
+
return
app
.
model
.
GetCurrentUser
().
NickNA
me
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd-HH-mm-ss"
);
}
...
...
@@ -307,7 +307,7 @@ namespace Menus.Acquisition.Controller
protected
void
OnUser
(
UserData
userSelected
)
{
app
.
model
.
SetCurrentUser
(
userSelected
);
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
FirstName
+
" "
+
userSelected
.
LastNa
me
;
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
NickNA
me
;
}
protected
void
OnDevice
(
DevicesInfos
.
Device
device
)
...
...
@@ -341,8 +341,7 @@ namespace Menus.Acquisition.Controller
if
(
app
.
model
.
GetDataBase
()
!=
null
)
{
app
.
view
.
CleanConfigPanel
();
app
.
view
.
User
.
text
=
app
.
model
.
GetCurrentUser
().
FirstName
+
" "
+
app
.
model
.
GetCurrentUser
().
LastName
;
app
.
view
.
User
.
text
=
app
.
model
.
GetCurrentUser
().
NickNAme
;
app
.
view
.
Device
.
text
=
app
.
model
.
GetDevice
().
ToString
();
app
.
view
.
Database
.
text
=
app
.
model
.
GetDataBase
().
Name
;
DBManager
.
GetInstance
().
SetCurrentDB
(
app
.
model
.
GetDataBase
());
...
...
Assets/Scripts/Menus/Acquisition/View/AcquisitionView.cs
View file @
34deed22
...
...
@@ -142,8 +142,8 @@ namespace Menus.Acquisition.View
foreach
(
UserData
user
in
listUsers
)
{
UserButton
newButton
=
Instantiate
(
userButton
,
ConfigContent
.
transform
,
false
);
newButton
.
gameObject
.
name
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
text
.
text
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
gameObject
.
name
=
user
.
NickNA
me
;
newButton
.
text
.
text
=
user
.
NickNA
me
;
newButton
.
user
=
user
;
newButton
.
button
.
onClick
.
AddListener
(()
=>
{
...
...
Assets/Scripts/Menus/Demonstration/Controller/DemonstrationController.cs
View file @
34deed22
...
...
@@ -215,7 +215,7 @@ namespace Menus.Demonstration.Controller
private
string
GetUniqueFileName
()
{
return
app
.
model
.
GetCurrentUser
().
LastName
+
app
.
model
.
GetCurrentUser
().
FirstNa
me
+
return
app
.
model
.
GetCurrentUser
().
NickNA
me
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd-HH-mm-ss"
);
}
...
...
@@ -250,7 +250,7 @@ namespace Menus.Demonstration.Controller
protected
void
OnUser
(
UserData
userSelected
)
{
app
.
model
.
SetCurrentUser
(
userSelected
);
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
FirstName
+
" "
+
userSelected
.
LastNa
me
;
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
NickNA
me
;
}
protected
void
OnDevice
(
DevicesInfos
.
Device
device
)
...
...
Assets/Scripts/Menus/Demonstration/View/DemonstrationView.cs
View file @
34deed22
...
...
@@ -63,8 +63,8 @@ namespace Menus.Demonstration.View
foreach
(
UserData
user
in
listUsers
)
{
UserButton
newButton
=
Instantiate
(
UserButton
,
ConfigContent
.
transform
,
false
);
newButton
.
gameObject
.
name
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
text
.
text
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
gameObject
.
name
=
user
.
NickNA
me
;
newButton
.
text
.
text
=
user
.
NickNA
me
;
newButton
.
user
=
user
;
newButton
.
button
.
onClick
.
AddListener
(()
=>
{
...
...
Assets/Scripts/Menus/UserApp/Controller/UserAppController.cs
View file @
34deed22
...
...
@@ -169,7 +169,7 @@ public class UserAppController : MenuController<UserAppApplication>
protected
void
OnUser
(
UserData
userSelected
)
{
app
.
model
.
SetCurrentUser
(
userSelected
);
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
FirstName
+
" "
+
userSelected
.
LastNa
me
;
app
.
view
.
currentConfigValue
.
text
=
userSelected
.
NickNA
me
;
}
public
void
ClosePanels
()
...
...
Assets/Scripts/Menus/UserApp/View/UserAppView.cs
View file @
34deed22
...
...
@@ -62,8 +62,8 @@ namespace Menus.UserApp.View
foreach
(
UserData
user
in
listUsers
)
{
UserButton
newButton
=
Instantiate
(
UserButton
,
ConfigContent
.
transform
,
false
);
newButton
.
gameObject
.
name
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
text
.
text
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
gameObject
.
name
=
user
.
NickNA
me
;
newButton
.
text
.
text
=
user
.
NickNA
me
;
newButton
.
user
=
user
;
newButton
.
button
.
onClick
.
AddListener
(()
=>
{
...
...
Assets/Scripts/Menus/UsersManagement/Controller/UsersManagementController.cs
View file @
34deed22
...
...
@@ -69,7 +69,7 @@ namespace Menus.UsersManagement.Controller
protected
void
OnAddUserClicked
()
{
UserManager
.
GetInstance
().
AddUser
(
new
UserData
(
"Jean"
,
"
Dupont
"
,
"30"
,
"183"
,
"72"
,
"right"
,
"
true
"
));
UserManager
.
GetInstance
().
AddUser
(
new
UserData
(
"Jean"
,
"
jean@mail.fr
"
,
"30"
,
"183"
,
"72"
,
"right"
,
"
ojkbj"
,
"P54"
,
"3"
,
"[]
"
));
app
.
model
.
GetUsers
().
Clear
();
app
.
model
.
SetUsers
(
UserManager
.
GetInstance
().
GetUsers
());
app
.
view
.
RefreshUserList
();
...
...
Assets/Scripts/Menus/UsersManagement/View/UsersManagementView.cs
View file @
34deed22
...
...
@@ -75,8 +75,8 @@ namespace Menus.UsersManagement.View
foreach
(
UserData
user
in
listUsers
)
{
UserButton
newButton
=
Instantiate
(
userButton
,
listUsersContent
.
transform
,
false
);
newButton
.
gameObject
.
name
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
text
.
text
=
user
.
FirstName
+
" "
+
user
.
LastNa
me
;
newButton
.
gameObject
.
name
=
user
.
NickNA
me
;
newButton
.
text
.
text
=
user
.
NickNA
me
;
newButton
.
user
=
user
;
newButton
.
button
.
onClick
.
AddListener
(()
=>
this
.
SelectedUser
(
newButton
));
}
...
...
@@ -99,13 +99,16 @@ namespace Menus.UsersManagement.View
public
void
SaveClicked
()
{
UserData
saveUser
=
new
UserData
(
app
.
model
.
GetCurrentUser
().
Id
,
dicInputAttribute
[
"
FirstNa
me"
].
input_text
.
text
,
dicInputAttribute
[
"
LastName
"
].
input_text
.
text
,
dicInputAttribute
[
"
NickNA
me"
].
input_text
.
text
,
dicInputAttribute
[
"
Mail
"
].
input_text
.
text
,
dicInputAttribute
[
"Age"
].
input_text
.
text
,
dicInputAttribute
[
"Weight"
].
input_text
.
text
,
dicInputAttribute
[
"Size"
].
input_text
.
text
,
dicInputAttribute
[
"Hand"
].
input_text
.
text
,
dicInputAttribute
[
"Beginner"
].
input_text
.
text
dicInputAttribute
[
"EncryptedPwd"
].
input_text
.
text
,
dicInputAttribute
[
"Program"
].
input_text
.
text
,
dicInputAttribute
[
"ProgramAdv"
].
input_text
.
text
,
dicInputAttribute
[
"PastInfos"
].
input_text
.
text
);
UsersManagementNotification
.
SaveUserClicked
(
saveUser
);
}
...
...
Assets/Scripts/Recognizer/DataTools/GestureDataInkML.cs
View file @
34deed22
...
...
@@ -44,13 +44,17 @@ namespace Recognizer
"</annotation>"
+
"\n\t</annotationXML>"
+
"\n\t<annotationXML type='user'>"
+
"\n\t\t<annotation type='
last
Name'>"
+
_currentUser
.
LastNa
me
+
"</annotation>"
+
"\n\t\t<annotation type='
firstName
'>"
+
_currentUser
.
FirstName
+
"</annotation>"
+
"\n\t\t<annotation type='
nick
Name'>"
+
_currentUser
.
NickNA
me
+
"</annotation>"
+
"\n\t\t<annotation type='
mail
'>"
+
_currentUser
.
Mail
+
"</annotation>"
+
"\n\t\t<annotation type='age'>"
+
_currentUser
.
Age
+
"</annotation>"
+
"\n\t\t<annotation type='weight'>"
+
_currentUser
.
Weight
+
"</annotation>"
+
"\n\t\t<annotation type='size'>"
+
_currentUser
.
Size
+
"</annotation>"
+
"\n\t\t<annotation type='hand'>"
+
_currentUser
.
Hand
+
"</annotation>"
+
"\n\t\t<annotation type='userId'>"
+
_currentUser
.
Id
+
"</annotation>"
+
"\n\t\t<annotation type='pwd'>"
+
_currentUser
.
EncryptedPwd
+
"</annotation>"
+
"\n\t\t<annotation type='pgm'>"
+
_currentUser
.
Program
+
"</annotation>"
+
"\n\t\t<annotation type='pgmAdv'>"
+
_currentUser
.
ProgramAdv
+
"</annotation>"
+
"\n\t\t<annotation type='pastinfos'>"
+
_currentUser
.
PastInfos
+
"</annotation>"
+
"\n\t</annotationXML>"
+
directives
;
string
rawdata
=
"\n\t<traceGroup>"
;
...
...
Assets/Scripts/Recognizer/DataTools/UserData.cs
View file @
34deed22
...
...
@@ -14,46 +14,58 @@ public class UserData
[
DataMember
]
public
string
Hand
{
get
;
set
;}
//left-handed, right-handed or both
[
DataMember
]
public
string
Beginner
{
get
;
set
;}
//tell if the user is a beginner or not
public
string
NickNAme
{
get
;
set
;}
//tell if the user is a beginner or not
[
DataMember
]
public
string
Id
{
get
;
set
;}
[
DataMember
]
public
string
FirstName
{
get
;
set
;}
public
string
Mail
{
get
;
set
;}
[
DataMember
]
public
string
LastName
{
get
;
set
;}
public
string
EncryptedPwd
{
get
;
set
;}
[
DataMember
]
public
string
Age
{
get
;
set
;}
[
DataMember
]
public
string
Weight
{
get
;
set
;}
[
DataMember
]
public
string
Size
{
get
;
set
;}
[
DataMember
]
public
string
Program
{
get
;
set
;}
[
DataMember
]
public
string
ProgramAdv
{
get
;
set
;}
[
DataMember
]
public
string
PastInfos
{
get
;
set
;}
/**
Constructor for UserData
*/
public
UserData
(
string
first
Name
,
string
lastName
,
string
age
,
string
weight
,
string
size
,
string
hand
,
string
beginner
)
public
UserData
(
string
nick
Name
,
string
mail
,
string
age
,
string
weight
,
string
size
,
string
hand
,
string
pwd
,
string
pgm
,
string
pgmAdv
,
string
pastinfos
)
{
Id
=
Guid
.
NewGuid
().
ToString
(
"N"
);
this
.
FirstName
=
first
Name
;
this
.
LastName
=
lastName
;
this
.
NickNAme
=
nick
Name
;
this
.
Mail
=
mail
;
this
.
Age
=
age
;
this
.
Weight
=
weight
;
this
.
Size
=
size
;
this
.
Hand
=
hand
;
this
.
Beginner
=
beginner
;
this
.
Program
=
pgm
;
this
.
ProgramAdv
=
pgmAdv
;
this
.
PastInfos
=
pastinfos
;
this
.
EncryptedPwd
=
pwd
;
}
public
UserData
(
string
id
,
string
first
Name
,
string
lastName
,
string
age
,
string
weight
,
string
size
,
string
hand
,
string
beginner
)
public
UserData
(
string
id
,
string
nick
Name
,
string
mail
,
string
age
,
string
weight
,
string
size
,
string
hand
,
string
pwd
,
string
pgm
,
string
pgmAdv
,
string
pastinfos
)
{
this
.
Id
=
id
;
this
.
FirstName
=
firstName
;
this
.
LastName
=
lastName
;
this
.
Age
=
age
;
this
.
Weight
=
weight
;
this
.
Size
=
size
;
this
.
Hand
=
hand
;
this
.
Beginner
=
beginner
;
this
.
NickNAme
=
nickName
;
this
.
Mail
=
mail
;
this
.
Age
=
age
;
this
.
Weight
=
weight
;
this
.
Size
=
size
;
this
.
Hand
=
hand
;
this
.
Program
=
pgm
;
this
.
ProgramAdv
=
pgmAdv
;
this
.
PastInfos
=
pastinfos
;
this
.
EncryptedPwd
=
pwd
;
}
/**
Serialize a user into Xml
...
...
Assets/Scripts/Recognizer/DataTools/UsersData/130c50f17b1242bb86fa0ca7aae9499d.xml
View file @
34deed22
<?xml version="1.0" encoding="utf-8"?>
<UserData
xmlns:i=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://schemas.datacontract.org/2004/07/"
>
<Age>
5
7
</Age>
<
Beginner>
fal
se
</
Beginner
>
<
FirstName>
Juste
</FirstName
>
<Age>
1
7
</Age>
<
NickName>
Ceri
se
</
NickName
>
<
Mail>
cerise@mail.fr
</Mail
>
<Hand>
left
</Hand>
<Id>
130c50f17b1242bb86fa0ca7aae9499d
</Id>
<
LastName>
Leblanc
</LastName
>
<
EncryptedPwd>
ooihujv
</EncryptedPwd
>
<Size>
174
</Size>
<Weight>
68
</Weight>
<Program>
P1
</Program>
<ProgramAdv>
0
</ProgramAdv>
<PastInfos>
[]
</PastInfos>
</UserData>
\ No newline at end of file
Assets/Scripts/Recognizer/DataTools/UsersData/33237bb9f04e4d938042927ff22a57fb.xml
View file @
34deed22
<?xml version="1.0" encoding="utf-8"?>
<UserData
xmlns:i=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://schemas.datacontract.org/2004/07/"
>
<Age>
2
1
</Age>
<
Beginner>
false
</Beginner
>
<
FirstName>
Mael
</FirstName
>
<Hand>
righ
t
</Hand>
<Age>
1
7
</Age>
<
NickName>
Michel
</NickName
>
<
Mail>
michel@mail.fr
</Mail
>
<Hand>
lef
t
</Hand>
<Id>
33237bb9f04e4d938042927ff22a57fb
</Id>
<LastName>
Laurent
</LastName>
<Size>
175
</Size>
<Weight>
60
</Weight>
<EncryptedPwd>
ooihujv
</EncryptedPwd>
<Size>
174
</Size>
<Weight>
68
</Weight>
<Program>
P2
</Program>
<ProgramAdv>
0
</ProgramAdv>
<PastInfos>
[]
</PastInfos>
</UserData>
\ No newline at end of file
Assets/Scripts/Recognizer/DataTools/UsersData/e089926559e24b2d8045e4d67b4a38cc.xml
View file @
34deed22
<?xml version="1.0" encoding="utf-8"?>
<UserData
xmlns:i=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://schemas.datacontract.org/2004/07/"
>
<Age>
2
1
</Age>
<
Beginner>
false
</Beginner
>
<
FirstName>
Baptiste
</FirstName
>
<Hand>
right
</Hand>
<Age>
1
7
</Age>
<
NickName>
Tom
</NickName
>
<
Mail>
tom@mail.fr
</Mail
>
<Hand>
left
</Hand>
<Id>
e089926559e24b2d8045e4d67b4a38cc
</Id>
<LastName>
Broyer
</LastName>
<Size>
183
</Size>
<Weight>
72
</Weight>
<EncryptedPwd>
ooihujv
</EncryptedPwd>
<Size>
174
</Size>
<Weight>
68
</Weight>
<Program>
P2
</Program>
<ProgramAdv>
0
</ProgramAdv>
<PastInfos>
[]
</PastInfos>
</UserData>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
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 comment