public static string Title(this SiriShortcutType shortcutType)
        {
            switch (shortcutType)
            {
            case SiriShortcutType.Start:
                return("Start timer");

            case SiriShortcutType.StartFromClipboard:
                return("Start from clipboard");

            case SiriShortcutType.Continue:
                return("Continue tracking");

            case SiriShortcutType.Stop:
                return("Stop running entry");

            case SiriShortcutType.CustomStart:
                return("Start timer with custom details");

            case SiriShortcutType.ShowReport:
                return("Show report");

            case SiriShortcutType.CustomReport:
                return("Show custom report");

            default:
                throw new ArgumentOutOfRangeException(nameof(shortcutType), shortcutType, null);
            }
        }
Example #2
0
        public static string Title(this SiriShortcutType shortcutType)
        {
            switch (shortcutType)
            {
            case SiriShortcutType.Start:
                return(Resources.SiriShortcutsStartTimer);

            case SiriShortcutType.StartFromClipboard:
                return(Resources.SiriShortcutsStartFromClipboard);

            case SiriShortcutType.Continue:
                return(Resources.SiriShortcutsContinueTracking);

            case SiriShortcutType.Stop:
                return(Resources.SiriShortcutsStopRunningEntry);

            case SiriShortcutType.CustomStart:
                return(Resources.SiriShortcutsStartTimerWithCustomDetails);

            case SiriShortcutType.ShowReport:
                return(Resources.SiriShortcutsShowReport);

            case SiriShortcutType.CustomReport:
                return(Resources.SiriShortcutsShowCustomReport);

            default:
                throw new ArgumentOutOfRangeException(nameof(shortcutType), shortcutType, null);
            }
        }
        public INIntent CreateIntent(SiriShortcutType shortcutType)
        {
            switch (shortcutType)
            {
            case SiriShortcutType.Start:
                var startTimerIntent = new StartTimerIntent();
                startTimerIntent.SuggestedInvocationPhrase = Resources.StartTimerInvocationPhrase;
                return(startTimerIntent);

            case SiriShortcutType.StartFromClipboard:
                var startTimerWithClipboardIntent = new StartTimerFromClipboardIntent();
                return(startTimerWithClipboardIntent);

            case SiriShortcutType.Continue:
                var continueTimerIntent = new ContinueTimerIntent();
                continueTimerIntent.SuggestedInvocationPhrase = Resources.ContinueTimerInvocationPhrase;
                return(continueTimerIntent);

            case SiriShortcutType.Stop:
                var stopTimerIntent = new StopTimerIntent();
                stopTimerIntent.SuggestedInvocationPhrase = Resources.StopTimerInvocationPhrase;
                return(stopTimerIntent);

            case SiriShortcutType.ShowReport:
                var showReportIntent = new ShowReportIntent();
                showReportIntent.SuggestedInvocationPhrase = Resources.ShowReportsInvocationPhrase;
                return(showReportIntent);

            /*
             * case SiriShortcutType.CustomStart:
             *  break;
             * case SiriShortcutType.CustomReport:
             *  break;
             */
            default:
                throw new ArgumentOutOfRangeException(nameof(shortcutType), shortcutType, null);
            }
        }
Example #4
0
 public SiriShortcut(SiriShortcutType type)
 {
     Type = type;
 }