Пример #1
0
        public List<MetroDashSection> GetMetroDashSections()
        {
            List<MetroDashSection> sectionsRet = new List<MetroDashSection>();

            string[] sections = AppSettings.DashboardMetroSectionOrder.Split(';');

            foreach (string section in sections)
            {
                string[] vals = section.Split(':');
                bool enabled = bool.Parse(vals[1]);

                // skip Trakt as this has been deprecated
                DashboardMetroProcessType sectionType = (DashboardMetroProcessType)int.Parse(vals[0]);
                if (sectionType == DashboardMetroProcessType.TraktActivity) continue;

                MetroDashSection dashSect = new MetroDashSection()
                {
                    SectionType = sectionType,
                    Enabled = enabled,
                    WinVisibility = enabled ? Visibility.Visible : Visibility.Collapsed
                };

                sectionsRet.Add(dashSect);
            }

            return sectionsRet;
        }
Пример #2
0
		public List<MetroDashSection> GetMetroDashSections()
		{
			List<MetroDashSection> sectionsRet = new List<MetroDashSection>();

			string[] sections = AppSettings.DashboardMetroSectionOrder.Split(';');

			foreach (string section in sections)
			{
				string[] vals = section.Split(':');
				bool enabled = bool.Parse(vals[1]);

				MetroDashSection dashSect = new MetroDashSection()
				{
					SectionType = (DashboardMetroProcessType)int.Parse(vals[0]),
					Enabled = enabled,
					WinVisibility = enabled ? Visibility.Visible : Visibility.Collapsed
				};

				sectionsRet.Add(dashSect);
			}

			return sectionsRet;
		}