private OptionSetEditorsContainer AddOptionSetEditorsContainerControl(OptionSet data, int position = -1)
        {
            var optionSetEditorsContainer = new OptionSetEditorsContainer();

            optionSetEditorsContainer.InitControls();
            optionSetEditorsContainer.LoadData(data);
            optionSetEditorsContainer.DataChanged           += OnOptionSetDataChanged;
            optionSetEditorsContainer.SelectedEditorChanged += OnContentEditorChanged;
            position = position == -1 ? xtraTabControlContentEditors.TabPages.OfType <OptionSetEditorsContainer>().Count() : position;
            xtraTabControlContentEditors.TabPages.Insert(position, optionSetEditorsContainer);
            return(optionSetEditorsContainer);
        }
 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;
 }
 private void RenameOptionSet(OptionSetEditorsContainer optionSetEditorsContainer)
 {
     if (optionSetEditorsContainer == null)
     {
         return;
     }
     using (var form = new FormOptionSetName())
     {
         form.OptionSetName = optionSetEditorsContainer.OptionSetData.Name;
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         optionSetEditorsContainer.OptionSetData.Name = form.OptionSetName;
         optionSetEditorsContainer.Text = form.OptionSetName;
         settingsContainer.UpdateSettingsAccordingDataChanges(OptionEditorType.Schedule);
         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;
     }
 }
 public override void Release()
 {
     base.Release();
     _optionSetEditorsContainer = null;
 }
 public OptionSetDigitalInfoControl(OptionSetEditorsContainer optionSetEditorsContainer)
 {
     _optionSetEditorsContainer = optionSetEditorsContainer;
 }
		public override void Release()
		{
			base.Release();
			_optionSetEditorsContainer = null;
		}
		public OptionSetDigitalInfoControl(OptionSetEditorsContainer optionSetEditorsContainer)
		{
			_optionSetEditorsContainer = optionSetEditorsContainer;
		}