Example #1
0
 /// <summary>
 /// Action permettant à l'utilisateur de se connecter.
 /// </summary>
 private void LoginAccess()
 {
     if (_userService.Login(_login, Converter.SecureStringToString(this._password)))
     {
         ServiceUser.User loggedUser = _userService.GetUser(_login);
         if (loggedUser != null)
         {
             Console.WriteLine("Welcome back " + loggedUser.Firstname + "!");
             MainWindowViewModel.User = loggedUser;
             WindowLoader.Show("MainWindow");
             CloseSignal = true;
             return;
         }
         else
         {
             ErrorMessage = "Problème serveur: Impossible de connecter cet utilisateur";
             Console.WriteLine("Failed to get logged user");
         }
     }
     else
     {
         ErrorMessage = "Identifiant ou mot de passe invalide.";
         Console.WriteLine("Invalid credentials");
     }
 }
Example #2
0
    public override void Enter(FSMState lastState)
    {
        // base.Enter(lastState);
        Time.timeScale = 0F;

        Managers.Audio.Play(SoundLost, GameLogicScript.CurrentMemeko.transform.position, 1F, 1F, 1F);
        WindowLoader.Show("LoseGameWindow", "Anchor(Center)");
    }
    public override void Enter(FSMState lastState)
    {
        // base.Enter(lastState);
        //Time.timeScale = 0F;
        GameLogicScript.ReplayControl.StopRecording();
        GameLogicScript.ShowRecordIndicator(false);

        GameLogicScript.ReplayControl.SetMetaData("Pack", Managers.Game.Preferences.CurrentPackName);
        GameLogicScript.ReplayControl.SetMetaData("Level", Managers.Game.Preferences.CurrentLevelName);
        GameLogicScript.ReplayControl.SetMetaData("Mode", Managers.Game.Preferences.GameType.ToString());
        GameLogicScript.ReplayControl.SetMetaData("Score", GameLogicScript.CurrentScore);

        WindowLoader.Show("WinGameWindow", "Anchor(Center)");


        if (GameLogicScript.CurrentScore > GameLogicScript.CurrenTopScore)
        {
            Managers.GameCircleAmazon.UpdateAchievements();
        }
    }
Example #4
0
    public override void ActionPerformed()
    {
        var parent = WindowLoader.Show(WindowPrefabName, WindowParent);

        var script = parent.GetComponentInChildren <ActionShowLoadOwner>();

        if (script != null)
        {
            script.Target      = LoadButton;
            script.PanelTarget = BackPanel;
        }
        else
        {
            Debug.LogWarning("No ActionShowLoadOwner script was found");
        }

        if (BackPanel != null)
        {
            NGUITools.SetActive(BackPanel.gameObject, false);
        }
    }
Example #5
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            WindowLoader.Show("Login");
        }
Example #6
0
 /// <summary>
 /// Fonction pour déconnecter l'utilisateur.
 /// </summary>
 private void Logout()
 {
     this._userService.Disconnect(MainWindowViewModel.User.Login);
     WindowLoader.Show("Login");
     this.CloseSignal = true;
 }
 private void AddUser()
 {
     WindowLoader.Show("AddUser", new AddUserViewModel(this));
 }
Example #8
0
 public override void ActionPerformed()
 {
     WindowLoader.Show(WindowPrefabName, WindowParent);
 }
Example #9
0
 private void AddObservation()
 {
     WindowLoader.Show("AddObservation", new AddObservationViewModel(Id, this));
 }
Example #10
0
 /// <summary>
 /// Action permettant à l'utilisateur d'ajouter un nouvel utilisateur.
 /// </summary>
 private void AddUser()
 {
     WindowLoader.Show("AddUser");
 }
Example #11
0
 /// <summary>
 /// Action permettant à l'utilisateur d'ajouter un nouveau patient.
 /// </summary>
 private void AddPatient()
 {
     WindowLoader.Show("AddPatient");
 }
Example #12
0
 private void AddPatient()
 {
     WindowLoader.Show("AddPatient", new AddPatientViewModel(this));
 }