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)");
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        win = WindowLoader.Instance;
        win.LoadVRM = LoadVRM;
        win.ImportVRM = ImportVRM;

        win.Calibrate = Calibrate;
        win.EndCalibrate = EndCalibrate;

        win.SetLipSyncEnable = SetLipSyncEnable;
        win.GetLipSyncDevices = GetLipSyncDevices;
        win.SetLipSyncDevice = SetLipSyncDevice;
        win.SetLipSyncGain = SetLipSyncGain;
        win.SetLipSyncMaxWeightEnable = SetLipSyncMaxWeightEnable;
        win.SetLipSyncWeightThreashold = SetLipSyncWeightThreashold;
        win.SetLipSyncMaxWeightEmphasis = SetLipSyncMaxWeightEmphasis;

        win.ChangeBackgroundColor = ChangeBackgroundColor;
        win.SetBackgroundTransparent = SetBackgroundTransparent;
        win.SetWindowBorder = SetWindowBorder;
        win.SetWindowTopMost = SetWindowTopMost;
        win.SetWindowClickThrough = SetWindowClickThrough;

        win.ChangeCamera = ChangeCamera;
        win.SetGridVisible = SetGridVisible;

        win.SetAutoBlinkEnable = SetAutoBlinkEnable;
        win.SetBlinkTimeMin = SetBlinkTimeMin;
        win.SetBlinkTimeMax = SetBlinkTimeMax;
        win.SetCloseAnimationTime = SetCloseAnimationTime;
        win.SetOpenAnimationTime = SetOpenAnimationTime;
        win.SetClosingTime = SetClosingTime;
        win.SetDefaultFace = SetDefaultFace;

        win.LoadSettings = LoadSettings;
        win.SaveSettings = SaveSettings;

        win.RunAfterMs = RunAfterMs;
        win.RunOnUnity = RunOnUnity;

        win.TestEvent = TestEvent;
        win.ShowWindow();

        CurrentSettings.BackgroundColor = BackgroundRenderer.material.color;
        CurrentSettings.CustomBackgroundColor = BackgroundRenderer.material.color;
    }
    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 #5
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 #6
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            WindowLoader.Show("Login");
        }
Example #7
0
 public void SetUp()
 {
     database   = new InMemoryPayrollDatabase();
     viewLoader = new WindowLoader(database);
 }
Example #8
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 #10
0
        /// <summary>
        /// --- New example - Click event ---
        /// Creates new example. Open new form with XML attributes required for specific example (Inventory/Evolution file).
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event parameter.</param>
        private void newExampleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WindowLoader loader = new WindowLoader();

            loader.OpenMainWindow();
        }
Example #11
0
 public override void ActionPerformed()
 {
     WindowLoader.Show(WindowPrefabName, WindowParent);
 }
Example #12
0
 private void AddObservation()
 {
     WindowLoader.Show("AddObservation", new AddObservationViewModel(Id, this));
 }
Example #13
0
 /// <summary>
 /// Action permettant à l'utilisateur d'ajouter un nouvel utilisateur.
 /// </summary>
 private void AddUser()
 {
     WindowLoader.Show("AddUser");
 }
Example #14
0
 /// <summary>
 /// Action permettant à l'utilisateur d'ajouter un nouveau patient.
 /// </summary>
 private void AddPatient()
 {
     WindowLoader.Show("AddPatient");
 }
Example #15
0
 private void AddPatient()
 {
     WindowLoader.Show("AddPatient", new AddPatientViewModel(this));
 }