public void LoadDashboardSettings()
        {
            if (!Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.ExistsLocal())
            {
                return;
            }
            var document = new XmlDocument();

            document.Load(Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.LocalPath);
            var node = document.SelectSingleNode(@"/DashboardSettings/SalesRep");

            if (node != null)
            {
                SalesRep = node.InnerText;
            }
            node = document.SelectSingleNode(@"/Settings/ApplyThemeForAllSlideTypes");
            if (node != null)
            {
                bool tempBool;
                if (Boolean.TryParse(node.InnerText, out tempBool))
                {
                    ApplyThemeForAllSlideTypes = tempBool;
                }
            }
            _themeSaveHelper.Deserialize(document.SelectNodes(@"//DashboardSettings/SelectedTheme").OfType <XmlNode>());
        }
예제 #2
0
        public void LoadSettings()
        {
            SettingsManager.Instance.LoadSharedSettings();

            if (!Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.ExistsLocal())
            {
                return;
            }
            var document = new XmlDocument();

            document.Load(Asa.Common.Core.Configuration.ResourceManager.Instance.AppSettingsFile.LocalPath);

            var node = document.SelectSingleNode(@"/Settings/SelectedColor");

            if (node != null)
            {
                SelectedColor = node.InnerText;
            }
            node = document.SelectSingleNode(@"/Settings/UseSlideMaster");
            if (node != null)
            {
                if (Boolean.TryParse(node.InnerText, out var tempBool))
                {
                    UseSlideMaster = tempBool;
                }
            }
            node = document.SelectSingleNode(@"/Settings/BroadcastCalendarSettings");
            if (node != null)
            {
                BroadcastCalendarSettings.Deserialize(node);
            }
            node = document.SelectSingleNode(@"/Settings/SalesRep");
            if (node != null)
            {
                SalesRep = node.InnerText;
            }
            node = document.SelectSingleNode(@"/Settings/SelectedStarOutputItemsEncoded");
            if (node != null)
            {
                SelectedStarOutputItemsEncoded = node.InnerText;
            }
            node = document.SelectSingleNode(@"/Settings/SelectedShiftOutputItemsEncoded");
            if (node != null)
            {
                SelectedShiftOutputItemsEncoded = node.InnerText;
            }
            node = document.SelectSingleNode(@"/Settings/ApplyThemeForAllSlideTypes");
            if (node != null)
            {
                if (Boolean.TryParse(node.InnerText, out var tempBool))
                {
                    ApplyThemeForAllSlideTypes = tempBool;
                }
            }
            _themeSaveHelper.Deserialize(document.SelectNodes(@"//Settings/SelectedTheme").OfType <XmlNode>());
        }