private void retractableBar_StateChanged(object sender, CommonGUI.RetractableBar.StateChangedEventArgs e)
 {
     if (!_selectedOutput.AllowToSave)
     {
         return;
     }
     _selectedOutput.ShowOptions = e.Expaned;
     _selectedOutput.SaveView();
 }
Exemplo n.º 2
0
        private void SaveAdNotes()
        {
            _settingsContainer.AllowToSave        = false;
            _settingsContainer.ShowCommentsHeader = checkEditShowAdNotes.Checked;
            int position = 1;

            foreach (CheckedListBoxItem item in checkedListBoxAdNotes.Items)
            {
                switch (item.Description)
                {
                case "Total Col In":
                    _settingsContainer.ShowColumnInchesInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionColumnInchesInPreview = position;
                    break;

                case "Comment":
                    _settingsContainer.ShowCommentsInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionCommentsInPreview = position;
                    break;

                case "Deadline":
                    _settingsContainer.ShowDeadlineInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionDeadlineInPreview = position;
                    break;

                case "Col. x Inches":
                    _settingsContainer.ShowDimensionsInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionDimensionsInPreview = position;
                    break;

                case "Mechanicals":
                    _settingsContainer.ShowMechanicalsInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionMechanicalsInPreview = position;
                    break;

                case "Delivery":
                    _settingsContainer.ShowDeliveryInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionDeliveryInPreview = position;
                    break;

                case "Section":
                    _settingsContainer.ShowSectionInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionSectionInPreview = position;
                    break;

                case "Page Size":
                    _settingsContainer.ShowPageSizeInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionPageSizeInPreview = position;
                    break;

                case "% of Page":
                    _settingsContainer.ShowPercentOfPageInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionPercentOfPageInPreview = position;
                    break;

                case "Publication":
                    _settingsContainer.ShowPublicationInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionPublicationInPreview = position;
                    break;

                case "Readership":
                    _settingsContainer.ShowReadershipInPreview     = item.CheckState == CheckState.Checked ? true : false;
                    _settingsContainer.PositionReadershipInPreview = position;
                    break;
                }
                position++;
            }
            _settingsContainer.AllowToSave = true;
            _settingsContainer.SetToggleStateAfterAdNotesChange();
            _settingsContainer.SetPreviewState();
            _settingsContainer.SaveView();
        }