/// <summary> /// Initializes a new instance of the <see cref="SolutionTreeNode" /> class. /// </summary> /// <param name="messageBoxHandling">The Message Box instance to provide messages on the screen.</param> /// <param name="solution">The configuration.</param> /// <param name="OnChangeHandler">The on change handler.</param> /// <param name="creteLibraryTreeNode">The call back to create <see cref="LibraryTreeNode"/>.</param> /// <exception cref="ArgumentNullException">configuration /// or /// messageBoxHandling</exception> internal SolutionTreeNode(IMessageBoxHandling messageBoxHandling, ISolutionConfigurationManagement solution, EventHandler <EventArgs> OnChangeHandler, Action <LibraryTreeNode> creteLibraryTreeNode) : base(null, solution == null ? Guid.NewGuid().ToString() : solution.Name) { MessageBoxHandling = messageBoxHandling ?? throw new ArgumentNullException(nameof(messageBoxHandling)); m_ISolutionConfigurationManagement = solution ?? throw new ArgumentNullException(nameof(solution), $"In constructor {nameof(SolutionTreeNode)} this argument must not be null."); Server.OnConfigurationChanged += new EventHandler <UAServerConfigurationEventArgs>(Server_OnConfigurationChanged); //TODO OnDataChanged += OnChangeHandler; //TODO OnNameChanged += new EventHandler(configuration_OnNameChanged); AddProjectsNodes(solution.Projects); AssemblyTraceEvent.Tracer.TraceEvent(TraceEventType.Verbose, 325542572, "Creating Libraries"); SolutionRoot = this; LibraryRoot.AddNodes(creteLibraryTreeNode); }
/// <summary> /// Initializes a new instance of the <see cref="SolutionTreeNode" /> class. /// </summary> /// <param name="messageBoxHandling">The Message Box instance to provide messages on the screen.</param> /// <param name="solution">The configuration.</param> /// <param name="solutionPath">The solution path.</param> /// <param name="OnChangeHandler">The on change handler.</param> /// <param name="creteLibraryTreeNode">The call back to create <see cref="LibraryTreeNode"/>.</param> /// <exception cref="ArgumentNullException">configuration /// or /// messageBoxHandling</exception> internal SolutionTreeNode(IMessageBoxHandling messageBoxHandling, UAModelDesignerSolution solution, string solutionPath, EventHandler <EventArgs> OnChangeHandler, Action <LibraryTreeNode> creteLibraryTreeNode) : base(null, solution == null ? Guid.NewGuid().ToString() : solution.Name) { MessageBoxHandling = messageBoxHandling ?? throw new ArgumentNullException(nameof(messageBoxHandling)); HomeDirectory = solutionPath; if (solution.ServerDetails == null) { solution.ServerDetails = UAModelDesignerSolutionServerDetails.CreateEmptyInstance(); } Server = new ServerSelector(new GraphicalUserInterface(), solutionPath, solution.ServerDetails.codebase, solution.ServerDetails.configuration); Server.OnConfigurationChanged += new EventHandler <UAServerConfigurationEventArgs>(Server_OnConfigurationChanged); //TODO OnDataChanged += OnChangeHandler; //TODO OnNameChanged += new EventHandler(configuration_OnNameChanged); AddProjectsNodes(solution.Projects); BaseDirectoryHelper.Instance.SetBaseDirectoryProvider(this); SolutionRoot = this; LibraryRoot.AddNodes(creteLibraryTreeNode); }
/// <summary> /// Initializes a new instance of the <see cref="SolutionTreeNode" /> class. /// </summary> /// <param name="messageBoxHandling">The Message Box instance to provide messages on the screen.</param> /// <param name="solution">The configuration.</param> /// <param name="solutionPath">The solution path.</param> /// <param name="OnChangeHandler">The on change handler.</param> /// <param name="creteLibraryTreeNode">The call back to create <see cref="LibraryTreeNode"/>.</param> /// <exception cref="ArgumentNullException">configuration /// or /// messageBoxHandling</exception> internal SolutionTreeNode(IMessageBoxHandling messageBoxHandling, UAModelDesignerSolution solution, string solutionPath, EventHandler <EventArgs> OnChangeHandler, Action <LibraryTreeNode> creteLibraryTreeNode) : base(null, solution == null ? Guid.NewGuid().ToString() : solution.Name) { MessageBoxHandling = messageBoxHandling ?? throw new ArgumentNullException(nameof(messageBoxHandling)); m_PathManagement.SetNewPath(solutionPath); if (solution == null) { throw new ArgumentNullException(nameof(solution), $"In constructor {nameof(SolutionTreeNode)} this argument must not be null."); } if (solution.ServerDetails == null) { solution.ServerDetails = UAModelDesignerSolutionServerDetails.CreateEmptyInstance(); } Server = new ServerSelector(new GraphicalUserInterface(), m_PathManagement, solution.ServerDetails.codebase, solution.ServerDetails.configuration); Server.OnConfigurationChanged += new EventHandler <UAServerConfigurationEventArgs>(Server_OnConfigurationChanged); //TODO OnDataChanged += OnChangeHandler; //TODO OnNameChanged += new EventHandler(configuration_OnNameChanged); AddProjectsNodes(solution.Projects); SolutionRoot = this; LibraryRoot.AddNodes(creteLibraryTreeNode); }