資源簡(jiǎn)介
檢測(cè)設(shè)置好到進(jìn)程,如果沒有啟動(dòng),則自動(dòng)觸發(fā)運(yùn)行
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
using?System.Net;
using?System.Net.Sockets;
using?System.Text.Regularexpressions;
using?System.xml;//xml處理類專屬的頭文件
namespace?ProcessCheck
{
????public?partial?class?Form1?:?Form
????{
????????
????????string?opcserver;
????????Array?opcitem;
????????bool?pulse1?;
????????private?bool?windowCreate?=?true;
????????int?TimeCount;
????????string?xml_FilePath?=?““;//用來記錄當(dāng)前打開文件的路徑的
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????TimeCount?=?0;
????????????xml_FilePath?=?System.Windows.Forms.Application.StartupPath?+?“\\ProcessSet.xml“;
????????????pulse1?=?false;
????????????timer1.Enabled?=?true;
????????????timer1.Start();
????????}
???????
????????//xml讀取
????????public?String?xmlread(String?xmlstring)
????????{
????????????try
????????????{
????????????????String?xmlPath?=?System.Windows.Forms.Application.StartupPath?+?“\\“?+?xmlstring?+?“.xml“;
????????????????if?(File.Exists(xmlPath))
????????????????{
????????????????????CommonCS.xmlConfigUtil?xml?=?new?CommonCS.xmlConfigUtil(xmlPath);
????????????????????return?xml.Read(xmlstring);
????????????????????xml?=?null;
????????????????????GC.Collect();
????????????????}
????????????????else
????????????????{
????????????????????return?“0“;
????????????????}
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????return?“0“;
????????????}
????????}
????????//xml寫入
????????public?void?xmlwrite(String?xmlstring?String?value)
????????{
????????????String?xmlPath?=?System.Windows.Forms.Application.StartupPath?+?“\\“?+?xmlstring?+?“.xml“;
????????????if?(File.Exists(xmlPath))
????????????{
????????????????File.Delete(xmlPath);
????????????}
????????????CommonCS.xmlConfigUtil?xml?=?new?CommonCS.xmlConfigUtil(xmlPath);
????????????xml.Write(value?xmlstring);
????????????xml?=?null;
????????????GC.Collect();
????????}
????????
????????public?bool?IsCorrenctIP(string?ip)
????????{
????????????string?pattrn?=?@“((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))“;
????????????if?(System.Text.Regularexpressions.Regex.IsMatch(ip?pattrn))
????????????{
????????????????return?true;
????????????}
????????????else
????????????{
????????????????return?false;
????????????}
????????}
????????//public?bool?IsValidIP(string?ip)
????????//{
????????//????if?(System.Text.Regularexpressions.Regex.IsMatch(ip?“[0-9]{13}//.[0-9]{13}//.[0-9]{13}//.[0-9]{13}“))
????????//????{
????????//????????string[]?ips?=?ip.Split(‘.‘);
????????//????????if?(ips.Length?==?4?||?ips.Length?==?6)
????????//????????{
????????//????????????i
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-12-11?09:36??ProcessCheck\
?????目錄???????????0??2020-12-11?09:37??ProcessCheck\iot\
?????目錄???????????0??2020-12-11?09:35??ProcessCheck\iot\bin\
?????目錄???????????0??2020-12-22?09:23??ProcessCheck\iot\bin\Debug\
?????文件???????36352??2020-12-22?09:23??ProcessCheck\iot\bin\Debug\ProcessCheck.exe
?????文件???????36352??2020-12-22?09:23??ProcessCheck\iot\bin\Debug\ProcessCheck.pdb
?????文件???????11600??2020-12-22?09:29??ProcessCheck\iot\bin\Debug\ProcessCheck.vshost.exe
?????文件?????????490??2016-03-09?13:48??ProcessCheck\iot\bin\Debug\ProcessCheck.vshost.exe.manifest
?????文件?????????205??2020-12-11?12:37??ProcessCheck\iot\bin\Debug\ProcessSet.xm
?????目錄???????????0??2020-01-19?21:12??ProcessCheck\iot\bin\Release\
?????文件???????16958??2017-07-21?15:02??ProcessCheck\iot\bitbug.ico
?????文件???????14626??2020-12-22?09:23??ProcessCheck\iot\Form1.cs
?????文件????????9593??2020-12-22?09:23??ProcessCheck\iot\Form1.Designer.cs
?????文件???????33104??2020-12-22?09:23??ProcessCheck\iot\Form1.resx
?????目錄???????????0??2020-12-11?09:35??ProcessCheck\iot\obj\
?????目錄???????????0??2020-12-11?09:35??ProcessCheck\iot\obj\x86\
?????目錄???????????0??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\
?????文件????????5359??2020-01-19?09:34??ProcessCheck\iot\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????6205??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????1252??2020-12-11?09:36??ProcessCheck\iot\obj\x86\Debug\iot.csproj.FileListAbsolute.txt
?????文件?????????975??2020-06-01?21:15??ProcessCheck\iot\obj\x86\Debug\iot.csproj.GenerateResource.Cache
?????文件?????????723??2020-06-01?21:15??ProcessCheck\iot\obj\x86\Debug\iot.csproj.ResolveComReference.cache
?????文件???????28955??2020-06-01?21:15??ProcessCheck\iot\obj\x86\Debug\iot.Form1.resources
?????文件?????????180??2020-06-01?21:15??ProcessCheck\iot\obj\x86\Debug\iot.Properties.Resources.resources
?????文件?????????602??2020-12-22?09:29??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.csproj.FileListAbsolute.txt
?????文件?????????975??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.csproj.GenerateResource.Cache
?????文件????????9080??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.csprojResolveAssemblyReference.cache
?????文件???????36352??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.exe
?????文件???????17536??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.Form1.resources
?????文件???????36352??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.pdb
?????文件?????????180??2020-12-22?09:23??ProcessCheck\iot\obj\x86\Debug\ProcessCheck.Properties.Resources.resources
............此處省略16個(gè)文件信息
評(píng)論
共有 條評(píng)論