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

            InitializeComponent(_RootOfOPCUAInfromationModel);
        }
Exemple #2
0
        internal static ProjectTreeNode ImportNodeSet(ISolutionDirectoryPathManagement solutionPathProvider, Action <TraceMessage> traceEvent, Func <string, Action <TraceMessage>, Tuple <OPCFModelDesign, string> > importNodeSet)
        {
            Tuple <OPCFModelDesign, string> _model = importNodeSet(solutionPathProvider.BaseDirectory, traceEvent);

            if (_model == null)
            {
                return(null);
            }
            return(new ProjectTreeNode(solutionPathProvider, _model.Item2, _model.Item1));
        }
Exemple #3
0
 private ProjectTreeNode(ISolutionDirectoryPathManagement solutionPath, string filePath, OPCFModelDesign model) : this(solutionPath, Path.GetFileNameWithoutExtension(filePath))
 {
     UAModelDesignerProject = new UAModelDesignerProject()
     {
         BuildOutputDirectoryName = Resources.DefaultOutputBuildDirectory,
         CSVFileName       = Resources.DefaultCSVFileName,
         FileName          = RelativeFilePathsCalculator.TryComputeRelativePath(solutionPath.BaseDirectory, filePath),
         ProjectIdentifier = Guid.NewGuid().ToString(),
         Name = m_GetNextUniqueProjectName
     };
     InitializeComponent(new ModelDesign(model, false));
 }
Exemple #4
0
 private ProjectTreeNode(ISolutionDirectoryPathManagement solutionPath, string nodeName) : base(null, nodeName)
 {
     m_SolutionHomeDirectory = solutionPath;
     m_SolutionHomeDirectory.BaseDirectoryPathChanged += SolutionHomeDirectoryBaseDirectoryPathChanged;
 }
Exemple #5
0
        internal static ProjectTreeNode CreateNewModel(ISolutionDirectoryPathManagement solutionPathProvider)
        {
            string _DefaultFileName = Path.Combine(solutionPathProvider.BaseDirectory, m_GetNextUniqueProjectName);

            return(new ProjectTreeNode(solutionPathProvider, _DefaultFileName, new OPCFModelDesign()));
        }
Exemple #6
0
        ///// <summary>
        ///// Initializes a new instance of the <see cref="ServerWrapper" /> class.
        ///// </summary>
        ///// <param name="plugin">The interface to get access to the plugin.</param>
        ///// <param name="assembly">TAn assembly containing the plug-in.</param>
        ///// <param name="userInterface">The user interaction interface that provides basic functionality to implement user interactivity.</param>
        ///// <param name="configuration">The file path containing the configuration.</param>
        //public ServerWrapper(IConfiguration plugin, Assembly assembly, IGraphicalUserInterface userInterface, string configuration) : this(plugin, assembly, userInterface, BaseDirectoryHelper.Instance.GetBaseDirectory(), configuration) { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerWrapper" /> class.
        /// </summary>
        /// <param name="plugin">The interface to get access to the plugin.</param>
        /// <param name="assembly">TAn assembly containing the plug-in.</param>
        /// <param name="userInterface">The user interaction interface that provides basic functionality to implement user interactivity.</param>
        /// <param name="solutionPath">The solution path.</param>
        /// <param name="configuration">The file path containing the configuration.</param>
        public ServerWrapper(IConfiguration plugin, Assembly assembly, IGraphicalUserInterface userInterface, ISolutionDirectoryPathManagement solutionPath, string configuration)
        {
            this.SolutionPath = solutionPath;
            Initialize(plugin, assembly);
            FileInfo _file = null;

            if (!string.IsNullOrEmpty(configuration))
            {
                //TODO Error while using Save operation #129
                if (!IO.RelativeFilePathsCalculator.TestIfPathIsAbsolute(configuration))
                {
                    _file = new FileInfo(Path.Combine(solutionPath.BaseDirectory, configuration));
                }
                else
                {
                    _file = new FileInfo(configuration);
                }
            }
            if (_file == null)
            {
                Configuration = new ConfigurationWrapper(null, m_Server, userInterface);
            }
            else
            {
                Configuration = new ConfigurationWrapper(_file, m_Server, userInterface);
            }
        }
Exemple #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServerWrapper" /> class.
 /// </summary>
 /// <param name="plugin">The interface to get access to the plugin.</param>
 /// <param name="assembly">An assembly containing the plug-in.</param>
 /// <param name="userInterface">The user interaction interface that provides basic functionality to implement user interactivity.</param>
 /// <param name="solutionPath">The solution path.</param>
 public ServerWrapper(IConfiguration plugin, Assembly assembly, IGraphicalUserInterface userInterface, ISolutionDirectoryPathManagement solutionPath) : this(plugin, assembly, userInterface, solutionPath, string.Empty)
 {
 }