private void FetchClientInformationFromServer()
        {
            Guid clientId = ClientInformationUtils.GetUniqueMachineId();

            try {
                AccessClient.CallAccessService(x => clientInfo = x.GetClient(clientId));
                if (clientInfo != null)
                {
                    clientExists = true;
                    clientInfo.HeuristicLabVersion = ClientInformationUtils.GetHLVersion();
                    AccessClient.CallAccessService(x => x.UpdateClient(clientInfo));
                }
                errorOccured     = false;
                occuredException = null;
            }
            catch (MessageSecurityException e) {
                //wrong username or password
                clientExists     = false;
                errorOccured     = true;
                occuredException = e;
            }
            catch (Exception e) {
                clientExists     = false;
                errorOccured     = true;
                occuredException = e;
            }
        }
Exemple #2
0
        private void FetchUserInformationFromServer()
        {
            userName = HeuristicLab.Clients.Common.Properties.Settings.Default.UserName;

            try {
                AccessClient.CallAccessService(x => user = x.Login());
                errorOccured     = false;
                userExists       = true;
                occuredException = null;
            }
            catch (MessageSecurityException e) {
                //wrong username or password
                errorOccured     = false;
                userExists       = false;
                occuredException = e;
            }
            catch (Exception e) {
                errorOccured     = true;
                userExists       = false;
                occuredException = e;
            }
        }