private void UpdateAllServices(IOrganizationService newService) { // ENTITIES LIST - update the connection EntityListControl.UpdateConnection(newService); EntityDropdown.UpdateConnection(newService); AttributeDropdownBase.UpdateConnection(newService); EntityDropdownAttribs.UpdateConnection(newService); SolutionDropdown.UpdateConnection(newService); AttribListControl.UpdateConnection(newService); EntityDropdownAttribList.UpdateConnection(newService); ViewDropdown.UpdateConnection(newService); EntityDropdownViews.UpdateConnection(newService); GlobalOptionSetList.UpdateConnection(newService); // SolutionDropdownGridView.UpdateConnection(newService); CrmGridView.OrganizationService = newService; CrmGridViewDesignedCols.OrganizationService = newService; cdsDataComboBox.OrganizationService = newService; cdsDataTextBox.OrganizationService = newService; cdsLookupDialog1.Service = newService; EntityListViewBase.UpdateConnection(newService); listViewEntCollection.UpdateConnection(newService); cdsDataComboRetrieve.OrganizationService = newService; }
private void UpdateAllServices(IOrganizationService newService) { // ENTITIES LIST - update the connection EntityListControl.UpdateConnection(newService); EntityDropdown.UpdateConnection(newService); AttributeDropdownBase.UpdateConnection(newService); EntityDropdownAttribs.UpdateConnection(newService); SolutionDropdown.UpdateConnection(newService); AttribListControl.UpdateConnection(newService); EntityDropdownAttribList.UpdateConnection(newService); ViewDropdown.UpdateConnection(newService); EntityDropdownViews.UpdateConnection(newService); GlobalOptionSetList.UpdateConnection(newService); // SolutionDropdownGridView.UpdateConnection(newService); CrmGridView.OrganizationService = newService; cdsDataComboBox.OrganizationService = newService; EntityListViewBase.UpdateConnection(newService); listViewEntCollection.UpdateConnection(newService); // solutionsDropdownControl1.UpdateConnection(newService); }
/// <inheritdoc /> public override void OnDestroy() { _foldersSearchBox = null; _itemsSearchBox = null; _viewDropdown = null; base.OnDestroy(); }
/// <inheritdoc /> public override void OnDestroy() { _foldersSearchBox = null; _itemsSearchBox = null; _viewDropdown = null; Editor.Options.OptionsChanged -= OnOptionsChanged; base.OnDestroy(); }
private void ToolButtonLoadData_Click(object sender, EventArgs e) { // do stuff based on active tab switch (tabControlMain.SelectedTab.Name) { case "tabPageEntList": EntityListControl.LoadData(); break; case "tabPageEntDropdown": EntityDropdown.LoadData(); break; case "tabPageAttrList": AttribListControl.ClearData(); EntityDropdownAttribList.LoadData(); break; case "tabPageAttrDropDown": AttributeDropdownBase.ClearData(); EntityDropdownAttribs.LoadData(); break; case "tabPageSolution": SolutionDropdown.LoadData(); break; case "tabPageViewsDropdown": ViewDropdown.ClearData(); EntityDropdownViews.LoadData(); break; case "tabPageGlobalOptSets": GlobalOptionSetList.LoadData(); break; } }
/// <summary> /// Initializes a new instance of the <see cref="ContentWindow"/> class. /// </summary> /// <param name="editor">The editor.</param> public ContentWindow(Editor editor) : base(editor, true, ScrollBars.None) { Title = "Content"; Icon = editor.Icons.Folder32; // Content database events editor.ContentDatabase.WorkspaceModified += () => _isWorkspaceDirty = true; editor.ContentDatabase.ItemRemoved += ContentDatabaseOnItemRemoved; var options = Editor.Options; options.OptionsChanged += OnOptionsChanged; // Toolstrip _toolStrip = new ToolStrip(34.0f) { Parent = this, }; _importButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Import64, () => Editor.ContentImporting.ShowImportFileDialog(CurrentViewFolder)).LinkTooltip("Import content"); _toolStrip.AddSeparator(); _navigateBackwardButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Left64, NavigateBackward).LinkTooltip("Navigate backward"); _navigateForwardButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Right64, NavigateForward).LinkTooltip("Navigate forward"); _navigateUpButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Up64, NavigateUp).LinkTooltip("Navigate up"); // Navigation bar _navigationBar = new NavigationBar { Parent = this, }; // Split panel _split = new SplitPanel(options.Options.Interface.ContentWindowOrientation, ScrollBars.Both, ScrollBars.Vertical) { AnchorPreset = AnchorPresets.StretchAll, Offsets = new Margin(0, 0, _toolStrip.Bottom, 0), SplitterValue = 0.2f, Parent = this, }; // Content structure tree searching query input box var headerPanel = new ContainerControl { AnchorPreset = AnchorPresets.HorizontalStretchTop, IsScrollable = true, Offsets = new Margin(0, 0, 0, 18 + 6), Parent = _split.Panel1, }; _foldersSearchBox = new TextBox { AnchorPreset = AnchorPresets.HorizontalStretchMiddle, WatermarkText = "Search...", Parent = headerPanel, Bounds = new Rectangle(4, 4, headerPanel.Width - 8, 18), }; _foldersSearchBox.TextChanged += OnFoldersSearchBoxTextChanged; // Content structure tree _tree = new Tree(false) { Y = headerPanel.Bottom, Parent = _split.Panel1, }; _tree.SelectedChanged += OnTreeSelectionChanged; // Content items searching query input box and filters selector var contentItemsSearchPanel = new ContainerControl { AnchorPreset = AnchorPresets.HorizontalStretchTop, IsScrollable = true, Offsets = new Margin(0, 0, 0, 18 + 8), Parent = _split.Panel2, }; const float viewDropdownWidth = 50.0f; _itemsSearchBox = new TextBox { AnchorPreset = AnchorPresets.HorizontalStretchMiddle, WatermarkText = "Search...", Parent = contentItemsSearchPanel, Bounds = new Rectangle(viewDropdownWidth + 8, 4, contentItemsSearchPanel.Width - 12 - viewDropdownWidth, 18), }; _itemsSearchBox.TextChanged += UpdateItemsSearch; _viewDropdown = new ViewDropdown { AnchorPreset = AnchorPresets.MiddleLeft, SupportMultiSelect = true, TooltipText = "Change content view and filter options", Parent = contentItemsSearchPanel, Offsets = new Margin(4, viewDropdownWidth, -9, 18), }; _viewDropdown.SelectedIndexChanged += e => UpdateItemsSearch(); for (int i = 0; i <= (int)ContentItemSearchFilter.Other; i++) { _viewDropdown.Items.Add(((ContentItemSearchFilter)i).ToString()); } _viewDropdown.PopupCreate += OnViewDropdownPopupCreate; // Content View _view = new ContentView { AnchorPreset = AnchorPresets.HorizontalStretchTop, Offsets = new Margin(0, 0, contentItemsSearchPanel.Bottom + 4, 0), IsScrollable = true, Parent = _split.Panel2, }; _view.OnOpen += Open; _view.OnNavigateBack += NavigateBackward; _view.OnRename += Rename; _view.OnDelete += Delete; _view.OnDuplicate += Duplicate; _view.OnPaste += Paste; }