Exemplo n.º 1
0
 private string SetActivityText(PushData dataWriter)
 {
     return
                     dataWriter.ActivityText[
                         (int) ((Language.Country) Enum.Parse(typeof (Language.Country), clientData.Country.Substring(0, 3).ToLower())),
                         (int) PushData.ActivityAction.ToLunch];
 }
Exemplo n.º 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;
                     }
 }