/// <summary>Called to initialize the view.</summary> /// <param name="treeHost">The host.</param> /// <param name="viewNode">The tree node.</param> /// <param name="taskHost">The task host.</param> /// <param name="connections">The connections.</param> /// <remarks> /// Derived classes should not override this method. Implement <see cref="OnInitializeCore"/> instead. /// </remarks> public void OnInitialize(IDTSTaskUIHost treeHost, TreeNode viewNode, object taskHost, object connections) { ViewHost = treeHost; ViewNode = viewNode; Host = taskHost as TaskHost; if (Host == null) { throw new ArgumentException("Host is invalid.", nameof(taskHost)); } ConnectionService = connections as IDtsConnectionService; if (ConnectionService == null) { throw new ArgumentException("Connection service is invalid.", nameof(connections)); } OnInitializeCore(); m_initialized = true; }
public void OnInitialize(IDTSTaskUIHost treeHost, TreeNode viewNode, object taskHost, object connections) { this.generalNode = new GeneralViewNode(taskHost as TaskHost, connections as IDtsConnectionService); this.propertyGrid.SelectedObject = generalNode; }