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); }
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 }
private string SpokenMessage(Language.ErrorMessage message, FlexProfile currentUser) { return currentUser.Message[message]; }
private string SpokenMessage(Language.Message message, FlexProfile currentUser) { return currentUser.Message[message].Replace("@user", clientData.ForName); }
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; }