Пример #1
0
        //audio only
        private void LoginProcedure(Language.ErrorMessage actionEnum)
        {
            var speechProcessor = new SpeechProcessor(SpokenLanguage(clientData));

                        //voice out the error
                        switch (actionEnum)
                            {
                                case Language.ErrorMessage.DoubleLogin:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.DoubleLogin, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.DoubleLunch:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.DoubleLunch, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.TooEarlyLeave:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.TooEarlyLeave, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.TooEarlyLunch:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.TooEarlyLunch, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.TooEarlyOnDay:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.TooEarlyOnDay, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.TooLateLogin:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.TooLateLogin, clientData.CurrentUsersProfile));
                                    break;
                                case Language.ErrorMessage.UnExpectedError9000:
                                    speechProcessor.Process(SpokenMessage(Language.ErrorMessage.UnExpectedError9000,
                                        clientData.CurrentUsersProfile));
                                    break;
                            }
        }
Пример #2
0
 private void LoginProcedure(PushData.ActivityAction actionEnum)
 {
     var speechProcessor = new SpeechProcessor(SpokenLanguage(clientData));
                 PushData dataWriter = new PushData(clientData);
                 switch (actionEnum) // make more logic
                     {
                         case PushData.ActivityAction.Arrive:
                             speechProcessor.Process(SpokenMessage(Language.Message.GoodMorning, clientData.CurrentUsersProfile));
                             clientData.ActivityType = dataWriter.ActityType[(int) PushData.ActivityAction.Arrive];
                             clientData.ActivityComment = null;
                             dataWriter = new PushData(clientData);
                             dataWriter.SaveToDatabase();
                             break;
                         case PushData.ActivityAction.ToLunch:
                             speechProcessor.Process(SpokenMessage(Language.Message.GoToLunch, clientData.CurrentUsersProfile));
                             clientData.ActivityType = dataWriter.ActityType[(int) PushData.ActivityAction.ToLunch];
                             clientData.ActivityComment = SetActivityText(dataWriter);
                             dataWriter = new PushData(clientData);
                             dataWriter.SaveToDatabase();
                             break;
                         case PushData.ActivityAction.Leave:
                             speechProcessor.Process(SpokenMessage(Language.Message.GoodBye, clientData.CurrentUsersProfile));
                             clientData.ActivityType = dataWriter.ActityType[(int) PushData.ActivityAction.Leave];
                             clientData.ActivityComment = SetActivityText(dataWriter);
                             dataWriter = new PushData(clientData);
                             dataWriter.SaveToDatabase();
                             break;
                     }
 }