public void UpdateOutput(bool quickLoad)
		{
			LocalSchedule = BusinessObjects.Instance.ScheduleManager.GetLocalSchedule();
			Controller.Instance.MultiSummaryDigitalLegend.Image = Controller.Instance.MultiSummaryDigitalLegend.Enabled && !LocalSchedule.ViewSettings.MultiSummaryViewSettings.DigitalLegend.Enabled ? Resources.DigitalDisabled : Resources.Digital;
			Controller.Instance.Supertip.SetSuperTooltip(Controller.Instance.MultiSummaryDigitalLegend, new SuperTooltipInfo("Digital Products", "",
				Controller.Instance.MultiSummaryDigitalLegend.Enabled && LocalSchedule.ViewSettings.MultiSummaryViewSettings.DigitalLegend.Enabled ?
				"Digital Products are Enabled for this slide" :
				"Digital Products are Disabled for this slide"
				, null, null, eTooltipColor.Gray));
			InitThemeSelector();
			if (!quickLoad)
			{
				LoadSharedOptions();

				xtraTabControlPublications.SuspendLayout();
				Application.DoEvents();
				xtraTabControlPublications.TabPages.Clear();
				_tabPages.RemoveAll(x => !LocalSchedule.PrintProducts.Select(y => y.UniqueID).Contains(x.PrintProduct.UniqueID));
				foreach (var publication in LocalSchedule.PrintProducts)
				{
					if (string.IsNullOrEmpty(publication.Name)) continue;
					var publicationTab = _tabPages.FirstOrDefault(x => x.PrintProduct.UniqueID.Equals(publication.UniqueID));
					if (publicationTab == null)
					{
						publicationTab = new PublicationMultiSummaryControl(this);
						_tabPages.Add(publicationTab);
						Application.DoEvents();
					}
					publicationTab.PrintProduct = publication;
					publicationTab.PageEnabled = publication.Inserts.Count > 0;
					publicationTab.LoadPublication();
					Application.DoEvents();
				}
				_tabPages.Sort((x, y) => x.PrintProduct.Index.CompareTo(y.PrintProduct.Index));
				xtraTabControlPublications.TabPages.AddRange(_tabPages.ToArray());
				Application.DoEvents();
				xtraTabControlPublications.ResumeLayout();
			}
			else
			{
				foreach (var publication in LocalSchedule.PrintProducts)
				{
					if (string.IsNullOrEmpty(publication.Name)) continue;
					var publicationTab = _tabPages.FirstOrDefault(x => x.PrintProduct.UniqueID.Equals(publication.UniqueID));
					if (publicationTab != null)
					{
						publicationTab.PrintProduct = publication;
						publicationTab.PageEnabled = publication.Inserts.Count > 0;
					}
					Application.DoEvents();
				}
			}
			LoadProductOptions();
			SettingsNotSaved = false;
		}
Ejemplo n.º 2
0
        public void UpdateOutput(bool quickLoad)
        {
            LocalSchedule = BusinessObjects.Instance.ScheduleManager.GetLocalSchedule();
            Controller.Instance.MultiSummaryDigitalLegend.Image = Controller.Instance.MultiSummaryDigitalLegend.Enabled && !LocalSchedule.ViewSettings.MultiSummaryViewSettings.DigitalLegend.Enabled ? Resources.DigitalDisabled : Resources.Digital;
            Controller.Instance.Supertip.SetSuperTooltip(Controller.Instance.MultiSummaryDigitalLegend, new SuperTooltipInfo("Digital Products", "",
                                                                                                                             Controller.Instance.MultiSummaryDigitalLegend.Enabled && LocalSchedule.ViewSettings.MultiSummaryViewSettings.DigitalLegend.Enabled ?
                                                                                                                             "Digital Products are Enabled for this slide" :
                                                                                                                             "Digital Products are Disabled for this slide"
                                                                                                                             , null, null, eTooltipColor.Gray));
            InitThemeSelector();
            if (!quickLoad)
            {
                LoadSharedOptions();

                xtraTabControlPublications.SuspendLayout();
                Application.DoEvents();
                xtraTabControlPublications.TabPages.Clear();
                _tabPages.RemoveAll(x => !LocalSchedule.PrintProducts.Select(y => y.UniqueID).Contains(x.PrintProduct.UniqueID));
                foreach (var publication in LocalSchedule.PrintProducts)
                {
                    if (string.IsNullOrEmpty(publication.Name))
                    {
                        continue;
                    }
                    var publicationTab = _tabPages.FirstOrDefault(x => x.PrintProduct.UniqueID.Equals(publication.UniqueID));
                    if (publicationTab == null)
                    {
                        publicationTab = new PublicationMultiSummaryControl(this);
                        _tabPages.Add(publicationTab);
                        Application.DoEvents();
                    }
                    publicationTab.PrintProduct = publication;
                    publicationTab.PageEnabled  = publication.Inserts.Count > 0;
                    publicationTab.LoadPublication();
                    Application.DoEvents();
                }
                _tabPages.Sort((x, y) => x.PrintProduct.Index.CompareTo(y.PrintProduct.Index));
                xtraTabControlPublications.TabPages.AddRange(_tabPages.ToArray());
                Application.DoEvents();
                xtraTabControlPublications.ResumeLayout();
            }
            else
            {
                foreach (var publication in LocalSchedule.PrintProducts)
                {
                    if (string.IsNullOrEmpty(publication.Name))
                    {
                        continue;
                    }
                    var publicationTab = _tabPages.FirstOrDefault(x => x.PrintProduct.UniqueID.Equals(publication.UniqueID));
                    if (publicationTab != null)
                    {
                        publicationTab.PrintProduct = publication;
                        publicationTab.PageEnabled  = publication.Inserts.Count > 0;
                    }
                    Application.DoEvents();
                }
            }
            LoadProductOptions();
            SettingsNotSaved = false;
        }