private void Start() { Console.WriteLine(SourcetTextBox.Text); SetEnbled(false); ShowMsg(RemoteConnect.ConnectState(Ip105, "blacknull", "ndqatest2021.*+")); ShowMsg(RemoteConnect.ConnectState(Ip106, "blacknull", "ndqatest2021.*+")); ShowMsg(RemoteConnect.ConnectState(Ip23, "blacknull", "ndqatest2021.*+")); CopyFolder(SourcetTextBox.Text, $@"{Ip105}{_folderPath}"); CopyFolder(SourcetTextBox.Text, $@"{Ip106}{_folderPath}"); CopyFolder(SourcetTextBox.Text, $@"{Ip23}{_folderPath}"); SetEnbled(true); }
private void GetVersion(string project) { versionsComboBox.Items.Clear(); ShowMsg(RemoteConnect.ConnectState(@"\\192.168.255.131", "blacknull", "ndqatest2021.*+")); var path = $@"{Ip105}\\developer\\{project}\\data\\script\\AllVersion"; var theFolder = new DirectoryInfo(path); var dirinfo = theFolder.GetDirectories(); foreach (var nextFolder in dirinfo) { if (nextFolder.Extension == ".X") { versionsComboBox.Items.Add(nextFolder); } } versionsComboBox.SelectedIndex = 0; ShowMsg($@"{project}版本获取完成。"); GetFilder(); }
/// <summary> /// 获取179符合条件文件夹 /// </summary> private void GetData() { SetAllEnabled(false); var pcmyY = 8; var xfmyY = 8; var enmyY = 8; var pcmoreY = 8; var myhtY = 8; var sjmyY = 8; var pczfY = 8; pcmyPanel.Panel.Controls.Clear(); xfmyPanel.Panel.Controls.Clear(); enmyPanel.Panel.Controls.Clear(); pcmorePanel.Panel.Controls.Clear(); myhtPanel.Panel.Controls.Clear(); sjmyPanel.Panel.Controls.Clear(); pczfPanel.Panel.Controls.Clear(); RemoteConnect.ConnectState(@"\\192.168.9.179", "qadwnew", "qadwnew123."); RemoteConnect.ConnectState(@"\\172.24.140.83", "qadwnew", "qadwnew123."); RemoteConnect.ConnectState(@"\\172.24.140.84", "root", "tqqa991969"); var theFolder = new DirectoryInfo(@"\\192.168.9.179\data"); foreach (var nextFile in theFolder.GetDirectories()) { if (nextFile.Name.StartsWith("pcmy_autotest") && !nextFile.Name.Contains("xf")) //简体 { var ds = new CheckBox() { Checked = true, Text = nextFile.Name, AutoSize = true, Location = new Point(8, pcmyY), //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pcmyY += 20; AddPcmy(ds); } else if (nextFile.Name.StartsWith("pcmy_autotest") && nextFile.Name.Contains("xf")) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, xfmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; xfmyY += 20; AddXfmy(ds); } else if (nextFile.Name.StartsWith("enmy_autotest")) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, enmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; enmyY += 20; AddEnmy(ds); } else if (nextFile.Name.StartsWith("pcmore_autotest") || nextFile.Name.StartsWith("hjmy_autotest") || nextFile.Name.StartsWith("sjbmy_autotest") || nextFile.Name.StartsWith("bossmy_autotest") || nextFile.Name.StartsWith("tsfhs_autotest") || nextFile.Name.StartsWith("tsfqm_autotest") || nextFile.Name.StartsWith("myzs_autotest")) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pcmoreY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pcmoreY += 20; AddPcmore(ds); } else if (nextFile.Name.StartsWith("myht_autotest") || nextFile.Name.StartsWith("myht_again")) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, myhtY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; myhtY += 20; AddMyht(ds); } } theFolder = new DirectoryInfo(@"\\172.24.140.83\data"); foreach (var nextFile in theFolder.GetDirectories()) { if ((nextFile.Name.StartsWith("sjmy_autotest") || nextFile.Name.StartsWith("sjmy_again")) && !nextFile.Name.Contains("init") && nextFile.Name != "sjmy_autotest_50802") { if (getDateTimeDiff(nextFile.LastWriteTime) > 7) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, sjmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; sjmyY += 20; AddSjmy(ds); } } } theFolder = new DirectoryInfo(@"\\172.24.140.84\data"); foreach (var nextFile in theFolder.GetDirectories()) { if (nextFile.Name.StartsWith("cnzfauto")) { if (nextFile.Name.StartsWith("cnzfauto") && nextFile.Name != "cnzfauto1601005297246") { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pczfY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pczfY += 20; AddPczf(ds); } } } SetAllEnabled(true); }
private void Start() { SetEnbled(false); ShowMsg(RemoteConnect.ConnectState(@"\\192.168.255.187", "blacknull", "ndqatest2021.*+")); ShowMsg(RemoteConnect.ConnectState(@"\\192.168.255.131", "blacknull", "ndqatest2021.*+")); ShowMsg(RemoteConnect.ConnectState(@"\\192.168.255.63", "blacknull", "ndqatest2021.*+")); //ShowMsg(RemoteConnect.ConnectState(@"\\192.168.9.179", "blacknull", "shangjia!@#123.idc1")); //ShowMsg(RemoteConnect.ConnectState(@"\\172.24.140.83", "blacknull", "IDC2.passwd*()")); //ShowMsg(RemoteConnect.ConnectState(@"\\172.24.140.84", "blacknull", "..acquiescence1")); ShowMsg("开始执行复制操作!"); //数据库记录 insertion(); string remote; string aimPath; if (Commb(projectComboBox) == "简体征服 cnzf") { //ftp复制 aimPath = $@"\\172.24.140.84\data\{NewBaseTextBox.Text}"; if (Directory.Exists(aimPath)) { ShowMsg("自动生成的数据库名称已存在,请选择项目重新生成"); SetEnbled(true); return; } Directory.CreateDirectory(aimPath); var ftp = new FtpHelper("192.168.9.250", "/data5/cnzf", "QAyyq", "QAyyq..!!~~"); var max = ftp.GetAllList().Length; var i = 0; max = max / 100 + 1; foreach (var file in ftp.GetAllList()) { ftp.Download(aimPath, file); ShowMsg($"{file}复制完成。"); dS进度条1.当前值 = i / max; i += 1; } dS进度条1.当前值 = 100; ShowMsg($"{NewBaseTextBox.Text}复制完成"); ShowMsg("等待刷库"); } else { bool isContains; dS进度条1.当前值 = 30; if (Commb(projectComboBox) == "手机魔域 init_ndsdk" || Commb(projectComboBox) == "西山居魔域 init_xsj") { //remote = $@"\\172.24.140.83\data\{_oldBase}"; //aimPath = $@"\\172.24.140.83\data\{NewBaseTextBox.Text}"; if (Xcopy(false).IndexOf("error code 0.", StringComparison.OrdinalIgnoreCase) < 0) { ShowMsg("远程命令执行失败导致复制失败!"); SetEnbled(true); return; } } else { //使用wmic的方式复制 //remote = $@"\\192.168.9.179\data\{_oldBase}_bak"; //aimPath = $@"\\192.168.9.179\data\{NewBaseTextBox.Text}"; if (Wcopy().IndexOf("ReturnValue = 0", StringComparison.OrdinalIgnoreCase) < 0) { ShowMsg("远程命令执行失败导致复制失败!"); SetEnbled(true); return; } var initialDir = $@"\\192.168.9.179\data\{_oldBase}_bak"; var endDir = $@"\\192.168.9.179\data\{NewBaseTextBox.Text}"; var initialSize = DirSize(new DirectoryInfo(initialDir)); for (var i = 0; i < 100; i++) { if (DirFile.IsExistDirectory(endDir)) { var endSize = DirSize(new DirectoryInfo(endDir)); ShowMsg($@"目标库大小{endSize}--初始库大小{initialSize}"); if (initialSize == endSize) { break; } System.Threading.Thread.Sleep(2000); if (i > 90) { ShowMsg("复制时间超时,判断复制失败,不执行刷库"); SetEnbled(true); return; } } System.Threading.Thread.Sleep(2000); } } /* * // 共享文件形式 * if (!Directory.Exists(remote)) * { * ShowMsg($"初始库不存在{remote},请检查"); * SetEnbled(true); * return; * * } * * if (Directory.Exists(aimPath)) * { * ShowMsg("自动生成的数据库名称已存在,请选择项目重新生成"); * SetEnbled(true); * return; * } * * if (aimPath[aimPath.Length - 1] != Path.DirectorySeparatorChar) * { * aimPath += Path.DirectorySeparatorChar; * } * /// * Directory.CreateDirectory(aimPath); * var fileList = Directory.GetFiles(remote); * * var max = fileList.Length; * var i = 0; * max = max / 100 + 1; * foreach (var file in fileList) * { * File.Copy(file, aimPath + Path.GetFileName(file), true); * ShowMsg($"{file}复制完成。"); * dS进度条1.当前值 = i / max; * i += 1; * } */ } dS进度条1.当前值 = 50; ShowMsg($"{NewBaseTextBox.Text}复制完成"); ShowMsg("等待刷库"); #region sql地址 常量 const string quickPath206My = @"\\192.168.255.187\developer\pc\xmlconfig\mynfkuaice.sql"; const string userPath206My = @"\\192.168.255.187\developer\pc\xmlconfig\userinfo.sql"; const string dataPath206My = @"\\192.168.255.187\developer\pc\xmlconfig\updateSql_pcmy.sql"; const string quickPath206Xf = @"\\192.168.255.187\developer\xf\xmlconfig\mynfkuaice.sql"; const string userPath206Xf = @"\\192.168.255.187\developer\xf\xmlconfig\userinfo.sql"; const string dataPath206Xf = @"\\192.168.255.187\developer\xf\xmlconfig\updateSql_pcxf.sql"; const string quickPath206Enmy = @"\\192.168.255.187\developer\enmy\xmlconfig\mynfkuaice.sql"; const string userPath206Enmy = @"\\192.168.255.187\developer\enmy\xmlconfig\userinfo.sql"; const string dataPath206Enmy = @"\\192.168.255.187\developer\enmy\xmlconfig\updateSql_enmy.sql"; const string dataPath31Sj = @"\\192.168.255.131\developer\sjmy\main\updateSql_sjmy.sql"; const string dataPath31Xsj = @"\\192.168.255.131\developer\xsjmy\main\updateSql_xsjmy.sql"; const string quickPath206Zf = @"\\192.168.255.187\developer\zf\xmlconfig\mynfkuaice.sql"; const string userPath206Zf = @"\\192.168.255.187\developer\zf\xmlconfig\userinfo.sql"; const string dataPath206Zf = @"\\192.168.255.187\developer\zf\xmlconfig\updateSql_pczf.sql"; const string myhtQuick = @"\\192.168.255.63\developer\myht\main\mynfkuaice.sql"; const string myhtUser = @"\\192.168.255.63\developer\myht\main\userinfo.sql"; const string myhtData = @"\\192.168.255.63\developer\myht\main\updateSql_myht.sql"; const string quickPath206More = @"\\192.168.255.187\developer\pcmore\xmlconfig\mynfkuaice.sql"; const string userPath206More = @"\\192.168.255.187\developer\pcmore\xmlconfig\userinfo.sql"; const string userPath206MoreTsfqm = @"\\192.168.255.187\developer\pcmore\xmlconfig\userinfo_tsfqm.sql"; const string dataPath206More = @"\\192.168.255.187\developer\pcmore\xmlconfig\updateSql_pcmore.sql"; const string dataPathTsfqm = @"\\192.168.255.187\developer\pcmore\xmlconfig\updateSql_tsfqm.sql"; const string dataPathNew = @"\\192.168.255.187\developer\pcmore\xmlconfig\updateSql_new.sql"; #endregion #region 刷库操作 switch (Commb(projectComboBox)) { case "简体魔域 my": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206My); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206My); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206My); dS进度条1.当前值 = 100; } break; case "先锋魔域 xf": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206Xf); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206Xf); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206Xf); dS进度条1.当前值 = 100; } break; case "英文魔域 enmy": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206Enmy); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206Enmy); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206Enmy); dS进度条1.当前值 = 100; } break; case "魔域互通 my": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, myhtUser); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, myhtQuick); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, myhtData); dS进度条1.当前值 = 100; } break; case "手机魔域 init_ndsdk": if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 50; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath31Sj); dS进度条1.当前值 = 100; } break; case "西山居魔域 init_xsj": if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 50; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath31Xsj); dS进度条1.当前值 = 100; } break; case "简体征服 cnzf": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206Zf); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206Zf); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206Zf); dS进度条1.当前值 = 100; } break; case "怀旧魔域 hjmy": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206More); dS进度条1.当前值 = 100; } break; case "魔域时间版 sjbmy": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206More); dS进度条1.当前值 = 100; } break; case "boos版魔域 bossmy": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206More); dS进度条1.当前值 = 100; } break; case "幻兽特色服 tsfhs": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206More); dS进度条1.当前值 = 100; } break; case "千面特色服 tsfqm": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206MoreTsfqm); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPathTsfqm); dS进度条1.当前值 = 100; } break; case "战士特色服 myzs": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPath206More); dS进度条1.当前值 = 100; } break; case "新服特色服 new": if (useSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, userPath206More); dS进度条1.当前值 = 20; } if (QuickSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, quickPath206More); dS进度条1.当前值 = 40; } if (ScriptTextBox.Text != string.Empty) { IntoSql(NewBaseTextBox.Text, ScriptTextBox.Text); dS进度条1.当前值 = 60; } if (restSwitch.开关状态 == DS开关.状态.ON) { IntoSql(NewBaseTextBox.Text, dataPathNew); dS进度条1.当前值 = 100; } break; } #endregion SetEnbled(true); dS进度条1.当前值 = 100; ShowMsg("已完成!复制库名进行使用!!!"); }
/// <summary> /// 获取179符合条件文件夹 /// </summary> private void GetData() { SetAllEnabled(false); var pcmyY = 8; var xfmyY = 8; var enmyY = 8; var pcmoreY = 8; var myhtY = 8; var sjmyY = 8; var pczfY = 8; var xsjmyY = 8; var pbzY = 8; var repairY = 8; pcmyPanel.Panel.Controls.Clear(); xfmyPanel.Panel.Controls.Clear(); enmyPanel.Panel.Controls.Clear(); pcmorePanel.Panel.Controls.Clear(); myhtPanel.Panel.Controls.Clear(); sjmyPanel.Panel.Controls.Clear(); pczfPanel.Panel.Controls.Clear(); xsjmyPanel.Panel.Controls.Clear(); pbzPanel.Panel.Controls.Clear(); repairPanel.Panel.Controls.Clear(); var resultLimit = 14; var repairLiminit = 30; RemoteConnect.ConnectState(@"\\192.168.255.241", "blacknull", "ndqatest2021.*+"); var theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\pcmy"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\pcmy", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pcmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pcmyY += 20; AddPcmy(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\enmy"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\enmy", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, enmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; enmyY += 20; AddEnmy(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\PBZ"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\PBZ", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pbzY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pbzY += 20; AddPbz(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\pcmore"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\pcmore", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pcmoreY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pcmoreY += 20; AddPcmore(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\pcxf"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\pcxf", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, xfmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; xfmyY += 20; AddXfmy(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\pczf"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\pczf", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, pczfY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; pczfY += 20; AddPczf(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\sjmy"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\sjmy", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, sjmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; sjmyY += 20; AddSjmy(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\xsjmy"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\xsjmy", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, xsjmyY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; xsjmyY += 20; AddXsjmy(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\myht"); foreach (var nextFile in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\myht", nextFile.ToString()); if (getDateTimeDiff(nextFile.LastWriteTime) > resultLimit) { var ds = new CheckBox { Checked = true, Text = nextFile.Name, Location = new Point(8, myhtY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; myhtY += 20; AddMyht(ds); } } theFolder = new DirectoryInfo(@"\\192.168.255.241\upload\维护"); foreach (var nextFilea in theFolder.GetDirectories()) { var filePath = Path.Combine(@"\\192.168.255.241\upload\维护", nextFilea.ToString()); var childreForlder = new DirectoryInfo(filePath); foreach (var nextFile in childreForlder.GetDirectories()) { if (getDateTimeDiff(nextFile.LastWriteTime) > repairLiminit) { var ds = new CheckBox { Checked = true, Text = Path.Combine(nextFilea.ToString(), nextFile.Name), Location = new Point(8, repairY), AutoSize = true, //描边颜色 = Color.Transparent, ForeColor = Color.Crimson }; repairY += 20; AddRepair(ds); } } } SetAllEnabled(true); }