public static void UpdateDailyAnnoucement(int h, int m, int s, int interval, int loops, string command)
{
Configuration config = ConfManager.OpenExeConfiguration(ConfigurationUserLevel.None);
string delim = ConfManager.AppSettings["AnnMess"] == "" ? "" : "|";
string annMess = ConfManager.AppSettings["AnnMess"] + delim + command;
string annTime = ConfManager.AppSettings["AnnTime"] + delim + h + ":" + m;
string annLoops = ConfManager.AppSettings["AnnLoops"] + delim + loops;
string annInterval = ConfManager.AppSettings["AnnInterval"] + delim + interval;
config.AppSettings.Settings["AnnMess"].Value = annMess;
config.AppSettings.Settings["AnnTime"].Value = annTime;
config.AppSettings.Settings["AnnLoops"].Value = annLoops;
config.AppSettings.Settings["AnnInterval"].Value = annInterval;
config.Save(ConfigurationSaveMode.Modified);
ConfManager.RefreshSection("appSettings");
//TelepresenceScheduler.DeleteDailyAnnouncement();
//LoadDailyAnnouncement();
Action action = new Action(() =>
{
SpeechGeneration.SpeakAsync(command);
});
TelepresenceScheduler.DailyIntervalInSeconds(h, m, s, interval, loops, action);
}