コード例 #1
0
ファイル: KpConfig.cs プロジェクト: zhiqiang-hu/scada
        /// <summary>
        /// Получить имя файла конфигурации
        /// </summary>
        public static string GetFileName(string configDir, int kpNum, string cmdLine)
        {
            string shortFileName = string.IsNullOrEmpty(cmdLine) ?
                                   "KpSnmp_" + CommUtils.AddZeros(kpNum, 3) + ".xml" :
                                   cmdLine.Trim();

            return(Path.Combine(configDir, shortFileName));
        }
コード例 #2
0
ファイル: OpcUaHelper.cs プロジェクト: zuoyangithub/scada
        private readonly RuntimeKind runtime; // the runtime kind


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public OpcUaHelper(AppDirs appDirs, int kpNum, RuntimeKind runtime)
        {
            this.appDirs = appDirs ?? throw new ArgumentNullException("appDirs");
            kpNumStr     = CommUtils.AddZeros(kpNum, 3);
            this.runtime = runtime;

            AutoAccept            = false;
            OpcSession            = null;
            CertificateValidation = null;
            WriteToLog            = (string text) => { }; // stub
        }
コード例 #3
0
 /// <summary>
 /// Получить имя файла конфигурации
 /// </summary>
 public static string GetFileName(string configDir, int kpNum)
 {
     return(configDir + "KpOpcUA_" + CommUtils.AddZeros(kpNum, 3) + ".xml");
 }
コード例 #4
0
 /// <summary>
 /// Gets the configuration file name.
 /// </summary>
 public static string GetFileName(string configDir, int kpNum)
 {
     return(Path.Combine(configDir, "KpHttpNotif_" + CommUtils.AddZeros(kpNum, 3) + ".xml"));
 }
コード例 #5
0
 /// <summary>
 /// Gets the configuration file name.
 /// </summary>
 public static string GetFileName(string configDir, int kpNum, string defaultFileName)
 {
     return(string.IsNullOrWhiteSpace(defaultFileName)
         ? Path.Combine(configDir, "KpMqtt_" + CommUtils.AddZeros(kpNum, 3) + ".xml")
         : Path.Combine(configDir, defaultFileName.Trim()));
 }