private SnapshotEditorsContainer AddSnapshotSetEditorsContainerControl(Snapshot data, int position = -1)
        {
            var snapshotEditorsContainer = new SnapshotEditorsContainer();

            snapshotEditorsContainer.InitControls();
            snapshotEditorsContainer.LoadData(data);
            snapshotEditorsContainer.DataChanged           += OnSnapshotSetDataChanged;
            snapshotEditorsContainer.SelectedEditorChanged += OnContentEditorChanged;
            position = position == -1 ? xtraTabControlContentEditors.TabPages.OfType <SnapshotEditorsContainer>().Count() : position;
            xtraTabControlContentEditors.TabPages.Insert(position, snapshotEditorsContainer);
            return(snapshotEditorsContainer);
        }
 private void DeleteSnapshotSet(SnapshotEditorsContainer snapshotEditorsContainer)
 {
     if (PopupMessageHelper.Instance.ShowWarningQuestion("Are you sure want to delete {0}?", snapshotEditorsContainer.SnapshotData.Name) != DialogResult.Yes)
     {
         return;
     }
     EditedContent.Snapshots.Remove(snapshotEditorsContainer.SnapshotData);
     EditedContent.RebuildSnapshotIndexes();
     xtraTabControlContentEditors.TabPages.Remove(snapshotEditorsContainer);
     Summary.UpdateView();
     UpdateSplash();
     UpdateSummaryState();
     UpdateStatusBar();
     settingsContainer.UpdateSettingsAccordingDataChanges(SnapshotEditorType.Schedule);
     SettingsNotSaved = true;
 }
 private void RenameSnapshotSet(SnapshotEditorsContainer snapshotEditorsContainer)
 {
     if (snapshotEditorsContainer == null)
     {
         return;
     }
     using (var form = new FormSnapshotName())
     {
         form.SnapshotName = snapshotEditorsContainer.SnapshotData.Name;
         if (form.ShowDialog(Controller.Instance.FormMain) != DialogResult.OK)
         {
             return;
         }
         snapshotEditorsContainer.SnapshotData.Name = form.SnapshotName;
         snapshotEditorsContainer.Text = form.SnapshotName;
         settingsContainer.UpdateSettingsAccordingDataChanges(SnapshotEditorType.Schedule);
         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;
     }
 }
 public override void Release()
 {
     base.Release();
     _snapshotEditorsContainer = null;
 }
 public SnapshotDigitalInfoControl(SnapshotEditorsContainer optionSetEditorsContainer)
 {
     _snapshotEditorsContainer = optionSetEditorsContainer;
 }
		public override void Release()
		{
			base.Release();
			_snapshotEditorsContainer = null;
		}
		public SnapshotDigitalInfoControl(SnapshotEditorsContainer optionSetEditorsContainer)
		{
			_snapshotEditorsContainer = optionSetEditorsContainer;
		}