public void SaveSettings() { var xml = new StringBuilder(); xml.AppendLine(@"<Settings>"); if (!String.IsNullOrEmpty(SelectedColor)) { xml.AppendLine(@"<SelectedColor>" + SelectedColor.Replace(@"&", "&").Replace("\"", """) + @"</SelectedColor>"); } xml.AppendLine(@"<UseSlideMaster>" + UseSlideMaster + @"</UseSlideMaster>"); xml.AppendLine(@"<BroadcastCalendarSettings>" + BroadcastCalendarSettings.Serialize() + @"</BroadcastCalendarSettings>"); if (!String.IsNullOrEmpty(SalesRep)) { xml.AppendLine(@"<SalesRep>" + SalesRep.Replace(@"&", "&").Replace("\"", """) + @"</SalesRep>"); } if (!String.IsNullOrEmpty(SelectedStarOutputItemsEncoded)) { xml.AppendLine(@"<SelectedStarOutputItemsEncoded>" + SelectedStarOutputItemsEncoded.Replace(@"&", "&").Replace("\"", """) + @"</SelectedStarOutputItemsEncoded>"); } if (!String.IsNullOrEmpty(SelectedShiftOutputItemsEncoded)) { xml.AppendLine(@"<SelectedShiftOutputItemsEncoded>" + SelectedShiftOutputItemsEncoded.Replace(@"&", "&").Replace("\"", """) + @"</SelectedShiftOutputItemsEncoded>"); } xml.AppendLine(@"<ApplyThemeForAllSlideTypes>" + ApplyThemeForAllSlideTypes + @"</ApplyThemeForAllSlideTypes>"); xml.AppendLine(_themeSaveHelper.Serialize()); xml.AppendLine(@"</Settings>"); using (var sw = new StreamWriter(Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.LocalPath, false)) { sw.Write(xml); sw.Flush(); } }
public void SaveSettings() { var xml = new StringBuilder(); xml.AppendLine(@"<DashboardSettings>"); if (!String.IsNullOrEmpty(SalesRep)) { xml.AppendLine(@"<SalesRep>" + SalesRep.Replace(@"&", "&").Replace("\"", """) + @"</SalesRep>"); } xml.AppendLine(@"<ApplyThemeForAllSlideTypes>" + ApplyThemeForAllSlideTypes + @"</ApplyThemeForAllSlideTypes>"); xml.AppendLine(_themeSaveHelper.Serialize()); xml.AppendLine(@"</DashboardSettings>"); using (var sw = new StreamWriter(Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.LocalPath, false)) { sw.Write(xml); sw.Flush(); } }