public void ShowEditor(OptionEditorType editorType)
		{
			var editorToShow = xtraTabControl.TabPages
				.OfType<IOptionSetEditorControl>()
				.First(e => e.EditorType == editorType);
			xtraTabControl.SelectedTabPage = (XtraTabPage)editorToShow;
		}
Beispiel #2
0
        public void ShowEditor(OptionEditorType editorType)
        {
            var editorToShow = xtraTabControl.TabPages
                               .OfType <IOptionSetEditorControl>()
                               .First(e => e.EditorType == editorType);

            xtraTabControl.SelectedTabPage = (XtraTabPage)editorToShow;
        }
 public void UpdateSettingsAccordingDataChanges(OptionEditorType editorType)
 {
     switch (editorType)
     {
     case OptionEditorType.Schedule:
         _settingsControls.OfType <OptionSetColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility();
         break;
     }
 }
        public void UpdateSettingsAccordingSelectedEditor(OptionEditorType editorType)
        {
            var selectedTabPage = xtraTabControlOptions.SelectedTabPage;

            xtraTabControlOptions.TabPages.Clear();
            var contentRelation = _optionEditorSettings.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);
        }
Beispiel #5
0
 public void ShowOptionsDialog(OptionEditorType editorType)
 {
     Program.MainForm.ShowOptionsDialog(editorType == OptionEditorType.None ? String.Empty : editorType.ToString());
 }
Beispiel #6
0
		public static void ShowConfigurationDlg(ConfigurationContent configContent, OptionEditorType editorType , ConfigFinalSelectionEventHandler onFinalSelectionHandler)
		{
			ShowConfigurationDlg(configContent, editorType == OptionEditorType.None ? String.Empty : editorType.ToString() , onFinalSelectionHandler);
		}
Beispiel #7
0
		public void ShowOptionsEditor(OptionEditorType type)
		{
			ShowOptionsEditor(type == OptionEditorType.None ? String.Empty : type.ToString());
		}
Beispiel #8
0
 private TreeNode AddNode( OptionEditorType type, string text )
 {
   return AddNode(null, type, text);
 }
Beispiel #9
0
    private TreeNode AddNode( TreeNode parent, OptionEditorType type, string text )
    {
			return AddNode(parent, type.ToString(), text);
    }
		public void UpdateSettingsAccordingDataChanges(OptionEditorType editorType)
		{
			switch (editorType)
			{
				case OptionEditorType.Schedule:
					_settingsControls.OfType<OptionSetColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility();
					break;
			}
		}
		public void UpdateSettingsAccordingSelectedEditor(OptionEditorType editorType)
		{
			_selectedEditorType = editorType;

			var selectedTabPage = xtraTabControlOptions.SelectedTabPage;
			xtraTabControlOptions.TabPages.Clear();
			var contentRelation = _optionEditorSettings.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(OptionSettingsType.AdvancedColumns);
			hyperLinkEditInfoAdvanced.BringToFront();
			hyperLinkEditInfoContract.Visible =
				BusinessObjects.Instance.OutputManager.ContractTemplateFolder.ExistsLocal() &&
				contentRelation != null &&
				contentRelation.SettingsTypes.Contains(OptionSettingsType.Contract);
			hyperLinkEditInfoContract.BringToFront();
			SettingsControlsUpdated?.Invoke(this, EventArgs.Empty);
		}