Exemple #1
0
        /// <summary>
        /// 獲取各種路徑
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static PathEntity getPathEntity(toolpars Toolpars)
        {
            var    SettingPathEntity  = Toolpars.SettingPathEntity;
            string serverProgramsPath = CombineStr(new[] { Toolpars.Mplatform, SettingPathEntity.ServerDir,
                                                           SettingPathEntity.Programs });
            string clientProgramsPath = CombineStr(new[] { Toolpars.Mplatform, SettingPathEntity.DeployServerDir,
                                                           SettingPathEntity.Programs });
            string ExportPath         = CombineStr(new[] { Toolpars.formEntity.txtToPath, SettingPathEntity.ExportDir });
            string txtNewTypeKey      = Toolpars.formEntity.txtNewTypeKey;
            string rootDir            = CombineStr(new[] { SettingPathEntity.PackageBaseName, txtNewTypeKey });
            string businessDir        = CombineStr(new[] { rootDir, SettingPathEntity.BusinessDirExtention });
            string ImplementDir       = CombineStr(new[] { businessDir, SettingPathEntity.ImplementDirExtention });
            string UIDir              = CombineStr(new[] { rootDir, SettingPathEntity.UIDirExtention });
            string UIImplementDir     = CombineStr(new[] { UIDir, SettingPathEntity.ImplementDirExtention });
            string businessDllName    = CombineStr(new[] { businessDir, SettingPathEntity.DllExtention });
            string ImplementDllName   = CombineStr(new[] { ImplementDir, SettingPathEntity.DllExtention });
            string UIDllName          = CombineStr(new[] { UIDir, SettingPathEntity.DllExtention });
            string UIImplementDllName = CombineStr(new[] { UIImplementDir, SettingPathEntity.DllExtention });


            if (Toolpars.MIndustry)
            {
                serverProgramsPath = CombineStr(new[] { Toolpars.Mplatform, SettingPathEntity.IndustryServerDir, SettingPathEntity.Programs });
                clientProgramsPath = CombineStr(new[] { Toolpars.Mplatform, SettingPathEntity.IndustryDeployDir, SettingPathEntity.Programs });
            }
            PathEntity pathEntity = new PathEntity()
            {
                ServerProgramsPath = serverProgramsPath,
                DeployProgramsPath = clientProgramsPath,
                ExportPath         = ExportPath,
                RootDir            = rootDir,
                BusinessDir        = businessDir,
                ImplementDir       = ImplementDir,
                UIDir              = UIDir,
                UIImplementDir     = UIImplementDir,
                BusinessDllName    = businessDllName,
                ImplementDllName   = ImplementDllName,
                UIDllName          = UIDllName,
                UIImplementDllName = UIImplementDllName
            };

            return(pathEntity);
        }
Exemple #2
0
        /// <summary>
        /// 獲取各種路徑
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static PathEntity getPathEntity(toolpars Toolpars)
        {
            string serverPath    = Toolpars.Mplatform + "\\Server\\Application\\Customization\\Programs\\";
            string clientPath    = Toolpars.Mplatform + "\\DeployServer\\Shared\\Customization\\Programs\\";
            string ExportPath    = Toolpars.formEntity.txtToPath + "\\Export\\";
            string txtNewTypeKey = Toolpars.formEntity.txtNewTypeKey;

            string businessDllName = "Digiwin.ERP." + txtNewTypeKey
                                     + ".Business.dll";
            string ImplementDllName = "Digiwin.ERP." + txtNewTypeKey
                                      + ".Business.Implement.dll";
            string UIDllName          = "Digiwin.ERP." + txtNewTypeKey + ".UI.dll";
            string UIImplementDllName = "Digiwin.ERP." + txtNewTypeKey
                                        + ".UI.Implement.dll";

            string businessDir    = "Digiwin.ERP." + txtNewTypeKey;
            string ImplementDir   = "Digiwin.ERP." + txtNewTypeKey + ".Business.Implement";
            string UIDir          = "Digiwin.ERP." + txtNewTypeKey + ".UI";
            string UIImplementDir = "Digiwin.ERP." + txtNewTypeKey + ".UI.Implement";



            if (Toolpars.MIndustry)
            {
                serverPath = Toolpars.Mplatform + "\\Server\\Application\\Industry\\Programs\\";
                clientPath = Toolpars.Mplatform + "\\DeployServer\\Shared\\Industry\\Programs\\";
            }
            PathEntity pathEntity = new PathEntity()
            {
                ServerPath         = serverPath,
                DeployServerPath   = clientPath,
                ExportPath         = ExportPath,
                BusinessDllName    = businessDllName,
                ImplementDllName   = ImplementDllName,
                UIDllName          = UIDllName,
                UIImplementDllName = UIImplementDllName
            };

            return(pathEntity);
            //   Toolpars.PathEntity = pathEntity;
        }