private void addEvent()
        {
            string errorMessage = string.Empty;

            if (!isValidUuid())
            {
                errorMessage += "UUIDの入力値が不正です。" + Environment.NewLine;
            }
            if (!isValidMajor())
            {
                errorMessage += "MAJORには1〜65535の範囲の数値を入力してください。" + Environment.NewLine;
            }
            if (!isValidMinor())
            {
                errorMessage += "MINORには1〜65535の範囲の数値を入力してください。" + Environment.NewLine;
            }

            if (errorMessage != string.Empty)
            {
                _pageDialogService.DisplayAlertAsync("エラー",
                                                     errorMessage,
                                                     "OK");
                return;
            }

            Action targetEvent = null;

            switch (EventIndex)
            {
            case 0:
                targetEvent = showAlert;
                break;

            case 1:
                targetEvent = vibrate;
                break;

            default:
                return;
            }

            _ibeaconEventTriggerService.AddEvent(new Guid(UuidStr),
                                                 ushort.Parse(MajorStr),
                                                 ushort.Parse(MinorStr),
                                                 ThresholdRssi,
                                                 TimeIntervalSec * 1000,
                                                 targetEvent);

            _pageDialogService.DisplayAlertAsync("iBeaconScanner",
                                                 "イベントを追加しました。",
                                                 "OK");
        }
 public void OnNavigatedTo(NavigationParameters parameters)
 {
     _ibeaconEventTriggerService.AddEvent(new Guid(UuidStr),
                                          ushort.Parse(MajorStr),
                                          ushort.Parse(MinorStr));
 }