Commit 73e7fbb1 authored by Louise.Treuil's avatar Louise.Treuil
Browse files

résolution bug

parent 56e8aca3
......@@ -253,8 +253,8 @@ namespace Menus.Acquisition.Controller
private string GetUniqueFileName()
{
return app.model.GetCurrentUser().LastName + app.model.GetCurrentUser().FirstName +
DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss");
return app.model.GetCurrentUser().NickName +
DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); //à modifier ??
}
protected override void Enter()
......@@ -307,7 +307,7 @@ namespace Menus.Acquisition.Controller
protected void OnUser(UserData userSelected)
{
app.model.SetCurrentUser(userSelected);
app.view.currentConfigValue.text = userSelected.FirstName + " " + userSelected.LastName;
app.view.currentConfigValue.text = userSelected.NickName;
}
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());
......
......@@ -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.LastName;
newButton.text.text = user.FirstName + " " + user.LastName;
newButton.gameObject.name = user.NickName;
newButton.text.text = user.NickName;
newButton.user = user;
newButton.button.onClick.AddListener(() =>
{
......
......@@ -215,8 +215,8 @@ namespace Menus.Demonstration.Controller
private string GetUniqueFileName()
{
return app.model.GetCurrentUser().LastName + app.model.GetCurrentUser().FirstName +
DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss");
return app.model.GetCurrentUser().NickName +
DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); //à modifier ?
}
protected override void Enter()
......@@ -250,7 +250,7 @@ namespace Menus.Demonstration.Controller
protected void OnUser(UserData userSelected)
{
app.model.SetCurrentUser(userSelected);
app.view.currentConfigValue.text = userSelected.FirstName + " " + userSelected.LastName;
app.view.currentConfigValue.text = userSelected.NickName;
}
protected void OnDevice(DevicesInfos.Device device)
......
......@@ -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.LastName;
newButton.text.text = user.FirstName + " " + user.LastName;
newButton.gameObject.name = user.NickName;
newButton.text.text = user.NickName;
newButton.user = user;
newButton.button.onClick.AddListener(() =>
{
......
......@@ -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.LastName;
app.view.currentConfigValue.text = userSelected.NickName;
}
public void ClosePanels()
......
......@@ -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.LastName;
newButton.text.text = user.FirstName + " " + user.LastName;
newButton.gameObject.name = user.NickName;
newButton.text.text = user.NickName;
newButton.user = user;
newButton.button.onClick.AddListener(() =>
{
......
......@@ -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@gmail.fr", "30", "183", "72", "left", "okiugbh", "Pgm1", "0", "[]"));
app.model.GetUsers().Clear();
app.model.SetUsers(UserManager.GetInstance().GetUsers());
app.view.RefreshUserList();
......
......@@ -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.LastName;
newButton.text.text = user.FirstName + " " + user.LastName;
newButton.gameObject.name = user.NickName;
newButton.text.text = user.NickName;
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["FirstName"].input_text.text,
dicInputAttribute["LastName"].input_text.text,
dicInputAttribute["NickName"].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);
}
......
......@@ -44,13 +44,17 @@ namespace Recognizer
"</annotation>" +
"\n\t</annotationXML>" +
"\n\t<annotationXML type='user'>" +
"\n\t\t<annotation type='lastName'>" + _currentUser.LastName + "</annotation>" +
"\n\t\t<annotation type='firstName'>" + _currentUser.FirstName + "</annotation>" +
"\n\t\t<annotation type='nickName'>" + _currentUser.NickName + "</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='program'>" + _currentUser.Program + "</annotation>" +
"\n\t\t<annotation type='programAdv'>" + _currentUser.ProgramAdv + "</annotation>" +
"\n\t\t<annotation type='pastInfos'>" + _currentUser.PastInfos + "</annotation>" +
"\n\t\t<annotation type='pwd'>" + _currentUser.EncryptedPwd + "</annotation>" +
"\n\t</annotationXML>" + directives;
string rawdata = "\n\t<traceGroup>";
......
......@@ -38,7 +38,7 @@ public class UserData
Constructor for UserData
*/
public UserData(string NickName, string Mail, string age, string weight, string size, string EncryptedPwd, string Program, string ProgramAdv, string PastInfos)
public UserData(string NickName, string Mail, string age, string weight, string size, string hand, string EncryptedPwd, string Program, string ProgramAdv, string PastInfos)
{
Id = Guid.NewGuid().ToString("N");
this.NickName=NickName;
......@@ -53,7 +53,7 @@ public class UserData
this.PastInfos=PastInfos;
}
public UserData(string id , string NickName, string Mail, string age, string weight, string size, string EncryptedPwd, string Program, string ProgramAdv, string PastInfos)
public UserData(string id , string NickName, string Mail, string age, string weight, string size, string hand, string EncryptedPwd, string Program, string ProgramAdv, string PastInfos)
{
this.Id = id;
this.NickName=NickName;
......
m_EditorVersion: 2019.2.21f1
m_EditorVersionWithRevision: 2019.2.21f1 (9d528d026557)
m_EditorVersion: 2019.2.9f1
m_EditorVersionWithRevision: 2019.2.9f1 (ebce4d76e6e8)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment