protected ScheduleSection(ProgramScheduleContent parent) { Parent = parent; UniqueID = Guid.NewGuid(); Index = parent.Sections.Any() ? parent.Sections.Max(s => s.Index) + 1 : 0; Programs = new List <Program>(); DigitalInfo = new MediaDigitalInfo(); Summary = new SectionSummary(this); ContractSettings = new ContractSettings(); #region Options ShowRating = ParentScheduleSettings.UseDemo & !String.IsNullOrEmpty(ParentScheduleSettings.Demo); ShowTime = true; ShowDaypart = true; ShowDay = true; ShowStation = true; ShowProgram = true; ShowLenght = false; ShowCPP = ParentScheduleSettings.UseDemo & !String.IsNullOrEmpty(ParentScheduleSettings.Demo); ShowGRP = ParentScheduleSettings.UseDemo & !String.IsNullOrEmpty(ParentScheduleSettings.Demo); ShowSpots = true; ShowEmptySpots = false; ShowCost = true; ShowLogo = false; ShowTotalPeriods = true; ShowTotalSpots = true; ShowTotalGRP = ParentScheduleSettings.UseDemo & !String.IsNullOrEmpty(ParentScheduleSettings.Demo); ShowTotalCPP = ParentScheduleSettings.UseDemo & !String.IsNullOrEmpty(ParentScheduleSettings.Demo); ShowAverageRate = true; ShowTotalRate = true; ShowNetRate = false; ShowDiscount = false; #endregion }
public void AfterCreate() { if (DigitalInfo == null) { DigitalInfo = new MediaDigitalInfo(); } DigitalInfo.AfterCreate(); }
public virtual void Release() { gridControl.DataSource = null; if (_dragDropHelper != null) { _dragDropHelper.AfterDrop -= OnGridControlAfterDrop; } _digitalInfo = null; }
public void AfterCreate() { if (DigitalInfo == null) { DigitalInfo = new MediaDigitalInfo(); } DigitalInfo.AfterCreate(); if (Summary == null) { Summary = new SectionSummary(this); } Summary.AfterCreate(); if (ContractSettings == null) { ContractSettings = new ContractSettings(); } }
public BaseDigitalInfoOneSheetOutputModel(MediaDigitalInfo parent) { _parent = parent; Records = new List<DigitalInfoRecordOutputModel>(); ReplacementsList = new Dictionary<string, string>(); }
public BaseDigitalInfoOneSheetOutputModel(MediaDigitalInfo parent) { _parent = parent; Records = new List <DigitalInfoRecordOutputModel>(); ReplacementsList = new Dictionary <string, string>(); }
public virtual void Release() { gridControl.DataSource = null; if (_dragDropHelper != null) _dragDropHelper.AfterDrop -= OnGridControlAfterDrop; _digitalInfo = null; }
public OptionSet(OptionsContent parent) { Parent = parent; UniqueID = Guid.NewGuid(); Index = parent.Options.Any() ? parent.Options.Max(s => s.Index) + 1 : 0; Logo = MediaMetaData.Instance.ListManager.Images.Where(g => g.IsDefault).Select(g => g.Images.FirstOrDefault(i => i.IsDefault)).FirstOrDefault()?.Clone <ImageSource, ImageSource>(); TotalPeriods = 1; Programs = new List <OptionProgram>(); DigitalInfo = new MediaDigitalInfo(); ContractSettings = new ContractSettings(); #region Options ShowLineId = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowLineId; ShowLogo = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowLogo; ShowStation = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowStation; ShowProgram = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowProgram; ShowDay = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowDay; ShowTime = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTime; ShowSpots = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowWeeklySpots || MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowMonthlySpots || MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTotalSpots; ShowRate = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowRate; ShowLenght = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowLenght; ShowCost = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowCost; ShowTotalSpots = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTallySpots; ShowTotalCost = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTallyCost; ShowAverageRate = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowAverageRate; ShowSpotsX = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowSpotsX; UseDecimalRates = MediaMetaData.Instance.ListManager.DefaultOptionsSettings.UseDecimalRates; DefaultColumnPositions = true; if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowStation) { PositionStation = DefaultPositionStation; } else { PositionStation = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowProgram) { PositionProgram = DefaultPositionProgram; } else { PositionProgram = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowDay) { PositionDay = DefaultPositionDay; } else { PositionDay = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTime) { PositionTime = DefaultPositionTime; } else { PositionTime = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowLenght) { PositionLenght = DefaultPositionLenght; } else { PositionLenght = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowWeeklySpots || MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowMonthlySpots || MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTotalSpots) { PositionSpots = DefaultPositionSpots; } else { PositionSpots = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowRate) { PositionRate = DefaultPositionRate; } else { PositionRate = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowCost) { PositionCost = DefaultPositionCost; } else { PositionCost = -1; } if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowWeeklySpots) { SpotType = SpotType.Week; } else if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowMonthlySpots) { SpotType = SpotType.Month; } else if (MediaMetaData.Instance.ListManager.DefaultOptionsSettings.ShowTotalSpots) { SpotType = SpotType.Total; } else { SpotType = SpotType.Week; } #endregion }