Exemplo n.º 1
0
 public void AddProfile(string userName)
 {
     var fp = new FlexProfile();
                 fp.Country = GetLanguageFromConfig(); // enum
                 SetMessages(fp); // This is not implemented fully yet
                 FlexProfiles.Add(userName, fp);
 }
Exemplo n.º 2
0
        public void Loop()
        {
            //LogThis.LogWriter("Looping started");
                        LogThis.Report("Engine", "Looping started");
                        while (! RequestedToStop)
                            {
                                Thread.Sleep(500);
                                rfid = new Rfid(); // this also starts the event that in turn adds the RFID to the queue
                                // loops untill told to stop by boolean
                                // rfid event handler component thread

                                for (var i = 0; i < QueueOfRfids.Count; i++)
                                    {

                                        if (rfid.rfid.Equals(rfid.DiagnosticID))
                                            {
                                                Speaker sp = new Speaker(Language.Country.eng);
                                                sp.Speak("Engine loop is running nicely, last processed rfid is: " + lastUsedRfid);
                                            }
                                        else
                                            {
                                            // if its not a diagnostic scan tag, do this.
                                            lastUsedRfid = QueueOfRfids.Last();
                                            }
                                        dataFetcher = new FetchData(new ClientData());
                                        Config = new FlexConfig(true);
                                        CurrentUsersProfile = Config.GetProfile(dataFetcher.GetClientData().UserName);
                                        clientStatus = new DetermineStatus(dataFetcher.GetClientData());
                                    }

                                // Database information gathering based on the result off the rfid event (10 char long string)
                                // on completed database read interaction
                            }
                        // sjekk RFID event
        }
Exemplo n.º 3
0
 private string SpokenMessage(Language.ErrorMessage message, FlexProfile currentUser)
 {
     return currentUser.Message[message];
 }
Exemplo n.º 4
0
 private string SpokenMessage(Language.Message message, FlexProfile currentUser)
 {
     return currentUser.Message[message].Replace("@user", clientData.ForName);
 }
Exemplo n.º 5
0
        private void SetMessages(FlexProfile fp)
        {
            // ALL DONE!
                        fp.Message.Add(Language.Message.GoodMorning, _profileConfig.DayStart);
                        // dictionary <Language.Message, string>
                        fp.Message.Add(Language.Message.GoToLunch, _profileConfig.LunchStart);
                        // dictionary <Language.Message, string>
                        fp.Message.Add(Language.Message.BackFromLunch, _profileConfig.LunchEnd);
                        // dictionary <Language.Message, string>
                        fp.Message.Add(Language.Message.GoodBye, _profileConfig.DayEnd);
                        // dictionary <Language.Message, string>

                        //return fp;
        }