internal override IEnumerator ValidateServiceIsEnabled(OSService serviceFlags) { // USB provider does not require any services to be granted _lastServiceCheckedIsEnabled = true; yield break; }
private void OnOSServiceFailure(OSService service) { _messageText.SetLocaleKey( LocaleConstants.BOSE_AR_UNITY_SDK_SERVICE_FAILURE_MESSAGE, service.GetLocaleKey()); Show(); }
private void OnOSServiceRequired(OSService service) { _requiredService = service; _messageText.text = string.Empty; _headerText.text = string.Format(REQUIRED_SERVICE_TITLE_FORMAT, service); _warningText.text = _wearableControl.GetServiceRequiredText(service); Show(); }
public bool GetServiceAvailable(OSService service) { const string GetServiceAvailableMethod = "WearableGetServiceAvailable"; if (_wearablePlugin != null) { return(_wearablePlugin.Call <bool>(GetServiceAvailableMethod, (int)service)); } return(false); }
public bool CheckServiceInternal(OSService service) { switch (service) { case OSService.Bluetooth: return(WearableCheckBluetoothService()); default: return(true); } }
void IActionFilter.OnActionExecuting(ActionExecutingContext filterContext) { if (ListOS == null) { OSService service = new OSService(); ListOS = service.GetOS(); } filterContext.Controller.ViewBag.OSs= ListOS; this.OnActionExecuting(filterContext); }
public bool CheckServiceInternal(OSService service) { switch (service) { case OSService.Bluetooth: case OSService.LocationServices: return(AndroidPlugin.GetServiceAvailable(service)); default: return(true); } }
/// <summary> /// Returns the appropriate locale key for <param name="service"></param> /// </summary> /// <param name="service"></param> /// <returns></returns> public static string GetLocaleKey(this OSService service) { switch (service) { case OSService.Bluetooth: return(LocaleConstants.BOSE_AR_UNITY_SDK_BLUETOOTH); case OSService.LocationServices: return(LocaleConstants.BOSE_AR_UNITY_SDK_LOCATION); default: throw new ArgumentOutOfRangeException("service", service, null); } }
/// <summary> /// Returns the proper text description of a permission prompt. /// </summary> /// <param name="service"></param> /// <returns></returns> internal virtual string GetServiceRequiredText(OSService service) { switch (service) { case OSService.Bluetooth: return(string.Format(WearableConstants.GENERAL_SERVICE_FORMAT, service)); case OSService.LocationServices: return(string.Format(WearableConstants.GENERAL_SERVICE_FORMAT, service)); default: throw new ArgumentOutOfRangeException("service", service, null); } }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(SettingsService settings, ScanningService scanning, IconCacheService iconCache, UIService ui, BitmapFactory bitmapFactory, ImagesServiceBase images, ClipboardService clipboard, OSService os, IMyDialogService dialogs, TreemapRendererFactory treemapFactory, RelayCommandFactory relayFactory) : base(relayFactory) { Settings = settings; Scanning = scanning; IconCache = iconCache; UI = ui; BitmapFactory = bitmapFactory; Images = images; Clipboard = clipboard; OS = os; Dialogs = dialogs; Treemap = treemapFactory.Create(); Settings.PropertyChanged += OnSettingsPropertyChanged; Scanning.PropertyChanged += OnScanningPropertyChanged; Extensions = new ExtensionItemViewModelCollection(this); SelectedFiles = new ObservableCollection <FileItemViewModel>(); SelectedFiles.CollectionChanged += OnSelectedFilesChanged; FileComparer = new FileComparer(); ExtensionComparer = new ExtensionComparer(); UpdateEmptyRecycleBin(); GCRAMUsage = GC.GetTotalMemory(false); if (IsInDesignMode) { // Code runs in Blend --> create design time data. } else { // Code runs "for real" ramTimer = UI.StartTimer(Settings.RAMInterval, true, OnRAMUsageTick); statusTimer = UI.CreateTimer(Settings.StatusInterval, true, OnStatusTick); } }
internal override IEnumerator ValidateServiceIsEnabled(OSService service) { yield return(Wait.ForEndOfFrame); if (!CheckServiceInternal(service)) { _lastServiceRequestedForUser = service; _lastServiceCheckedIsEnabled = false; OnConnectionStatusChanged(ConnectionStatus.ServiceRequired); } else { _lastServiceRequestedForUser = null; _lastServiceCheckedIsEnabled = true; } }
/// <summary> /// Returns the appropriate <see cref="OSServiceFlags"/> for the passed individual <see cref="OSService"/> /// <paramref name="service"/>. /// </summary> /// <param name="service"></param> /// <returns></returns> internal static OSServiceFlags GetOSServiceFlag(OSService service) { OSServiceFlags flag; switch (service) { case OSService.Bluetooth: flag = OSServiceFlags.Bluetooth; break; case OSService.LocationServices: flag = OSServiceFlags.LocationServices; break; default: throw new ArgumentOutOfRangeException("service", service, null); } return(flag); }
private void OnOSServiceRequired(OSService service) { _requiredService = service; _messageText.Clear(); if (service == OSService.Bluetooth) { _headerText.SetLocaleKey(LocaleConstants.CONNECTION_TASK_NO_BLUETOOTH_TITLE); _warningText.SetLocaleKey(LocaleConstants.CONNECTION_TASK_NO_BLUETOOTH_MESSAGE); _warningIconImage.sprite = _bluetoothWarningSprite; } else { _headerText.SetLocaleKey(LocaleConstants.CONNECTION_TASK_NO_LOCATION_TITLE); _warningText.SetLocaleKey(LocaleConstants.CONNECTION_TASK_NO_LOCATION_MESSAGE); _warningIconImage.sprite = _generalWarningIcon; } Show(); }
private void OnOSServiceFailure(OSService service) { Hide(); }
/// <summary> /// Returns the proper text description of a permission prompt. /// </summary> /// <param name="service"></param> /// <returns></returns> internal virtual string GetServiceRequiredText(OSService service) { return(string.Empty); }
/// <summary> /// <see name="_isServiceEnabled"/> is set to true if the user has enabled the <see cref="OSServiceFlags"/> <paramref name="service"/>, /// otherwise false if the user has not enabled it.If not granted, /// <see cref="ConnectionStatusChanged"/> will be invoked with <seealso cref="ConnectionStatus.ServiceRequest"/> /// as the passed value. /// </summary> /// <param name="service"></param> /// <returns></returns> internal abstract IEnumerator ValidateServiceIsEnabled(OSService service);
private void OnOSServiceRequired(OSService service) { Hide(); }
private void OnOSServiceFailure(OSService service) { _messageText.text = string.Format(SERVICE_FAILURE_MESSAGE_FORMAT, service.ToString()); Show(); }
public bool CheckServiceInternal(OSService service) { return(true); }