public FormPPSubfileChange(string title, string[] editors, Dictionary <string, DockContent> ppChildForms)
        {
            InitializeComponent();
            Text = title.Replace("&", String.Empty);

            startSize = new SizeF(Width, Height);
            this.SaveDesignSizes();

            float listViewFontSize = (float)Gui.Config["ListViewFontSize"];

            if (listViewFontSize > 0)
            {
                listViewEditors.Font = new System.Drawing.Font(listViewEditors.Font.FontFamily, listViewFontSize);
            }
            listViewEditors.AutoResizeColumns();
            foreach (string editorName in editors)
            {
                string      name = editorName;
                DockContent content;
                if (ppChildForms.TryGetValue(editorName, out content))
                {
                    EditedContent editor = content as EditedContent;
                    if (editor != null && editor.Changed)
                    {
                        name += "*";
                    }
                }
                listViewEditors.Items.Add(name);
            }
        }
예제 #2
0
        protected override void UpdateEditedContet()
        {
            _allowToSave = false;

            var quickLoad = EditedContent != null && !(ChangeInfo.WholeScheduleChanged ||
                                                       ContentUpdateInfo.ChangeInfo.ScheduleDatesChanged ||
                                                       ContentUpdateInfo.ChangeInfo.CalendarTypeChanged ||
                                                       ContentUpdateInfo.ChangeInfo.SpotTypeChanged);

            EditedContent?.Dispose();

            EditedContent = Schedule.ProgramSchedule.Clone <ProgramScheduleContent, ProgramScheduleContent>();

            if (MediaMetaData.Instance.ListManager.FlexFlightDatesAllowed &&
                (ScheduleSettings.FlightDateStart != ScheduleSettings.UserFlightDateStart ||
                 ScheduleSettings.FlightDateEnd != ScheduleSettings.UserFlightDateEnd))
            {
                layoutControlGroupFlexFlightDatesWarning.Visibility = LayoutVisibility.Always;
            }
            else
            {
                layoutControlGroupFlexFlightDatesWarning.Visibility = LayoutVisibility.Never;
            }

            settingsContainer.LoadContent(EditedContent);

            LoadSections(quickLoad);

            LoadActiveSectionData();

            _allowToSave = true;
        }
예제 #3
0
 private void OnTabMoved(object sender, TabMoveEventArgs e)
 {
     EditedContent.ChangeSectionPosition(
         EditedContent.Sections.IndexOf(((SectionContainer)e.MovedPage).SectionData),
         EditedContent.Sections.IndexOf(((SectionContainer)e.TargetPage).SectionData) + (1 * e.Offset));
     SettingsNotSaved = true;
 }
 private void OnTabMoved(object sender, TabMoveEventArgs e)
 {
     EditedContent.ChangeOptionSetPosition(
         EditedContent.Options.IndexOf(((OptionSetEditorsContainer)e.MovedPage).OptionSetData),
         EditedContent.Options.IndexOf(((OptionSetEditorsContainer)e.TargetPage).OptionSetData) + (1 * e.Offset));
     Summary.UpdateView();
     SettingsNotSaved = true;
 }
예제 #5
0
        public FormAnimationDragDrop(EditedContent editor)
        {
            InitializeComponent();
            startSize = new SizeF(Width, Height);
            this.SaveDesignSizes();

            comboBoxMethod.Items.AddRange(Enum.GetNames(typeof(ReplaceAnimationMethod)));
        }
 public override void LoadData()
 {
     EditedContent?.Dispose();
     EditedContent = BusinessObjects.Instance.ScheduleManager.ActiveSchedule
                     .GetScheduleSolutionContent <MediaStarAppContent>(SolutionInfo)
                     .Clone <MediaStarAppContent, StarAppContent>();
     base.LoadData();
 }
예제 #7
0
 protected override void UpdateEditedContet()
 {
     if (IsContentChanged)
     {
         if (EditedContent != null)
         {
             ReleaseControls();
             EditedContent.Dispose();
         }
         EditedContent = GetEditedCalendar();
         base.UpdateEditedContet();
     }
 }
예제 #8
0
 private void DeleteSection(SectionContainer sectionControl)
 {
     if (PopupMessageHelper.Instance.ShowWarningQuestion("Are you sure want to delete {0}?", sectionControl.SectionData.Name) != DialogResult.Yes)
     {
         return;
     }
     EditedContent.Sections.Remove(sectionControl.SectionData);
     EditedContent.RebuildSectionIndexes();
     xtraTabControlSections.TabPages.Remove(sectionControl);
     UpdateSectionSplash();
     UpdateStatusBar();
     settingsContainer.UpdateSettingsAccordingDataChanges(SectionEditorType.Schedule);
     SettingsNotSaved = true;
 }
 private void DeleteOptionSet(OptionSetEditorsContainer optionSetEditorsContainer)
 {
     if (PopupMessageHelper.Instance.ShowWarningQuestion("Are you sure want to delete {0}?", optionSetEditorsContainer.OptionSetData.Name) != DialogResult.Yes)
     {
         return;
     }
     EditedContent.Options.Remove(optionSetEditorsContainer.OptionSetData);
     EditedContent.RebuildOptionSetIndexes();
     xtraTabControlContentEditors.TabPages.Remove(optionSetEditorsContainer);
     Summary.UpdateView();
     UpdateSplash();
     UpdateSummaryState();
     UpdateStatusBar();
     settingsContainer.UpdateSettingsAccordingDataChanges(OptionEditorType.Schedule);
     SettingsNotSaved = true;
 }
        protected override void UpdateEditedContet()
        {
            EditedContent?.Dispose();
            EditedContent = Schedule.DigitalProductsContent.Clone <DigitalProductsContent, DigitalProductsContent>();

            settingsContainer.LoadContent(EditedContent);

            xtraTabControlEditors.TabPages.OfType <IDigitalEditor>().ToList().ForEach(editor =>
            {
                editor.RequestReload();
            });

            xtraTabControlEditors.TabPages.OfType <DigitalListEditorControl>().Single().LoadData();
            LoadActiveEditorData();

            UpdateEditorsStatus();
            UpdateOutputStatus();
        }
예제 #11
0
 private void AddSection()
 {
     using (var form = new FormSectionName())
     {
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var section = EditedContent.CreateSection();
         section.Name = form.SectionName;
         EditedContent.Sections.Add(section);
         EditedContent.RebuildSectionIndexes();
         var sectionControl = AddSectionControl(section);
         xtraTabControlSections.SelectedTabPage = sectionControl;
         settingsContainer.UpdateSettingsAccordingDataChanges(SectionEditorType.Schedule);
         UpdateSectionSplash();
         SettingsNotSaved = true;
     }
 }
 private void AddOptionSet()
 {
     using (var form = new FormOptionSetName())
     {
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var optionSet = new OptionSet(EditedContent);
         optionSet.Name = form.OptionSetName;
         EditedContent.Options.Add(optionSet);
         EditedContent.RebuildOptionSetIndexes();
         var optionControl = AddOptionSetEditorsContainerControl(optionSet);
         xtraTabControlContentEditors.SelectedTabPage = optionControl;
         Summary.UpdateView();
         UpdateSplash();
         SettingsNotSaved = true;
     }
 }
 private void AddSnapshotSet()
 {
     using (var form = new FormSnapshotName())
     {
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var snapshot = new Snapshot(EditedContent);
         snapshot.Name = form.SnapshotName;
         EditedContent.Snapshots.Add(snapshot);
         EditedContent.RebuildSnapshotIndexes();
         var snapshotEditorsContainer = AddSnapshotSetEditorsContainerControl(snapshot);
         xtraTabControlContentEditors.SelectedTabPage = snapshotEditorsContainer;
         Summary.UpdateView();
         UpdateSplash();
         SettingsNotSaved = true;
     }
 }
 private void CloneOptionSet(OptionSetEditorsContainer optionControl)
 {
     using (var form = new FormOptionSetName())
     {
         form.OptionSetName = String.Format("{0} (Clone)", optionControl.OptionSetData.Name);
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var optionSet = optionControl.OptionSetData.Clone <OptionSet, OptionSet>();
         optionSet.Name   = form.OptionSetName;
         optionSet.Index += 0.5;
         EditedContent.Options.Add(optionSet);
         EditedContent.RebuildOptionSetIndexes();
         var newControl = AddOptionSetEditorsContainerControl(optionSet, (Int32)optionSet.Index);
         xtraTabControlContentEditors.SelectedTabPage = newControl;
         Summary.UpdateView();
         SettingsNotSaved = true;
     }
 }
 private void CloneSnapshotSet(SnapshotEditorsContainer snapshotEditorsContainer)
 {
     using (var form = new FormSnapshotName())
     {
         form.SnapshotName = String.Format("{0} (Clone)", snapshotEditorsContainer.SnapshotData.Name);
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var snapshot = snapshotEditorsContainer.SnapshotData.Clone <Snapshot, Snapshot>();
         snapshot.Name   = form.SnapshotName;
         snapshot.Index += 0.5;
         EditedContent.Snapshots.Add(snapshot);
         EditedContent.RebuildSnapshotIndexes();
         var newControl = AddSnapshotSetEditorsContainerControl(snapshot, (Int32)snapshot.Index);
         xtraTabControlContentEditors.SelectedTabPage = newControl;
         Summary.UpdateView();
         SettingsNotSaved = true;
     }
 }
예제 #16
0
 private void CloneSection(SectionContainer sectionControl)
 {
     using (var form = new FormSectionName())
     {
         form.SectionName = String.Format("{0} (Clone)", sectionControl.SectionData.Name);
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         var section = sectionControl.SectionData.Clone <ScheduleSection, ScheduleSection>();
         section.Name   = form.SectionName;
         section.Index += 0.5;
         EditedContent.Sections.Add(section);
         EditedContent.RebuildSectionIndexes();
         var newControl = AddSectionControl(section, (Int32)section.Index);
         xtraTabControlSections.SelectedTabPage = newControl;
         settingsContainer.UpdateSettingsAccordingDataChanges(SectionEditorType.Schedule);
         SettingsNotSaved = true;
     }
 }
        protected override void UpdateEditedContet()
        {
            _allowToSave = false;

            var quickLoad = EditedContent != null && !(ContentUpdateInfo.ChangeInfo.WholeScheduleChanged ||
                                                       ContentUpdateInfo.ChangeInfo.ScheduleDatesChanged ||
                                                       ContentUpdateInfo.ChangeInfo.CalendarTypeChanged ||
                                                       ContentUpdateInfo.ChangeInfo.SpotTypeChanged ||
                                                       ContentUpdateInfo.ChangeInfo.OptionsChanged);

            EditedContent?.Dispose();
            EditedContent = Schedule.OptionsContent.Clone <OptionsContent, OptionsContent>();

            settingsContainer.LoadContent(EditedContent);

            LoadContentEditors(quickLoad);

            _allowToSave = true;

            LoadActiveEditorData();
        }
 protected override void SaveData()
 {
     Schedule.SnapshotContent = EditedContent.Clone <SnapshotContent, SnapshotContent>();
 }
 protected override void SaveData()
 {
     Schedule.DigitalProductsContent = EditedContent.Clone <DigitalProductsContent, DigitalProductsContent>();
 }
 protected override void SaveData()
 {
     Schedule.OptionsContent = EditedContent.Clone <OptionsContent, OptionsContent>();
 }
예제 #21
0
 protected override void SaveData()
 {
     Schedule.ProgramSchedule = EditedContent.Clone <ProgramScheduleContent, ProgramScheduleContent>();
 }
 public override void SaveData()
 {
     BusinessObjects.Instance.ScheduleManager.ActiveSchedule
     .ApplyScheduleSolutionContent(SolutionInfo, EditedContent.Clone <MediaStarAppContent, StarAppContent>());
 }