/// <summary>
 /// Intializes the Interface Service Method whcih is called through
 /// Dependency Service in the shared folder.
 /// </summary>
 /// <param name="role">Role.</param>
 /// <param name="range">Range.</param>
 public void InitializeService(Model.Entity.Role role, double range)
 {
     this.role        = role;
     this.beaconRange = range;
     setRole();
     beaconManager = InitializeBeaconManager();
 }
 /// <summary>
 /// Sets the current role of the logged in user.
 /// </summary>
 private void setRole()
 {
     role = appcore.GetUserRole();
     if (role.ToString().Equals("Techniker"))
     {
         currentRole = Major.TECHNICIAN.GetHashCode();
     }
     else if (role.ToString().Equals("Schieber"))
     {
         currentRole = Major.EMPLOYEE.GetHashCode();
     }
 }
Exemple #3
0
        private RoleDTO CreateRoleDTO(Model.Entity.Role roleEntity)
        {
            RoleDTO roleDTO = new RoleDTO();

            if (roleEntity != null)
            {
                roleDTO.RoleID          = roleEntity.RoleID;
                roleDTO.RoleName        = roleEntity.RoleName;
                roleDTO.RoleDisplayName = roleEntity.RoleDisplayName;
            }
            return(roleDTO);
        }
 /// <summary>
 /// Destructor for the Beacon Service.
 /// </summary>
 public void StopBLEService()
 {
     BeaconManagerImpl.StopRangingBeaconsInRegion(region);
     BeaconManagerImpl.StopMonitoringBeaconsInRegion(region);
     compareSet.Clear();
     beaconSet.Clear();
     setLongId.Clear();
     beaconManager = null;
     region        = null;
     role          = null;
     mutex         = true;
     beaconRange   = -1;
     currentRole   = -1;
 }
 /// <summary>
 /// Destructor for the Beacon Service.
 /// </summary>
 public void StopBLEService()
 {
     beaconManager.StopAdvertising();
     beaconManager.StopMonitoringForAllRegions();
     beaconManager.StopRangingBeaconsInAllRegions();
     compareSet.Clear();
     beaconSet.Clear();
     setLongId.Clear();
     beaconManager = null;
     role          = null;
     mutex         = true;
     beaconRange   = -1;
     currentRole   = -1;
 }