Esempio n. 1
0
        internal ProjectTreeNode(ISolutionDirectoryPathManagement solutionPath, UAModelDesignerProject projectDescription) : this(solutionPath, projectDescription.Name)
        {
            UAModelDesignerProject = projectDescription;
            ModelDesign _RootOfOPCUAInfromationModel = ModelDesign.CreateRootOfOPCUAInfromationModel(FileName);

            InitializeComponent(_RootOfOPCUAInfromationModel);
        }
Esempio n. 2
0
        internal ProjectTreeNode(IBaseDirectoryProvider solutionPath, UAModelDesignerProject projectDescription)
            : this(solutionPath, projectDescription.Name)
        {
            UAModelDesignerProject = projectDescription;
            ModelDesign _model = ReadConfiguration();

            InitializeComponent(_model);
        }
Esempio n. 3
0
        internal LibraryTreeNode(OpcUaModelCompiler.ModelDesign config, string nodeName)
            : base(nodeName)
        {
            List <OpcUaModelCompiler.NodeDesign> _nodes = new List <OpcUaModelCompiler.NodeDesign>();

            if (config.Items != null)
            {
                _nodes.AddRange(config.Items);
                _nodes.Sort((x, y) =>
                {
                    int _ret = x.GetType().Name.CompareTo(y.GetType().Name);
                    if (_ret == 0)
                    {
                        _ret = x.SymbolicName.Name.CompareTo(y.SymbolicName.Name);
                    }
                    return(_ret);
                });
                config.Items = _nodes.ToArray();
            }
            ModelDesign m_ModelDesignTypes = new ModelDesign(config, true);

            Add(m_ModelDesignTypes);
        }
Esempio n. 4
0
 private void InitializeComponent(ModelDesign model)
 {
     Model = model;
     Add(model);
 }
Esempio n. 5
0
        private static readonly object m_BuildLockObject = new object(); // this object is used to prevent many code generator usage at the same time

        #endregion private

        #region constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectTreeNode"/> encapsulating an existing UA model.
        /// </summary>
        /// <param name="solutionPath">The solution path.</param>
        /// <param name="projectDescription">The project description.</param>
        internal ProjectTreeNode(IProjectConfigurationManagement projectDescription) : base(null, projectDescription.Name)
        {
            m_ProjectConfigurationManager = projectDescription;
            Model = new ModelDesign(projectDescription.ModelDesign, false);
            Add(Model);
        }