public void ShowEditor(SnapshotEditorType editorType)
		{
			var editorToShow = xtraTabControl.TabPages
				.OfType<ISnapshotEditorControl>()
				.First(e => e.EditorType == editorType);
			xtraTabControl.SelectedTabPage = (XtraTabPage)editorToShow;
		}
        public void ShowEditor(SnapshotEditorType editorType)
        {
            var editorToShow = xtraTabControl.TabPages
                               .OfType <ISnapshotEditorControl>()
                               .First(e => e.EditorType == editorType);

            xtraTabControl.SelectedTabPage = (XtraTabPage)editorToShow;
        }
Exemplo n.º 3
0
 public void UpdateSettingsAccordingDataChanges(SnapshotEditorType editorType)
 {
     switch (editorType)
     {
     case SnapshotEditorType.Schedule:
         _settingsControls.OfType <SnapshotColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility();
         break;
     }
 }
Exemplo n.º 4
0
        public void UpdateSettingsAccordingSelectedEditor(SnapshotEditorType editorType)
        {
            var selectedTabPage = xtraTabControlOptions.SelectedTabPage;

            xtraTabControlOptions.TabPages.Clear();
            var contentRelation = _snapshotEditorSettings.FirstOrDefault(r => r.EditorType == editorType);

            if (contentRelation != null)
            {
                xtraTabControlOptions.TabPages.AddRange(_settingsControls
                                                        .Where(sc => sc.IsAvailable && contentRelation.SettingsTypes.Contains(sc.SettingsType))
                                                        .OrderBy(sc => sc.Order)
                                                        .OfType <XtraTabPage>()
                                                        .Where(tp => tp.PageVisible)
                                                        .ToArray());
                if (selectedTabPage != null && xtraTabControlOptions.TabPages.Contains(selectedTabPage))
                {
                    xtraTabControlOptions.SelectedTabPage = selectedTabPage;
                }
            }

            SettingsControlsUpdated?.Invoke(this, EventArgs.Empty);
        }
Exemplo n.º 5
0
		public void UpdateSettingsAccordingDataChanges(SnapshotEditorType editorType)
		{
			switch (editorType)
			{
				case SnapshotEditorType.Schedule:
					_settingsControls.OfType<SnapshotColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility();
					break;
			}
		}
Exemplo n.º 6
0
		public void UpdateSettingsAccordingSelectedEditor(SnapshotEditorType editorType)
		{
			_selectedEditorType = editorType;

			var selectedTabPage = xtraTabControlOptions.SelectedTabPage;
			xtraTabControlOptions.TabPages.Clear();
			var contentRelation = _snapshotEditorSettings.FirstOrDefault(r => r.EditorType == editorType);
			if (contentRelation != null)
			{
				xtraTabControlOptions.TabPages.AddRange(_settingsControls
					.Where(sc => sc.IsAvailable && contentRelation.SettingsTypes.Contains(sc.SettingsType))
					.OrderBy(sc => sc.Order)
					.OfType<XtraTabPage>()
					.Where(tp => tp.PageVisible)
					.ToArray());
				if (selectedTabPage != null && xtraTabControlOptions.TabPages.Contains(selectedTabPage))
					xtraTabControlOptions.SelectedTabPage = selectedTabPage;
			}
			hyperLinkEditInfoAdvanced.Visible =
				contentRelation != null &&
				contentRelation.SettingsTypes.Contains(SnapshotSettingsType.AdvancedColumns);
			hyperLinkEditInfoAdvanced.BringToFront();
			hyperLinkEditInfoContract.Visible =
				BusinessObjects.Instance.OutputManager.ContractTemplateFolder.ExistsLocal() &&
				contentRelation != null &&
				contentRelation.SettingsTypes.Contains(SnapshotSettingsType.Contract);
			hyperLinkEditInfoContract.BringToFront();
			SettingsControlsUpdated?.Invoke(this, EventArgs.Empty);
		}