Exemple #1
0
 void FireRegEvent(BoolArgs args)
 {
     if (OnRegisterResult != null)
     {
         OnRegisterResult(this, args);
     }
 }
Exemple #2
0
 void FireLoginEvent(BoolArgs args)
 {
     if (OnLoginResult != null)
     {
         OnLoginResult(this, args);
     }
 }
 private void SceneNode_OnVisibleChanged(object sender, BoolArgs e)
 {
     if (e.Value)
     {
         totalTransform = currentRotation = currentTranslation = Matrix.Identity;
         Transform      = new MatrixTransform3D(totalTransform.ToMatrix3D());
         UpdateCutPlane();
     }
 }
Exemple #4
0
        public void RegisterUser()
        {
            LocalUser user = _privateRepo.GetLocalUser();

            LoginData data = new LoginData()
            {
                Username = user.Name,
                Password = user.Password
            };

            var result = _remoteConnection.Request(new BaseDto()
            {
                JsonObject = JsonConvert.SerializeObject(data), Type = DtoType.Register
            });

            BoolArgs args;

            if (result == null)
            {
                args = new BoolArgs()
                {
                    Success = false
                };
                FireRegEvent(args);
                return;
            }

            var response = ParseLoginResponse(result);

            if (response == null)
            {
                args = new BoolArgs()
                {
                    Success = false
                };
                FireRegEvent(args);
                return;
            }

            if (response.Success)
            {
                user.Token = response.Token;
                _privateRepo.UpdateLocalUser(user);
            }
            else
            {
                _privateRepo.DeleteLocalUser();
            }

            args = new BoolArgs()
            {
                Success = response.Success
            };
            FireRegEvent(args);
        }
        /// <summary>
        /// Das ist super
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="b"></param>
        public void StatusChanged(object sender, BoolArgs b)
        {
            if (portWindow != null)
            {
                switch (portWindow.data.Connected)
                {
                case true:
                    Status.Content = "Verbunden";
                    break;

                case false:
                    Status.Content = "Getrennt";
                    break;
                }
            }
        }
 private void Core_OnCoordinateSystemChanged(object sender, BoolArgs e)
 {
     OnCoordinateSystemChanged(e.Value);
 }