diff --git a/Analysis/BaseUnit/FileSorter.cs b/Analysis/BaseUnit/FileSorter.cs new file mode 100644 index 0000000..45a172b --- /dev/null +++ b/Analysis/BaseUnit/FileSorter.cs @@ -0,0 +1,86 @@ +using System; + +using System.Data; +using System.Data.SqlClient; +using System.IO; + +namespace NSAnalysis.BaseUnit +{ + internal class FileSorter + { + private readonly string _connectionString; + + public FileSorter(string connectionString) + { + _connectionString = connectionString; + } + + public void ProcessFiles() + { + var tasks = GetTaskRecords(); + foreach (DataRow task in tasks.Rows) + { + string sourceDir = task["sourceFile"].ToString(); + string targetDir = task["targetFile"].ToString(); + string modelCode = task["modelsCode"].ToString(); + + if (Directory.Exists(sourceDir)) + { + ProcessDirectory(sourceDir, targetDir, modelCode); + } + } + } + + private DataTable GetTaskRecords() + { + using (var connection = new SqlConnection(_connectionString)) + { + var command = new SqlCommand( + "SELECT modelsCode, sourceFile, targetFile FROM CJLR_TASK_RELEASE WHERE status = 'start'", + connection); + + var adapter = new SqlDataAdapter(command); + var dt = new DataTable(); + adapter.Fill(dt); + return dt; + } + } + + private void ProcessDirectory(string sourceDir, string targetDir, string modelCode) + { + if (!Directory.Exists(targetDir)) + { + Directory.CreateDirectory(targetDir); + } + + foreach (string file in Directory.GetFiles(sourceDir, "*.csv")) + { + if (FileContainsModelCode(file, modelCode)) + { + string destFile = Path.Combine(targetDir, Path.GetFileName(file)); + File.Move(file, destFile); + Console.WriteLine($"Moved: {file} -> {destFile}"); + } + } + } + + private bool FileContainsModelCode(string filePath, string modelCode) + { + try + { + string content = File.ReadAllText(filePath); + return content.Contains(modelCode); + } + catch + { + return false; + } + } + + //private static void Main(string[] args) + //{ + // var sorter = new FileSorter("Your_Connection_String"); + // sorter.ProcessFiles(); + //} + } +} \ No newline at end of file diff --git a/Analysis/DAL/SQLHelper.cs b/Analysis/DAL/SQLHelper.cs new file mode 100644 index 0000000..651a621 --- /dev/null +++ b/Analysis/DAL/SQLHelper.cs @@ -0,0 +1,310 @@ +using System; +using System.Data; +using System.Data.SqlClient; +using System.Windows.Forms; + +namespace DAL +{ + public class SQLHelper + { + private static SqlConnection conn = null; + private static SqlCommand cmd = null; + private static SqlDataReader sdr = null; + public static string connStr = ""; + + public static int iFlag = 0; + + private static SqlConnection GetConn() + { + conn = new SqlConnection(connStr); + if (conn.State == ConnectionState.Closed) + { + try + { + conn.Open(); + } + catch (Exception ex) + { + if (iFlag == 0) + { + iFlag++;//必须放在前面,这样才起左右,放在后面,不会赋值 如果不点击确定的话 + + //MyBase.TraceWriteLine(" 数据库打开连接失败" +ex.ToString()); + MessageBox.Show("数据库打开连接失败,请检查数据库是否正确连接!原因:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + return conn; + } + } + return conn; + } + + #region 执行不带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + + /// + /// 执行不带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + /// + /// 增删改SQL语句或存储过程 + /// 命令类型 + /// 返回受影响的行数 + public static int ExecuteNonQuery(string cmdText, CommandType ct) + { + int res = 0; + try + { + cmd = new SqlCommand(cmdText, GetConn()); + cmd.CommandType = ct; + res = cmd.ExecuteNonQuery(); //返回受影响的行数 + } + catch (Exception ex) + { + throw ex; + } + finally + { + if (conn.State == ConnectionState.Open) + { + conn.Close(); + } + } + return res; + } + + #endregion 执行不带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + + #region 执行带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + + /// + /// 执行带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + /// + /// 增删改SQL语句或存储过程 + /// 命令类型 + /// 返回受影响的行数 + public static int ExecuteNonQuery(string cmdText, SqlParameter[] paras, CommandType ct) + { + int res = 0; + + using (cmd = new SqlCommand(cmdText, GetConn())) + { + cmd.CommandType = ct; + cmd.Parameters.AddRange(paras); + res = cmd.ExecuteNonQuery(); + } + return res; + } + + #endregion 执行带参数的增删改SQL语句或存储过程 返回int类型 返回受影响的行数 + + #region 执行不带参数的查询SQL语句或存储过程 返回DataTable类型 + + /// + /// 执行不带参数的查询SQL语句或存储过程 返回DataTable类型 + /// + /// 查询SQL语句或存储过程 + /// 命令类型 + /// DataTable型 + public static DataTable ExecuteQuery(string cmdText, CommandType ct) + { + DataTable dt = new DataTable(); + cmd = new SqlCommand(cmdText, GetConn()); + cmd.CommandType = ct; + using (sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)) + { + dt.Load(sdr); + } + return dt; + } + + #endregion 执行不带参数的查询SQL语句或存储过程 返回DataTable类型 + + #region 执行带参数的查询SQL语句或存储过程 返回DataTable类型 + + /// + /// 执行带参数的查询SQL语句或存储过程 返回DataTable类型 + /// + /// 查询SQL语句或存储过程 + /// 参数集合 + /// 命令类型 + /// DataTable型 + public static DataTable ExecuteQuery(string cmdText, SqlParameter[] paras, CommandType ct) + { + DataTable dt = new DataTable(); + cmd = new SqlCommand(cmdText, GetConn()); + cmd.CommandType = ct; + cmd.Parameters.AddRange(paras); + using (sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)) + { + dt.Load(sdr); + } + return dt; + } + + #endregion 执行带参数的查询SQL语句或存储过程 返回DataTable类型 + + /// + /// 执行SQL语句并返回DataSet + /// + /// SQL语句 + /// + public static DataSet ExecuteDs(String Sqlstr) + { + using (SqlDataAdapter da = new SqlDataAdapter(Sqlstr, GetConn())) + { + DataSet ds = new DataSet(); + da.Fill(ds); + return ds; + } + } + + /// + /// 构建 SqlCommand 对象(用来返回一个结果集,而不是一个整数值) + /// + /// 数据库连接 + /// 存储过程名 + /// 存储过程参数 + /// SqlCommand + private static SqlCommand BuildQueryCommand(SqlConnection connection, string storedProcName, SqlParameter[] parameters) + { + SqlCommand command = new SqlCommand(storedProcName, connection); + command.CommandType = CommandType.StoredProcedure; + foreach (SqlParameter parameter in parameters) + { + if (parameter != null) + { + // 检查未分配值的输出参数,将其分配以DBNull.Value. + if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) && (parameter.Value == null)) + { + parameter.Value = DBNull.Value; + } + command.Parameters.Add(parameter); + } + } + + return command; + } + + /// + /// 执行存储过程 + /// + /// 存储过程名 + /// 存储过程参数 + /// DataSet结果中的表名 + /// DataSet + public static DataSet RunProcedure(string storedProcName, SqlParameter[] parameters, string tableName) + { + using (SqlConnection connection = new SqlConnection(connStr)) + { + DataSet dataSet = new DataSet(); + connection.Open(); + SqlDataAdapter sqlDA = new SqlDataAdapter(); + sqlDA.SelectCommand = BuildQueryCommand(connection, storedProcName, parameters); + sqlDA.Fill(dataSet, tableName); + connection.Close(); + return dataSet; + } + } + + #region 使用SqlBulkCopy插入测量数据 + + /// + /// 要插入的数据表的结构,与函数内部定义的映射表要一模一样 + /// + /// 要插入的数据表 + public static int InsertMeasureDataToDB(DataTable InsertDT) + { + int iResult = 1; + using (SqlBulkCopy bulkCopy = new SqlBulkCopy(GetConn())) + { + try + { + bulkCopy.DestinationTableName = "TMeasureData";//要插入的表的表明,创造映射关系,比下面的直接写表名称 更加灵活 + bulkCopy.ColumnMappings.Add("CarID", "CarID");//映射字段名 DataTable列名 ,数据库 对应的列名 + bulkCopy.ColumnMappings.Add("CarType", "CarType");//映射字段名 DataTable列名 ,数据库 对应的列名 + bulkCopy.ColumnMappings.Add("MeasPointName", "MeasPointName"); + bulkCopy.ColumnMappings.Add("DimensionName", "DimensionName"); + bulkCopy.ColumnMappings.Add("NormalValue", "NormalValue"); + bulkCopy.ColumnMappings.Add("LowerTolVal", "LowerTolVal"); + bulkCopy.ColumnMappings.Add("UpperTolVal", "UpperTolVal"); + bulkCopy.ColumnMappings.Add("MeasureValue", "MeasureValue"); + bulkCopy.ColumnMappings.Add("MeasureItemResult", "MeasureItemResult"); + bulkCopy.ColumnMappings.Add("MeasureDate", "MeasureDate"); + bulkCopy.ColumnMappings.Add("Remark", "Remark"); + bulkCopy.WriteToServer(InsertDT); + } + catch (Exception ex) + { + MessageBox.Show("批量插入测量数据到数据库失败!原因:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); + iResult = -1; + } + } + return iResult; + } + + #endregion 使用SqlBulkCopy插入测量数据 + + #region 使用SqlBulkCopy插入批量数据方法 + + /// + /// 要插入的数据表的结构,与函数内部定义的映射表要一模一样 + /// + /// 要插入的数据表 + public static void TWorkpieceListToSQLServer(DataTable InsertDT) + { + using (SqlBulkCopy bulkCopy = new SqlBulkCopy(GetConn())) + { + try + { + bulkCopy.DestinationTableName = "TWorkpieceList";//要插入的表的表明,创造映射关系,比下面的直接写表名称 更加灵活 + bulkCopy.ColumnMappings.Add("WorkpieceID", "WorkpieceID");//映射字段名 DataTable列名 ,数据库 对应的列名 + bulkCopy.ColumnMappings.Add("DrawerID", "DrawerID"); + bulkCopy.ColumnMappings.Add("WorkpieceType", "WorkpieceType"); + bulkCopy.ColumnMappings.Add("TrayType", "TrayType"); + bulkCopy.ColumnMappings.Add("WorkpieceStatus", "WorkpieceStatus"); + bulkCopy.ColumnMappings.Add("WorkpiecePos", "WorkpiecePos"); + bulkCopy.WriteToServer(InsertDT); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + finally + { + // Close the SqlDataReader. The SqlBulkCopy object is automatically closed at + // the end of the using block. + } + } + } + + #endregion 使用SqlBulkCopy插入批量数据方法 + + #region 使用SqlBulkCopy将DataTable中的数据批量插入数据库中 + + /// + /// 使用SqlBulkCopy将DataTable中的数据批量插入数据库中,用此函数,创建的InsertDataTable类型必须跟数据库中的类型,列数一模一样 + /// + /// 数据库中对应的表名 + /// 数据集 + public static void SqlBulkCopyInsert(string strDBTableName, DataTable InsertDataTable) + { + try + { + using (SqlBulkCopy sqlRevdBulkCopy = new SqlBulkCopy(GetConn()))//引用SqlBulkCopy + { + sqlRevdBulkCopy.DestinationTableName = strDBTableName;//数据库中对应的表名 + + sqlRevdBulkCopy.NotifyAfter = InsertDataTable.Rows.Count;//有几行数据 + + sqlRevdBulkCopy.WriteToServer(InsertDataTable);//数据导入数据库 + + sqlRevdBulkCopy.Close();//关闭连接 + } + } + catch (Exception ex) + { + Console.WriteLine("数据库处理出错,SqlBulkCopyInsert,原因:" + ex.Message); + throw (ex); + } + } + + #endregion 使用SqlBulkCopy将DataTable中的数据批量插入数据库中 + } +} \ No newline at end of file diff --git a/Analysis/DAL/TMeasureMSSQLDAL.cs b/Analysis/DAL/TMeasureMSSQLDAL.cs new file mode 100644 index 0000000..b3e7fc7 --- /dev/null +++ b/Analysis/DAL/TMeasureMSSQLDAL.cs @@ -0,0 +1,357 @@ +using NSAnalysis.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Text; + +namespace DAL +{ + public class TMeasureMSSQLDAL + { + #region Select Function + + public int SelectTMeasureResultCount() + { + string strSql = "select COUNT(*) from TMeasureResult"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return int.Parse(dt.Rows[0][0].ToString()); + } + + public string SelectNo6MeasureResult() + { + string strSql = "select top 6 CarID from TMeasureResult order by MeasureDate desc"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt.Rows[5][0].ToString(); + } + + public DataTable SelectNewestTMeasureResult() + { + string strSql = "select top(1) Id,CarID,MeasureDate,Remark from TMeasureResult order by MeasureDate DESC"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectTMeasureDataByVIN(string strVIN) + { + string strSql = "select * from TMeasureData where CarID ='" + strVIN + "'"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public string SelectOneMeasureValueByCondition(string strCarID, string strMeaPointName, string strDimensionName = "G") + { + DataTable dt = new DataTable(); + string strSql = "select MeasureValue from TMeasureData where CarID = '" + strCarID + "' and MeasPointName = '" + strMeaPointName + "' and DimensionName = '" + strDimensionName + "'"; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + if (dt.Rows.Count == 1) + { + return dt.Rows[0][0].ToString(); + } + else + { + return "NoFind"; + } + } + + public bool CheckVINExistInDB(string strVIN) + { + bool bReusult = false; + string strSql = "select Id from TMeasureResult where CarID = '" + strVIN + "'"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + if (dt.Rows.Count >= 2) + { + bReusult = true; + } + return bReusult; + } + + public string SelectCarTypeByVIN(string strVIN) + { + string strSql = "select CarType from TMeasureResult where CarID = '" + strVIN + "'"; + DataTable dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + if (dt.Rows.Count == 1) + { + return dt.Rows[0][0].ToString(); + } + else + { + return "unknown"; + } + } + + public DataTable SelectMeasureValuebyMeasureNameAndSize(string strMeasureName, string strSizeName, int topCount) + { + string strSql = "select top " + topCount.ToString() + " MeasureValue,NormalValue ,LowerTolVal,UpperTolVal from TMeasureData where MeasPointName='" + strMeasureName + "' and DimensionName='" + strSizeName + "' order by MeasureDate DESC "; + return SQLHelper.ExecuteQuery(strSql, CommandType.Text); + } + + public DataTable SelectAllMeasPointName() + { + string strSql = "select distinct MeasPointName from TMeasureData"; + return SQLHelper.ExecuteQuery(strSql, CommandType.Text); + } + + public DataTable SelectTMeasureDataByCarIDAndTime(string strCarID, string strStartTime, string strEndTime) + { + DataTable dt = new DataTable(); + string strSql = "select CarID, MeasPointName,DimensionName,NormalValue ,LowerTolVal,UpperTolVal,MeasureValue, MeasureDate, MeasureItemResult from TMeasureData where CarID like '%" + strCarID + "%' and MeasureDate >= '" + strStartTime + "' and MeasureDate <= '" + strEndTime + "'"; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectTMeasureDataByCarIDAndMPN(string strCarID, string strMeaPointName) + { + DataTable dt = new DataTable(); + string strSql = "select MeasPointName,DimensionName,LowerTolVal,UpperTolVal,MeasureValue, MeasureItemResult,Remark from TMeasureData where CarID like '%" + strCarID + "%' and MeasPointName like '%" + strMeaPointName + "%' COLLATE Chinese_PRC_CS_AI_WS "; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectMeasureItems(string strCarID, string strMeaPointName) + { + DataTable dt = new DataTable(); + string strSql = "select distinct MeasPointName from TMeasureData where CarID like '%" + strCarID + "%' and MeasPointName like '%" + strMeaPointName + "%' COLLATE Chinese_PRC_CS_AI_WS "; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectAllTMeasureResult() + { + DataTable dt = new DataTable(); + string strSql = "select * from TMeasureResult"; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectTMeasureResultByTime(string strCarID, string strStartTime, string strEndTime) + { + DataTable dt = new DataTable(); + string strSql = "select CarID,SumMeasureItems,GoodMeasureItems,NoGoodMeasureItems,RejectMeasureItems,FPY,MeasureDate,case Result when 1 then '合格' else '不合格' end as Result from TMeasureResult where CarID like '%" + strCarID + "%' and MeasureDate >= '" + strStartTime + "' and MeasureDate <= '" + strEndTime + "'"; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public DataTable SelectTaskByCondition(string strModelName, string strModelCode, string strStatus) + { + DataTable dt = new DataTable(); + StringBuilder strSql = new StringBuilder(@"SELECT id, modelsName, modelsCode, position, + sourceFile, targetFile, status, create_date, + readType + FROM CJLR.dbo.CJLR_TASK_RELEASE + WHERE is_delete = 1 AND readType = 1 "); // 默认只查询未删除记录 + + List paras = new List(); + + if (!string.IsNullOrEmpty(strModelName)) + { + strSql.Append(" AND modelsName LIKE '%' + @ModelName + '%'"); + paras.Add(new SqlParameter("@ModelName", strModelName)); + } + + if (!string.IsNullOrEmpty(strModelCode)) + { + strSql.Append(" AND modelsCode LIKE '%' + @ModelCode + '%'"); + paras.Add(new SqlParameter("@ModelCode", strModelCode)); + } + + // 状态查询优化 + if (!string.IsNullOrEmpty(strStatus) && strStatus != "all") + { + strSql.Append(" AND status = @Status"); + paras.Add(new SqlParameter("@Status", strStatus)); + } + + // 增加 ORDER BY create_date DESC + strSql.Append(" ORDER BY create_date DESC"); + + dt = SQLHelper.ExecuteQuery(strSql.ToString(), paras.ToArray(), CommandType.Text); + return dt; + } + + public DataTable SelectOneToleranceByCondition(string strCartType, string strMeaPointName, string strDimensionName) + { + DataTable dt = new DataTable(); + string strSql = "select TolLower,TolUpper from TTolerance where CarType = '" + strCartType + "' and MeasurePointName = '" + strMeaPointName + "' and DimensionName = '" + strDimensionName + "'"; + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + return dt; + } + + public bool CheckTaskExit(string strModelsName, string strModelsCode, string strReadType) + { + DataTable dt = new DataTable(); + + // 构建 SQL 查询语句 + string strSql = $"SELECT Id FROM CJLR.dbo.CJLR_TASK_RELEASE " + + $"WHERE modelsName = '{strModelsName}' " + + $"AND modelsCode = '{strModelsCode}' " + + $"AND readType = {(strReadType)}"; + + // 执行查询 + dt = SQLHelper.ExecuteQuery(strSql, CommandType.Text); + + // 检查结果 + return dt.Rows.Count > 0; // 任务存在返回 true,否则返回 false + } + + #endregion + + #region Insert Function + + // 插入分发配置 + + public int InsertTask(CjlrTaskReleaseModel model) + { + const string strSql = @"INSERT INTO CJLR.dbo.CJLR_TASK_RELEASE + (modelsName, modelsCode, position, sourceFile, targetFile, + status, create_date, is_delete, readType) + VALUES + (@modelsName, @modelsCode, @position, @sourceFile, @targetFile, + @status, @create_date, @is_delete, @readType); + SELECT SCOPE_IDENTITY();"; + + SqlParameter[] parameters = new SqlParameter[] + { + new SqlParameter("@modelsName", model.ModelsName ?? (object)DBNull.Value), + new SqlParameter("@modelsCode", model.ModelsCode ?? (object)DBNull.Value), + new SqlParameter("@position", model.Position ?? (object)DBNull.Value), + new SqlParameter("@sourceFile", model.SourceFile ?? (object)DBNull.Value), + new SqlParameter("@targetFile", model.TargetFile ?? (object)DBNull.Value), + new SqlParameter("@status", model.Status ?? (object)DBNull.Value), + new SqlParameter("@create_date", model.CreateDate == default ? + DateTime.Now : model.CreateDate), + new SqlParameter("@is_delete", model.IsDelete), + new SqlParameter("@readType", model.ReadType) + }; + + object result = SQLHelper.ExecuteNonQuery(strSql, parameters, CommandType.Text); + return Convert.ToInt32(result); + } + + // 插入分发详细记录 + public int InsertModel(CjlrTaskReleaseModel model) + { + string strSql = "INSERT INTO CJLR_TASK_RELEASE_DETAIL " + + "(modelsName, modelsCode, position, sourceFile, targetFile, status, createDate, isDelete, readType) " + + "VALUES (@modelsName, @modelsCode, @position, @sourceFile, @targetFile, @status, @createDate, @isDelete, @readType)"; + + SqlParameter[] paras = new SqlParameter[] + { + new SqlParameter("@modelsName", model.ModelsName ?? (object)DBNull.Value), + new SqlParameter("@modelsCode", model.ModelsCode ?? (object)DBNull.Value), + new SqlParameter("@position", model.Position ?? (object)DBNull.Value), + new SqlParameter("@sourceFile", model.SourceFile ?? (object)DBNull.Value), + new SqlParameter("@targetFile", model.TargetFile ?? (object)DBNull.Value), + new SqlParameter("@status", model.Status ?? (object)DBNull.Value), + new SqlParameter("@createDate", model.CreateDate == default ? + DateTime.Parse("2024-01-31 14:37:00") : model.CreateDate), + new SqlParameter("@isDelete", model.IsDelete), + new SqlParameter("@readType", model.ReadType) + }; + + return SQLHelper.ExecuteNonQuery(strSql, paras, CommandType.Text); + } + + //public int InsertTMeasureResult(TMeasureResultModel tmrm) + //{ + // string strSql = "insert into TMeasureResult (CarID,CarType,SumMeasureItems,GoodMeasureItems,NoGoodMeasureItems,RejectMeasureItems,FPY,MeasureDate,Result,Remark) values " + + // "(@CarID,@CarType,@SumMeasureItems,@GoodMeasureItems,@NoGoodMeasureItems,@RejectMeasureItems,@FPY,@MeasureDate,@Result,@Remark)"; + // SqlParameter[] paras = new SqlParameter[] + // { + // new SqlParameter("@CarID",tmrm.CarID), + // new SqlParameter("@CarType",tmrm.CarType), + // new SqlParameter("@SumMeasureItems",tmrm.SumMeasureItems), + // new SqlParameter("@GoodMeasureItems",tmrm.GoodMeasureItems), + // new SqlParameter("@NoGoodMeasureItems",tmrm.NoGoodMeasureItems), + // new SqlParameter("@RejectMeasureItems",tmrm.RejectMeasureItems), + // new SqlParameter("@FPY",tmrm.FPY), + // new SqlParameter("@MeasureDate",tmrm.MeasureDate), + // new SqlParameter("@Result",tmrm.Result), + // new SqlParameter("@Remark",tmrm.Remark), + // }; + // return SQLHelper.ExecuteNonQuery(strSql, paras, CommandType.Text); + //} + + public int InsertTMeasureDatabyDataTable(DataTable dt) + { + return SQLHelper.InsertMeasureDataToDB(dt); + } + + #endregion + + #region Update Function + + // 更新分发配置 + public int UpdateTaskRelease(CjlrTaskReleaseModel cjlrTaskRelease) + { + string strSql = @" + UPDATE CJLR.dbo.CJLR_TASK_RELEASE + SET + ModelsName = @ModelsName, + ModelsCode = @ModelsCode, + Position = @Position, + SourceFile = @SourceFile, + TargetFile = @TargetFile, + Status = @Status, + create_date = @create_date, + is_delete = @is_delete, + readType = @readType + WHERE + Id = @Id;"; + + SqlParameter[] paras = new SqlParameter[] + { + new SqlParameter("@ModelsName", cjlrTaskRelease.ModelsName ?? (object)DBNull.Value), + new SqlParameter("@ModelsCode", cjlrTaskRelease.ModelsCode ?? (object)DBNull.Value), + new SqlParameter("@position", cjlrTaskRelease.Position ?? (object)DBNull.Value), + new SqlParameter("@sourceFile", cjlrTaskRelease.SourceFile ?? (object)DBNull.Value), + new SqlParameter("@targetFile", cjlrTaskRelease.TargetFile ?? (object)DBNull.Value), + new SqlParameter("@status", cjlrTaskRelease.Status ?? (object)DBNull.Value), + new SqlParameter("@create_date", cjlrTaskRelease.CreateDate), + new SqlParameter("@is_delete", cjlrTaskRelease.IsDelete), + new SqlParameter("@readType", cjlrTaskRelease.ReadType), + new SqlParameter("@id", cjlrTaskRelease.Id) + }; + + return SQLHelper.ExecuteNonQuery(strSql, paras, CommandType.Text); + } + + // 更新的方式标记删除 + public int UpdateIsDelete(string modelsName, string modelsCode) + { + // SQL 更新语句 + string strOle = "UPDATE CJLR_TASK_RELEASE SET is_delete = 0 WHERE modelsName = @modelsName AND modelsCode = @modelsCode"; + + // 创建参数 + SqlParameter[] parameters = new SqlParameter[] + { + new SqlParameter("@modelsName", modelsName), + new SqlParameter("@modelsCode", modelsCode) + }; + + // 执行更新操作 + return SQLHelper.ExecuteNonQuery(strOle, parameters, CommandType.Text); + } + + #endregion + + #region Delete Function + + public int DeleteOneTolerance(string modelsCode) + { + // 使用参数化查询以防止 SQL 注入 + string strOle = "DELETE FROM CJLR_TASK_RELEASE WHERE modelsCode = @modelsCode"; + + // 创建一个 SqlParameter 来替代直接拼接字符串 + SqlParameter[] parameters = new SqlParameter[] + { + new SqlParameter("@modelsCode", modelsCode), + }; + + // 执行非查询操作 + return SQLHelper.ExecuteNonQuery(strOle, parameters, CommandType.Text); + } + + #endregion + } +} \ No newline at end of file diff --git a/Analysis/Define/Define.cs b/Analysis/Define/Define.cs index 547bfbd..ec4066a 100644 --- a/Analysis/Define/Define.cs +++ b/Analysis/Define/Define.cs @@ -200,7 +200,7 @@ namespace NSAnalysis if (File.Exists(strConfigFile)) { LoadConfig(); - + DatabaseDfn.LoadConfig(); MyBase.TraceWriteLine("加载配置文件——>完成"); } diff --git a/Analysis/FormMain.cs b/Analysis/FormMain.cs index 1636d4b..892893b 100644 --- a/Analysis/FormMain.cs +++ b/Analysis/FormMain.cs @@ -586,7 +586,6 @@ namespace NSAnalysis if (iCurrentMeasureItemsFailedCount >= ConfigDfn.iFailedCarCount) { MyBase.TraceWriteLine("iCurrentMeasureItemsFailedCount=" + iCurrentMeasureItemsFailedCount.ToString() + "超过报警数量" + ConfigDfn.iFailedCarCount.ToString() + " ;给PLC发送报警10。"); - } // 单个报告内 invalued 项超过某个值 @@ -613,7 +612,6 @@ namespace NSAnalysis labResult.ForeColor = Color.LimeGreen; pbResult.Image = Resources.OK; //tmrm.Result = 1; - } else if (FPYPercent >= ConfigDfn.dFPY2 && FPYPercent < ConfigDfn.dFPY) { @@ -623,7 +621,6 @@ namespace NSAnalysis labResult.ForeColor = Color.Yellow; pbResult.Image = Resources.OK; //tmrm.Result = 1; - } else { @@ -633,7 +630,6 @@ namespace NSAnalysis labResult.ForeColor = Color.Red; pbResult.Image = Resources.NG; //tmrm.Result = 2; - } xValues[0] = "合格 : " + OKCount.ToString(); xValues[1] = "不合格 : " + OutCount.ToString(); @@ -1438,8 +1434,6 @@ namespace NSAnalysis } } - - private void lpcAboutSoftware_Click(object sender, EventArgs e) { AboutSoftwareInfo asi = new AboutSoftwareInfo(); diff --git a/Analysis/Model/CjlrTaskReleaseDetailModel.cs b/Analysis/Model/CjlrTaskReleaseDetailModel.cs new file mode 100644 index 0000000..b148190 --- /dev/null +++ b/Analysis/Model/CjlrTaskReleaseDetailModel.cs @@ -0,0 +1,135 @@ +/* + ###CSharp Code Generate### + CJLR_TASK_RELEASE_DETAIL + Create by User(EMAIL) 2025/8/4 13:34:37 + +CJLR_TASK_RELEASE_DETAIL +---------------------------- +id PKInteger(10) //<<类名:int,自增长>> +modelsName String(50) //<<类名:nvarchar>> +modelsCode String(50) //<<类名:nvarchar>> +position String(50) //<<类名:nvarchar>> +sourceFile String(255) //<<类名:nvarchar>> +targetFile String(255) //<<类名:nvarchar>> +taskFileName String(50) //<<类名:nvarchar>> +taskStatus Integer(10) //<<类名:int>> +taskDetail String(200) //<<类名:nvarchar>> +createDate Date //<<类名:datetime>> + +*/ + +using System; + +namespace NSAnalysis +{ + public class CjlrTaskReleaseDetailModel + { + protected int id; + protected string modelsName; + protected string modelsCode; + protected string position; + protected string sourceFile; + protected string targetFile; + protected string taskFileName; + protected int taskStatus; + protected string taskDetail; + protected DateTime createDate; + + public CjlrTaskReleaseDetailModel() + { + } + + public int Id + { + get { return id; } + set { id = value; } + } + + public string ModelsName + { + get { return modelsName; } + set { modelsName = value; } + } + + public string ModelsCode + { + get { return modelsCode; } + set { modelsCode = value; } + } + + public string Position + { + get { return position; } + set { position = value; } + } + + public string SourceFile + { + get { return sourceFile; } + set { sourceFile = value; } + } + + public string TargetFile + { + get { return targetFile; } + set { targetFile = value; } + } + + public string TaskFileName + { + get { return taskFileName; } + set { taskFileName = value; } + } + + public int TaskStatus + { + get { return taskStatus; } + set { taskStatus = value; } + } + + public string TaskDetail + { + get { return taskDetail; } + set { taskDetail = value; } + } + + public DateTime CreateDate + { + get { return createDate; } + set { createDate = value; } + } + + public void Reset() + { + id = 0; + modelsName = null; + modelsCode = null; + position = null; + sourceFile = null; + targetFile = null; + taskFileName = null; + taskStatus = 0; + taskDetail = null; + createDate = DateTime.Parse("2023-01-01 00:00:00"); + } + + public void AssignFrom(CjlrTaskReleaseDetailModel AObj) + { + if (AObj == null) + { + Reset(); + return; + } + id = AObj.id; + modelsName = AObj.modelsName; + modelsCode = AObj.modelsCode; + position = AObj.position; + sourceFile = AObj.sourceFile; + targetFile = AObj.targetFile; + taskFileName = AObj.taskFileName; + taskStatus = AObj.taskStatus; + taskDetail = AObj.taskDetail; + createDate = AObj.createDate; + } + } +} \ No newline at end of file diff --git a/Analysis/Model/CjlrTaskReleaseModel.cs b/Analysis/Model/CjlrTaskReleaseModel.cs new file mode 100644 index 0000000..63db8de --- /dev/null +++ b/Analysis/Model/CjlrTaskReleaseModel.cs @@ -0,0 +1,134 @@ +/* +###CSharp Code Generate### +CJLR_TASK_RELEASE +Create by User(EMAIL) 2025/8/4 13:34:37 + +CJLR_TASK_RELEASE +--------------------------- +id PKInteger(10) //<<类名:int,自增长>> +modelsName String(50) //<<类名:nvarchar>> +modelsCode String(10) //<<类名:nvarchar>> +position String(10) //<<类名:nvarchar>> +sourceFile String(255) //<<类名:nvarchar>> +targetFile String(50) //<<类名:nvarchar>> +status String(50) //<<类名:nvarchar>> +create_date Date //<<类名:smalldatetime>> +is_delete Integer(10) //<<类名:int>> 1 表示存在, 0 表示删除 +readType Integer(10) //<<类名:int>> 1 表示文件内容, 2 表示文件名称 +*/ + +using System; + +namespace NSAnalysis.Model +{ + public class CjlrTaskReleaseModel + { + protected int id; + protected string modelsName; + protected string modelsCode; + protected string position; + protected string sourceFile; + protected string targetFile; + protected string status; + protected DateTime createDate; + protected int isDelete; + protected int readType; + + public CjlrTaskReleaseModel() + { + } + + public int Id + { + get { return id; } + set { id = value; } + } + + public string ModelsName + { + get { return modelsName; } + set { modelsName = value; } + } + + public string ModelsCode + { + get { return modelsCode; } + set { modelsCode = value; } + } + + public string Position + { + get { return position; } + set { position = value; } + } + + public string SourceFile + { + get { return sourceFile; } + set { sourceFile = value; } + } + + public string TargetFile + { + get { return targetFile; } + set { targetFile = value; } + } + + public string Status + { + get { return status; } + set { status = value; } + } + + public DateTime CreateDate + { + get { return createDate; } + set { createDate = value; } + } + + public int IsDelete + { + get { return isDelete; } + set { isDelete = value; } + } + + public int ReadType + { + get { return readType; } + set { readType = value; } + } + + public void Reset() + { + id = 0; + modelsName = null; + modelsCode = null; + position = null; + sourceFile = null; + targetFile = null; + status = null; + createDate = DateTime.Parse("2023-01-01 00:00:00"); + isDelete = 0; + readType = 0; + } + + public void AssignFrom(CjlrTaskReleaseModel AObj) + { + if (AObj == null) + { + Reset(); + return; + } + id = AObj.id; + modelsName = AObj.modelsName; + modelsCode = AObj.modelsCode; + position = AObj.position; + sourceFile = AObj.sourceFile; + targetFile = AObj.targetFile; + status = AObj.status; + createDate = AObj.createDate; + isDelete = AObj.isDelete; + readType = AObj.readType; + } + } +} \ No newline at end of file diff --git a/Analysis/NXSAnalysis.csproj b/Analysis/NXSAnalysis.csproj new file mode 100644 index 0000000..7764831 --- /dev/null +++ b/Analysis/NXSAnalysis.csproj @@ -0,0 +1,302 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {7C83975D-A071-48E0-8A12-DAFD20525B66} + WinExe + Properties + NSAnalysis + NSAnalysis + v4.8 + 512 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + HexagonTransparent.ico + + + + False + bin\x64\Debug\Covert.dll + + + ..\DAL\bin\Debug\DAL.dll + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NLog.5.3.3\lib\net46\NLog.dll + + + + + + + + + + + + + + + + + ..\lib\RCWF\2018.3.1016.40\Telerik.WinControls.dll + True + + + + ..\lib\RCWF\2018.3.1016.40\Telerik.WinControls.UI.dll + True + + + ..\lib\RCWF\2018.3.1016.40\TelerikCommon.dll + True + + + + + Form + + + AboutSoftwareInfo.cs + + + + + + + + + Form + + + FormMain.cs + + + + UserControl + + + LabPictureControl.cs + + + + + + + Form + + + FAddTolerance.cs + + + Form + + + FEditTolerance.cs + + + Form + + + FSoftwareSetup.cs + + + Form + + + FToleranceSetup.cs + + + Form + + + ZSFDEMO.cs + + + AboutSoftwareInfo.cs + + + FormMain.cs + + + LabPictureControl.cs + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + FAddTolerance.cs + + + FEditTolerance.cs + + + FSoftwareSetup.cs + + + FToleranceSetup.cs + + + ZSFDEMO.cs + + + Always + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.7 %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/Analysis/NXSAnalysis.csproj.user b/Analysis/NXSAnalysis.csproj.user new file mode 100644 index 0000000..95a1d1a --- /dev/null +++ b/Analysis/NXSAnalysis.csproj.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + zh-CN + false + + \ No newline at end of file diff --git a/Analysis/Tolerance/FAddTolerance.cs b/Analysis/Tolerance/FAddTolerance.cs index e5c3d78..648955c 100644 --- a/Analysis/Tolerance/FAddTolerance.cs +++ b/Analysis/Tolerance/FAddTolerance.cs @@ -114,7 +114,7 @@ namespace NSAnalysis strPosition = "L"; // 右侧 } - if(strStatus.Equals("启动")) + if (strStatus.Equals("启动")) { strStatus = "start"; // 启动 } @@ -124,7 +124,7 @@ namespace NSAnalysis } //添加分发配置 - CJLR_TASK_RELEASE cJLR_TASK_RELEASE = new CJLR_TASK_RELEASE(); + CjlrTaskReleaseModel cJLR_TASK_RELEASE = new CjlrTaskReleaseModel(); cJLR_TASK_RELEASE.ModelsName = strCarName; cJLR_TASK_RELEASE.ModelsCode = strCarType; cJLR_TASK_RELEASE.Position = strPosition; diff --git a/Analysis/Tolerance/FAddTolerance.designer.cs b/Analysis/Tolerance/FAddTolerance.designer.cs index ea9da4a..0a15a94 100644 --- a/Analysis/Tolerance/FAddTolerance.designer.cs +++ b/Analysis/Tolerance/FAddTolerance.designer.cs @@ -29,11 +29,11 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FAddTolerance)); - Telerik.WinControls.UI.RadListDataItem radListDataItem1 = new Telerik.WinControls.UI.RadListDataItem(); - Telerik.WinControls.UI.RadListDataItem radListDataItem2 = new Telerik.WinControls.UI.RadListDataItem(); - Telerik.WinControls.UI.RadListDataItem radListDataItem3 = new Telerik.WinControls.UI.RadListDataItem(); Telerik.WinControls.UI.RadListDataItem radListDataItem4 = new Telerik.WinControls.UI.RadListDataItem(); Telerik.WinControls.UI.RadListDataItem radListDataItem5 = new Telerik.WinControls.UI.RadListDataItem(); + Telerik.WinControls.UI.RadListDataItem radListDataItem6 = new Telerik.WinControls.UI.RadListDataItem(); + Telerik.WinControls.UI.RadListDataItem radListDataItem7 = new Telerik.WinControls.UI.RadListDataItem(); + Telerik.WinControls.UI.RadListDataItem radListDataItem1 = new Telerik.WinControls.UI.RadListDataItem(); this.radTitleBar1 = new Telerik.WinControls.UI.RadTitleBar(); this.label2 = new System.Windows.Forms.Label(); this.labTitle = new System.Windows.Forms.Label(); @@ -97,7 +97,7 @@ // this.radTitleBar1.RootElement.ApplyShapeToControl = true; this.radTitleBar1.RootElement.BorderHighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(109)))), ((int)(((byte)(124))))); - this.radTitleBar1.Size = new System.Drawing.Size(631, 40); + this.radTitleBar1.Size = new System.Drawing.Size(739, 40); this.radTitleBar1.TabIndex = 0; this.radTitleBar1.TabStop = false; this.radTitleBar1.Text = "添加公差带"; @@ -122,7 +122,7 @@ this.label2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label2.AutoSize = true; this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image"))); - this.label2.Location = new System.Drawing.Point(246, -5); + this.label2.Location = new System.Drawing.Point(300, -5); this.label2.Name = "label2"; this.label2.Padding = new System.Windows.Forms.Padding(23, 15, 23, 15); this.label2.Size = new System.Drawing.Size(46, 52); @@ -134,7 +134,7 @@ this.labTitle.AutoSize = true; this.labTitle.Font = new System.Drawing.Font("微软雅黑", 14F); this.labTitle.ForeColor = System.Drawing.Color.White; - this.labTitle.Location = new System.Drawing.Point(288, 8); + this.labTitle.Location = new System.Drawing.Point(342, 8); this.labTitle.Name = "labTitle"; this.labTitle.Size = new System.Drawing.Size(88, 25); this.labTitle.TabIndex = 0; @@ -146,7 +146,7 @@ this.rbtnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.rbtnCancel.Font = new System.Drawing.Font("微软雅黑", 11F); this.rbtnCancel.ForeColor = System.Drawing.Color.White; - this.rbtnCancel.Location = new System.Drawing.Point(524, 374); + this.rbtnCancel.Location = new System.Drawing.Point(606, 465); this.rbtnCancel.Name = "rbtnCancel"; this.rbtnCancel.Size = new System.Drawing.Size(85, 30); this.rbtnCancel.TabIndex = 10; @@ -164,7 +164,7 @@ this.rbtnOK.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.rbtnOK.Font = new System.Drawing.Font("微软雅黑", 11F); this.rbtnOK.ForeColor = System.Drawing.Color.White; - this.rbtnOK.Location = new System.Drawing.Point(396, 374); + this.rbtnOK.Location = new System.Drawing.Point(478, 465); this.rbtnOK.Name = "rbtnOK"; this.rbtnOK.Size = new System.Drawing.Size(85, 30); this.rbtnOK.TabIndex = 9; @@ -185,7 +185,7 @@ this.btn_targetFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.btn_targetFile.Font = new System.Drawing.Font("微软雅黑", 11F); this.btn_targetFile.ForeColor = System.Drawing.Color.White; - this.btn_targetFile.Location = new System.Drawing.Point(383, 184); + this.btn_targetFile.Location = new System.Drawing.Point(504, 204); this.btn_targetFile.Name = "btn_targetFile"; this.btn_targetFile.Size = new System.Drawing.Size(50, 30); this.btn_targetFile.TabIndex = 72; @@ -201,7 +201,7 @@ this.btn_sourceFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.btn_sourceFile.Font = new System.Drawing.Font("微软雅黑", 11F); this.btn_sourceFile.ForeColor = System.Drawing.Color.White; - this.btn_sourceFile.Location = new System.Drawing.Point(383, 144); + this.btn_sourceFile.Location = new System.Drawing.Point(504, 164); this.btn_sourceFile.Name = "btn_sourceFile"; this.btn_sourceFile.Size = new System.Drawing.Size(50, 30); this.btn_sourceFile.TabIndex = 71; @@ -215,7 +215,7 @@ // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label9.Location = new System.Drawing.Point(451, 183); + this.label9.Location = new System.Drawing.Point(563, 205); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(106, 20); this.label9.TabIndex = 70; @@ -225,7 +225,7 @@ // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label8.Location = new System.Drawing.Point(451, 147); + this.label8.Location = new System.Drawing.Point(563, 169); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(58, 20); this.label8.TabIndex = 69; @@ -235,7 +235,7 @@ // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label7.Location = new System.Drawing.Point(451, 109); + this.label7.Location = new System.Drawing.Point(563, 122); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(76, 20); this.label7.TabIndex = 68; @@ -245,7 +245,7 @@ // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label6.Location = new System.Drawing.Point(451, 67); + this.label6.Location = new System.Drawing.Point(560, 75); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(166, 20); this.label6.TabIndex = 67; @@ -257,17 +257,17 @@ this.rddl_Status.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_Status.DropDownHeight = 50; this.rddl_Status.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_Status.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_Status.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_Status.ForeColor = System.Drawing.Color.White; - radListDataItem1.Tag = "start"; - radListDataItem1.Text = "启动"; - radListDataItem2.Tag = "stop"; - radListDataItem2.Text = "暂停"; - this.rddl_Status.Items.Add(radListDataItem1); - this.rddl_Status.Items.Add(radListDataItem2); - this.rddl_Status.Location = new System.Drawing.Point(194, 305); + radListDataItem4.Tag = "start"; + radListDataItem4.Text = "启动"; + radListDataItem5.Tag = "stop"; + radListDataItem5.Text = "暂停"; + this.rddl_Status.Items.Add(radListDataItem4); + this.rddl_Status.Items.Add(radListDataItem5); + this.rddl_Status.Location = new System.Drawing.Point(170, 352); this.rddl_Status.Name = "rddl_Status"; - this.rddl_Status.Size = new System.Drawing.Size(239, 23); + this.rddl_Status.Size = new System.Drawing.Size(384, 25); this.rddl_Status.TabIndex = 66; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_Status.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_Status.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -280,7 +280,7 @@ this.radLabel6.AutoSize = false; this.radLabel6.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel6.ForeColor = System.Drawing.Color.White; - this.radLabel6.Location = new System.Drawing.Point(40, 304); + this.radLabel6.Location = new System.Drawing.Point(17, 352); this.radLabel6.Name = "radLabel6"; this.radLabel6.Size = new System.Drawing.Size(147, 23); this.radLabel6.TabIndex = 65; @@ -293,17 +293,17 @@ this.rddl_Position.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_Position.DropDownHeight = 50; this.rddl_Position.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_Position.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_Position.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_Position.ForeColor = System.Drawing.Color.White; - radListDataItem3.Tag = "L"; - radListDataItem3.Text = "左侧"; - radListDataItem4.Tag = "R"; - radListDataItem4.Text = "右侧"; - this.rddl_Position.Items.Add(radListDataItem3); - this.rddl_Position.Items.Add(radListDataItem4); - this.rddl_Position.Location = new System.Drawing.Point(194, 265); + radListDataItem6.Tag = "L"; + radListDataItem6.Text = "左侧"; + radListDataItem7.Tag = "R"; + radListDataItem7.Text = "右侧"; + this.rddl_Position.Items.Add(radListDataItem6); + this.rddl_Position.Items.Add(radListDataItem7); + this.rddl_Position.Location = new System.Drawing.Point(170, 305); this.rddl_Position.Name = "rddl_Position"; - this.rddl_Position.Size = new System.Drawing.Size(239, 23); + this.rddl_Position.Size = new System.Drawing.Size(384, 25); this.rddl_Position.TabIndex = 64; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_Position.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_Position.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -316,7 +316,7 @@ this.radLabel1.AutoSize = false; this.radLabel1.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel1.ForeColor = System.Drawing.Color.White; - this.radLabel1.Location = new System.Drawing.Point(40, 265); + this.radLabel1.Location = new System.Drawing.Point(17, 305); this.radLabel1.Name = "radLabel1"; this.radLabel1.Size = new System.Drawing.Size(147, 23); this.radLabel1.TabIndex = 63; @@ -329,14 +329,14 @@ this.rddl_ReadType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_ReadType.DropDownHeight = 50; this.rddl_ReadType.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_ReadType.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_ReadType.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_ReadType.ForeColor = System.Drawing.Color.White; - radListDataItem5.Tag = "2"; - radListDataItem5.Text = "文件内容"; - this.rddl_ReadType.Items.Add(radListDataItem5); - this.rddl_ReadType.Location = new System.Drawing.Point(194, 221); + radListDataItem1.Tag = "2"; + radListDataItem1.Text = "文件内容"; + this.rddl_ReadType.Items.Add(radListDataItem1); + this.rddl_ReadType.Location = new System.Drawing.Point(170, 258); this.rddl_ReadType.Name = "rddl_ReadType"; - this.rddl_ReadType.Size = new System.Drawing.Size(239, 23); + this.rddl_ReadType.Size = new System.Drawing.Size(384, 25); this.rddl_ReadType.TabIndex = 62; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_ReadType.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_ReadType.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -348,38 +348,40 @@ // this.rtb_sourceFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtb_sourceFilePath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtb_sourceFilePath.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtb_sourceFilePath.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtb_sourceFilePath.ForeColor = System.Drawing.Color.White; - this.rtb_sourceFilePath.Location = new System.Drawing.Point(194, 147); + this.rtb_sourceFilePath.Location = new System.Drawing.Point(170, 164); this.rtb_sourceFilePath.Name = "rtb_sourceFilePath"; - this.rtb_sourceFilePath.Size = new System.Drawing.Size(173, 23); + this.rtb_sourceFilePath.Size = new System.Drawing.Size(317, 25); this.rtb_sourceFilePath.TabIndex = 55; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_sourceFilePath.GetChildAt(0))).Text = ""; + ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_sourceFilePath.GetChildAt(0))).StretchVertically = false; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtb_sourceFilePath.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); // // rtb_targetFilePath // this.rtb_targetFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtb_targetFilePath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtb_targetFilePath.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtb_targetFilePath.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtb_targetFilePath.ForeColor = System.Drawing.Color.White; - this.rtb_targetFilePath.Location = new System.Drawing.Point(194, 184); + this.rtb_targetFilePath.Location = new System.Drawing.Point(170, 211); this.rtb_targetFilePath.MaxLength = 15; this.rtb_targetFilePath.Name = "rtb_targetFilePath"; - this.rtb_targetFilePath.Size = new System.Drawing.Size(173, 23); + this.rtb_targetFilePath.Size = new System.Drawing.Size(317, 25); this.rtb_targetFilePath.TabIndex = 56; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_targetFilePath.GetChildAt(0))).Text = ""; + ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_targetFilePath.GetChildAt(0))).StretchVertically = false; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtb_targetFilePath.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); // // rtbCarType // this.rtbCarType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtbCarType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtbCarType.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtbCarType.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtbCarType.ForeColor = System.Drawing.Color.White; - this.rtbCarType.Location = new System.Drawing.Point(194, 108); + this.rtbCarType.Location = new System.Drawing.Point(170, 117); this.rtbCarType.Name = "rtbCarType"; - this.rtbCarType.Size = new System.Drawing.Size(239, 23); + this.rtbCarType.Size = new System.Drawing.Size(384, 25); this.rtbCarType.TabIndex = 54; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtbCarType.GetChildAt(0))).Text = ""; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtbCarType.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -388,11 +390,11 @@ // this.rtbCarName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtbCarName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtbCarName.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtbCarName.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtbCarName.ForeColor = System.Drawing.Color.White; - this.rtbCarName.Location = new System.Drawing.Point(194, 67); + this.rtbCarName.Location = new System.Drawing.Point(170, 70); this.rtbCarName.Name = "rtbCarName"; - this.rtbCarName.Size = new System.Drawing.Size(239, 23); + this.rtbCarName.Size = new System.Drawing.Size(384, 25); this.rtbCarName.TabIndex = 53; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtbCarName.GetChildAt(0))).Text = ""; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtbCarName.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -402,7 +404,7 @@ this.radLabel7.AutoSize = false; this.radLabel7.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel7.ForeColor = System.Drawing.Color.White; - this.radLabel7.Location = new System.Drawing.Point(35, 187); + this.radLabel7.Location = new System.Drawing.Point(12, 211); this.radLabel7.Name = "radLabel7"; this.radLabel7.Size = new System.Drawing.Size(152, 23); this.radLabel7.TabIndex = 61; @@ -414,7 +416,7 @@ this.radLabel3.AutoSize = false; this.radLabel3.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel3.ForeColor = System.Drawing.Color.White; - this.radLabel3.Location = new System.Drawing.Point(40, 148); + this.radLabel3.Location = new System.Drawing.Point(17, 164); this.radLabel3.Name = "radLabel3"; this.radLabel3.Size = new System.Drawing.Size(147, 23); this.radLabel3.TabIndex = 60; @@ -426,7 +428,7 @@ this.radLabel4.AutoSize = false; this.radLabel4.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel4.ForeColor = System.Drawing.Color.White; - this.radLabel4.Location = new System.Drawing.Point(40, 226); + this.radLabel4.Location = new System.Drawing.Point(17, 258); this.radLabel4.Name = "radLabel4"; this.radLabel4.Size = new System.Drawing.Size(147, 23); this.radLabel4.TabIndex = 59; @@ -438,7 +440,7 @@ this.radLabel2.AutoSize = false; this.radLabel2.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel2.ForeColor = System.Drawing.Color.White; - this.radLabel2.Location = new System.Drawing.Point(40, 109); + this.radLabel2.Location = new System.Drawing.Point(17, 117); this.radLabel2.Name = "radLabel2"; this.radLabel2.Size = new System.Drawing.Size(147, 23); this.radLabel2.TabIndex = 58; @@ -450,7 +452,7 @@ this.radLabel5.AutoSize = false; this.radLabel5.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel5.ForeColor = System.Drawing.Color.White; - this.radLabel5.Location = new System.Drawing.Point(40, 70); + this.radLabel5.Location = new System.Drawing.Point(17, 70); this.radLabel5.Name = "radLabel5"; this.radLabel5.Size = new System.Drawing.Size(147, 23); this.radLabel5.TabIndex = 57; @@ -465,7 +467,7 @@ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(109)))), ((int)(((byte)(124))))); this.BorderWidth = 0; - this.ClientSize = new System.Drawing.Size(633, 426); + this.ClientSize = new System.Drawing.Size(741, 556); this.Controls.Add(this.btn_targetFile); this.Controls.Add(this.btn_sourceFile); this.Controls.Add(this.label9); diff --git a/Analysis/Tolerance/FEditTolerance.cs b/Analysis/Tolerance/FEditTolerance.cs index 3f74a49..e13ee3c 100644 --- a/Analysis/Tolerance/FEditTolerance.cs +++ b/Analysis/Tolerance/FEditTolerance.cs @@ -1,4 +1,5 @@ using DAL; +using NSAnalysis.Model; using System; using System.Drawing; using System.Windows.Forms; @@ -32,95 +33,141 @@ namespace NSAnalysis #endregion 鼠标事件 - - public FEditTolerance(FToleranceSetup fts) { InitializeComponent(); - + gFTS = fts; } private void FEditTolerance_Load(object sender, EventArgs e) { - - rtbCarName.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["modelsName"].Value.ToString(); + rtbCarName.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["modelsName"].Value.ToString(); rtbCarType.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["modelsCode"].Value.ToString(); rtb_sourceFilePath.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["sourceFile"].Value.ToString(); rtb_targetFilePath.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["targetFile"].Value.ToString(); - rddl_ReadType.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["readType"].Value.ToString(); - rddl_Position.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["position"].Value.ToString(); - rddl_Status.Text = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["status"].Value.ToString(); + string strReadTyple = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["readType"].Value.ToString(); + + if (strReadTyple.Equals("1")) + { + rddl_ReadType.Text = "文件内容"; + } + else + { + rddl_ReadType.SelectedIndex = -1; // 未匹配到,设置为无选中项 + } + + string strPosition = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["position"].Value.ToString(); + + if (strPosition.Equals("L")) + { + rddl_Position.Text = "左侧"; + } + else if (strPosition.Equals("R")) + { + rddl_Position.Text = "右侧"; + } + else + { + rddl_Position.SelectedIndex = -1; // 未匹配到,设置为无选中项 + } + string strStatus = gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["status"].Value.ToString(); + + if (strStatus.Equals("start")) + { + rddl_Status.Text = "启动"; + } + else if (strStatus.Equals("stop")) + { + rddl_Status.Text = "停止"; + } + else + { + rddl_Status.SelectedIndex = -1; // 未匹配到,设置为无选中项 + } } private void rbtnOK_Click(object sender, EventArgs e) { #region 防愚操作 + string strCarName = rtbCarName.Text.Trim(); string strCarType = rtbCarType.Text.Trim(); - //string strMesPointName = rtbMesPointName.Text.Trim(); + string strReadType = rddl_ReadType.Text.Trim(); + string strPosition = rddl_Position.Text.Trim(); + string strStatus = rddl_Status.Text.Trim(); - //string strDimensionName = rddlDimensionName.Text.Trim(); - //if (string.IsNullOrEmpty(rtbCarType.Text.Trim())) - //{ - // MessageBox.Show("车身类型不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - // return; - //} + if (string.IsNullOrEmpty(rtbCarName.Text.Trim())) + { + MessageBox.Show("车型名称不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } - //if (string.IsNullOrEmpty(rtbMesPointName.Text.Trim())) - //{ - // MessageBox.Show("测量点位名称不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - // return; - //} - //if (string.IsNullOrEmpty(rtbLower.Text.Trim())) - //{ - // MessageBox.Show("下限值不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - // return; - //} - //if (string.IsNullOrEmpty(rtbUpper.Text.Trim())) - //{ - // MessageBox.Show("上限值不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - // return; - //} - - //if (rtbCarType.Text != gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["CarType"].Value.ToString() || rtbMesPointName.Text != gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["MeasurePointName"].Value.ToString() || rddlDimensionName.Text != gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["DimensionName"].Value.ToString()) - //{ - // if (tmdal.CheckTaskExit(strCarType, strMesPointName, strDimensionName)) - // { - // MessageBox.Show("该车身类型下,已经存在该测量点位名称和尺寸名称,请修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + if (string.IsNullOrEmpty(rtbCarType.Text.Trim())) + { + MessageBox.Show("车型代码不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + if (string.IsNullOrEmpty(rtb_sourceFilePath.Text.Trim())) + { + MessageBox.Show("源文件路径不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + if (string.IsNullOrEmpty(rtb_targetFilePath.Text.Trim())) + { + MessageBox.Show("目标文件路径不能为空,请重新输入! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } - // return; - // } - //} + // 对于分发配置,strReadType 进行转换 ,文件内容 对应1 文件名称对应2 + if (string.IsNullOrEmpty(strReadType) || (strReadType != "文件内容" && strReadType != "文件名称")) + { + MessageBox.Show("请选择正确的读取类型! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + if (strReadType.Equals("文件名称")) + { + strReadType = "1"; // 文件名称 + } + else if (strReadType.Equals("文件内容")) + { + strReadType = "2"; // 文件内容 + } #endregion 防愚操作 - //try - //{ - // TToleranceModel ttm = new TToleranceModel(); - // ttm.Id = int.Parse(gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["Id"].Value.ToString()); - // ttm.CarType = strCarType; - // ttm.MeasurePointName = strMesPointName; - // ttm.DimensionName = strDimensionName; - // ttm.TolLower = double.Parse(rtbLower.Text.Trim()); - // ttm.TolUpper = double.Parse(rtbUpper.Text.Trim()); - // //ttm.Remark = rtbRemark.Text.Trim(); - // ttm.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - // tmdal.UpdateTTolerance(ttm); - //} - //catch (Exception ex) - //{ - // MessageBox.Show("修改公差带信息失败,原因:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + try + { + CjlrTaskReleaseModel cjlrTaskRelease = new CjlrTaskReleaseModel + { + Id = int.Parse(gFTS.dgvTolList.Rows[gFTS.idgvSelectRowNumber].Cells["Id"].Value.ToString()), + ModelsName = strCarName, + ModelsCode = strCarType, + Position = strPosition.Equals("左侧") ? "L" : "R", + SourceFile = rtb_sourceFilePath.Text.Trim(), + TargetFile = rtb_targetFilePath.Text.Trim(), + Status = strStatus.Equals("启动") ? "start" : "stop", + CreateDate = DateTime.Now, + IsDelete = 1, //未删除 + ReadType = strReadType.Equals("文件内容") ? 2 : 1 // 文件内容对应1,文件名称对应2 + }; - // return; - //} + tmdal.UpdateTaskRelease(cjlrTaskRelease); + } + catch (Exception ex) + { + MessageBox.Show("修改分发配置失败,原因:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - //MessageBox.Show("修改公差带信息成功! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } - //gFTS.rtbnSearch_Click(null, null); + MessageBox.Show("修改分发配置成功! ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - //this.Close(); + gFTS.rtbnSearch_Click(null, null); + + this.Close(); } private void rbtnCancel_Click(object sender, EventArgs e) diff --git a/Analysis/Tolerance/FEditTolerance.designer.cs b/Analysis/Tolerance/FEditTolerance.designer.cs index a28c4d4..e4e2e0f 100644 --- a/Analysis/Tolerance/FEditTolerance.designer.cs +++ b/Analysis/Tolerance/FEditTolerance.designer.cs @@ -97,7 +97,7 @@ // this.radTitleBar1.RootElement.ApplyShapeToControl = true; this.radTitleBar1.RootElement.BorderHighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(109)))), ((int)(((byte)(124))))); - this.radTitleBar1.Size = new System.Drawing.Size(631, 40); + this.radTitleBar1.Size = new System.Drawing.Size(739, 40); this.radTitleBar1.TabIndex = 0; this.radTitleBar1.TabStop = false; this.radTitleBar1.Text = "修改公差带"; @@ -122,7 +122,7 @@ this.label2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label2.AutoSize = true; this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image"))); - this.label2.Location = new System.Drawing.Point(244, -5); + this.label2.Location = new System.Drawing.Point(298, -5); this.label2.Name = "label2"; this.label2.Padding = new System.Windows.Forms.Padding(23, 15, 23, 15); this.label2.Size = new System.Drawing.Size(46, 52); @@ -134,7 +134,7 @@ this.labTitle.AutoSize = true; this.labTitle.Font = new System.Drawing.Font("微软雅黑", 14F); this.labTitle.ForeColor = System.Drawing.Color.White; - this.labTitle.Location = new System.Drawing.Point(286, 8); + this.labTitle.Location = new System.Drawing.Point(340, 8); this.labTitle.Name = "labTitle"; this.labTitle.Size = new System.Drawing.Size(88, 25); this.labTitle.TabIndex = 0; @@ -146,7 +146,7 @@ this.rbtnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.rbtnCancel.Font = new System.Drawing.Font("微软雅黑", 11F); this.rbtnCancel.ForeColor = System.Drawing.Color.White; - this.rbtnCancel.Location = new System.Drawing.Point(501, 373); + this.rbtnCancel.Location = new System.Drawing.Point(612, 488); this.rbtnCancel.Name = "rbtnCancel"; this.rbtnCancel.Size = new System.Drawing.Size(85, 30); this.rbtnCancel.TabIndex = 10; @@ -164,7 +164,7 @@ this.rbtnOK.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.rbtnOK.Font = new System.Drawing.Font("微软雅黑", 11F); this.rbtnOK.ForeColor = System.Drawing.Color.White; - this.rbtnOK.Location = new System.Drawing.Point(373, 373); + this.rbtnOK.Location = new System.Drawing.Point(484, 488); this.rbtnOK.Name = "rbtnOK"; this.rbtnOK.Size = new System.Drawing.Size(85, 30); this.rbtnOK.TabIndex = 9; @@ -185,7 +185,7 @@ this.btn_targetFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.btn_targetFile.Font = new System.Drawing.Font("微软雅黑", 11F); this.btn_targetFile.ForeColor = System.Drawing.Color.White; - this.btn_targetFile.Location = new System.Drawing.Point(376, 193); + this.btn_targetFile.Location = new System.Drawing.Point(519, 218); this.btn_targetFile.Name = "btn_targetFile"; this.btn_targetFile.Size = new System.Drawing.Size(50, 30); this.btn_targetFile.TabIndex = 92; @@ -200,7 +200,7 @@ this.btn_sourceFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.btn_sourceFile.Font = new System.Drawing.Font("微软雅黑", 11F); this.btn_sourceFile.ForeColor = System.Drawing.Color.White; - this.btn_sourceFile.Location = new System.Drawing.Point(376, 153); + this.btn_sourceFile.Location = new System.Drawing.Point(519, 178); this.btn_sourceFile.Name = "btn_sourceFile"; this.btn_sourceFile.Size = new System.Drawing.Size(50, 30); this.btn_sourceFile.TabIndex = 91; @@ -213,7 +213,7 @@ // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label9.Location = new System.Drawing.Point(444, 192); + this.label9.Location = new System.Drawing.Point(578, 219); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(106, 20); this.label9.TabIndex = 90; @@ -223,7 +223,7 @@ // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label8.Location = new System.Drawing.Point(444, 156); + this.label8.Location = new System.Drawing.Point(578, 183); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(58, 20); this.label8.TabIndex = 89; @@ -233,7 +233,7 @@ // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label7.Location = new System.Drawing.Point(444, 118); + this.label7.Location = new System.Drawing.Point(578, 136); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(76, 20); this.label7.TabIndex = 88; @@ -243,7 +243,7 @@ // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label6.Location = new System.Drawing.Point(444, 76); + this.label6.Location = new System.Drawing.Point(575, 89); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(166, 20); this.label6.TabIndex = 87; @@ -255,7 +255,7 @@ this.rddl_Status.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_Status.DropDownHeight = 50; this.rddl_Status.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_Status.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_Status.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_Status.ForeColor = System.Drawing.Color.White; radListDataItem1.Tag = "start"; radListDataItem1.Text = "启动"; @@ -263,9 +263,9 @@ radListDataItem2.Text = "暂停"; this.rddl_Status.Items.Add(radListDataItem1); this.rddl_Status.Items.Add(radListDataItem2); - this.rddl_Status.Location = new System.Drawing.Point(187, 314); + this.rddl_Status.Location = new System.Drawing.Point(185, 366); this.rddl_Status.Name = "rddl_Status"; - this.rddl_Status.Size = new System.Drawing.Size(239, 23); + this.rddl_Status.Size = new System.Drawing.Size(384, 25); this.rddl_Status.TabIndex = 86; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_Status.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_Status.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -278,7 +278,7 @@ this.radLabel6.AutoSize = false; this.radLabel6.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel6.ForeColor = System.Drawing.Color.White; - this.radLabel6.Location = new System.Drawing.Point(33, 313); + this.radLabel6.Location = new System.Drawing.Point(32, 366); this.radLabel6.Name = "radLabel6"; this.radLabel6.Size = new System.Drawing.Size(147, 23); this.radLabel6.TabIndex = 85; @@ -291,7 +291,7 @@ this.rddl_Position.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_Position.DropDownHeight = 50; this.rddl_Position.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_Position.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_Position.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_Position.ForeColor = System.Drawing.Color.White; radListDataItem3.Tag = "L"; radListDataItem3.Text = "左侧"; @@ -299,9 +299,9 @@ radListDataItem4.Text = "右侧"; this.rddl_Position.Items.Add(radListDataItem3); this.rddl_Position.Items.Add(radListDataItem4); - this.rddl_Position.Location = new System.Drawing.Point(187, 274); + this.rddl_Position.Location = new System.Drawing.Point(185, 319); this.rddl_Position.Name = "rddl_Position"; - this.rddl_Position.Size = new System.Drawing.Size(239, 23); + this.rddl_Position.Size = new System.Drawing.Size(384, 25); this.rddl_Position.TabIndex = 84; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_Position.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_Position.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -314,7 +314,7 @@ this.radLabel1.AutoSize = false; this.radLabel1.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel1.ForeColor = System.Drawing.Color.White; - this.radLabel1.Location = new System.Drawing.Point(33, 274); + this.radLabel1.Location = new System.Drawing.Point(32, 319); this.radLabel1.Name = "radLabel1"; this.radLabel1.Size = new System.Drawing.Size(147, 23); this.radLabel1.TabIndex = 83; @@ -327,14 +327,14 @@ this.rddl_ReadType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); this.rddl_ReadType.DropDownHeight = 50; this.rddl_ReadType.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; - this.rddl_ReadType.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rddl_ReadType.Font = new System.Drawing.Font("微软雅黑", 11F); this.rddl_ReadType.ForeColor = System.Drawing.Color.White; radListDataItem5.Tag = "2"; radListDataItem5.Text = "文件内容"; this.rddl_ReadType.Items.Add(radListDataItem5); - this.rddl_ReadType.Location = new System.Drawing.Point(187, 230); + this.rddl_ReadType.Location = new System.Drawing.Point(185, 272); this.rddl_ReadType.Name = "rddl_ReadType"; - this.rddl_ReadType.Size = new System.Drawing.Size(239, 23); + this.rddl_ReadType.Size = new System.Drawing.Size(384, 25); this.rddl_ReadType.TabIndex = 82; ((Telerik.WinControls.UI.RadDropDownListElement)(this.rddl_ReadType.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rddl_ReadType.GetChildAt(0).GetChildAt(0))).InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -346,38 +346,40 @@ // this.rtb_sourceFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtb_sourceFilePath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtb_sourceFilePath.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtb_sourceFilePath.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtb_sourceFilePath.ForeColor = System.Drawing.Color.White; - this.rtb_sourceFilePath.Location = new System.Drawing.Point(187, 156); + this.rtb_sourceFilePath.Location = new System.Drawing.Point(185, 178); this.rtb_sourceFilePath.Name = "rtb_sourceFilePath"; - this.rtb_sourceFilePath.Size = new System.Drawing.Size(173, 23); + this.rtb_sourceFilePath.Size = new System.Drawing.Size(317, 25); this.rtb_sourceFilePath.TabIndex = 75; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_sourceFilePath.GetChildAt(0))).Text = ""; + ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_sourceFilePath.GetChildAt(0))).StretchVertically = false; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtb_sourceFilePath.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); // // rtb_targetFilePath // this.rtb_targetFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtb_targetFilePath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtb_targetFilePath.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtb_targetFilePath.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtb_targetFilePath.ForeColor = System.Drawing.Color.White; - this.rtb_targetFilePath.Location = new System.Drawing.Point(187, 193); + this.rtb_targetFilePath.Location = new System.Drawing.Point(185, 225); this.rtb_targetFilePath.MaxLength = 15; this.rtb_targetFilePath.Name = "rtb_targetFilePath"; - this.rtb_targetFilePath.Size = new System.Drawing.Size(173, 23); + this.rtb_targetFilePath.Size = new System.Drawing.Size(317, 25); this.rtb_targetFilePath.TabIndex = 76; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_targetFilePath.GetChildAt(0))).Text = ""; + ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtb_targetFilePath.GetChildAt(0))).StretchVertically = false; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtb_targetFilePath.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); // // rtbCarType // this.rtbCarType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtbCarType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtbCarType.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtbCarType.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtbCarType.ForeColor = System.Drawing.Color.White; - this.rtbCarType.Location = new System.Drawing.Point(187, 117); + this.rtbCarType.Location = new System.Drawing.Point(185, 131); this.rtbCarType.Name = "rtbCarType"; - this.rtbCarType.Size = new System.Drawing.Size(239, 23); + this.rtbCarType.Size = new System.Drawing.Size(384, 25); this.rtbCarType.TabIndex = 74; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtbCarType.GetChildAt(0))).Text = ""; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtbCarType.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -386,11 +388,11 @@ // this.rtbCarName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rtbCarName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.rtbCarName.Font = new System.Drawing.Font("微软雅黑", 9.75F); + this.rtbCarName.Font = new System.Drawing.Font("微软雅黑", 11F); this.rtbCarName.ForeColor = System.Drawing.Color.White; - this.rtbCarName.Location = new System.Drawing.Point(187, 76); + this.rtbCarName.Location = new System.Drawing.Point(185, 84); this.rtbCarName.Name = "rtbCarName"; - this.rtbCarName.Size = new System.Drawing.Size(239, 23); + this.rtbCarName.Size = new System.Drawing.Size(384, 25); this.rtbCarName.TabIndex = 73; ((Telerik.WinControls.UI.RadTextBoxElement)(this.rtbCarName.GetChildAt(0))).Text = ""; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.rtbCarName.GetChildAt(0).GetChildAt(2))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); @@ -400,7 +402,7 @@ this.radLabel7.AutoSize = false; this.radLabel7.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel7.ForeColor = System.Drawing.Color.White; - this.radLabel7.Location = new System.Drawing.Point(28, 196); + this.radLabel7.Location = new System.Drawing.Point(27, 225); this.radLabel7.Name = "radLabel7"; this.radLabel7.Size = new System.Drawing.Size(152, 23); this.radLabel7.TabIndex = 81; @@ -412,7 +414,7 @@ this.radLabel3.AutoSize = false; this.radLabel3.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel3.ForeColor = System.Drawing.Color.White; - this.radLabel3.Location = new System.Drawing.Point(33, 157); + this.radLabel3.Location = new System.Drawing.Point(32, 178); this.radLabel3.Name = "radLabel3"; this.radLabel3.Size = new System.Drawing.Size(147, 23); this.radLabel3.TabIndex = 80; @@ -424,7 +426,7 @@ this.radLabel4.AutoSize = false; this.radLabel4.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel4.ForeColor = System.Drawing.Color.White; - this.radLabel4.Location = new System.Drawing.Point(33, 235); + this.radLabel4.Location = new System.Drawing.Point(32, 272); this.radLabel4.Name = "radLabel4"; this.radLabel4.Size = new System.Drawing.Size(147, 23); this.radLabel4.TabIndex = 79; @@ -436,7 +438,7 @@ this.radLabel2.AutoSize = false; this.radLabel2.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel2.ForeColor = System.Drawing.Color.White; - this.radLabel2.Location = new System.Drawing.Point(33, 118); + this.radLabel2.Location = new System.Drawing.Point(32, 131); this.radLabel2.Name = "radLabel2"; this.radLabel2.Size = new System.Drawing.Size(147, 23); this.radLabel2.TabIndex = 78; @@ -448,7 +450,7 @@ this.radLabel5.AutoSize = false; this.radLabel5.Font = new System.Drawing.Font("微软雅黑", 11F); this.radLabel5.ForeColor = System.Drawing.Color.White; - this.radLabel5.Location = new System.Drawing.Point(33, 79); + this.radLabel5.Location = new System.Drawing.Point(32, 84); this.radLabel5.Name = "radLabel5"; this.radLabel5.Size = new System.Drawing.Size(147, 23); this.radLabel5.TabIndex = 77; @@ -463,7 +465,7 @@ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); this.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(109)))), ((int)(((byte)(124))))); this.BorderWidth = 0; - this.ClientSize = new System.Drawing.Size(633, 426); + this.ClientSize = new System.Drawing.Size(741, 556); this.Controls.Add(this.btn_targetFile); this.Controls.Add(this.btn_sourceFile); this.Controls.Add(this.label9); diff --git a/Analysis/Tolerance/FToleranceSetup.cs b/Analysis/Tolerance/FToleranceSetup.cs index ad94b8d..2dcc696 100644 --- a/Analysis/Tolerance/FToleranceSetup.cs +++ b/Analysis/Tolerance/FToleranceSetup.cs @@ -142,7 +142,7 @@ namespace NSAnalysis { string modelName = dgvTolList.Rows[e.RowIndex].Cells["modelsName"].Value.ToString(); string modelsCode = dgvTolList.Rows[e.RowIndex].Cells["modelsCode"].Value.ToString(); - + if (string.IsNullOrEmpty(modelsCode) || string.IsNullOrEmpty(modelName)) { MessageBox.Show("分发配置代码或名称不能为空,无法删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -150,7 +150,7 @@ namespace NSAnalysis } try { - tmdal.UpdateIsDelete(modelName,modelsCode); + tmdal.UpdateIsDelete(modelName, modelsCode); } catch (Exception ex) { @@ -172,6 +172,7 @@ namespace NSAnalysis private void dgvTolList_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { + // 系统状态 if (dgvTolList.Columns .Cast() .Any(c => c.DataPropertyName == "status" && c.Index == e.ColumnIndex)) @@ -179,11 +180,19 @@ namespace NSAnalysis { switch (e.Value.ToString()) { - case "start": e.Value = "启动"; break; - case "stop": e.Value = "停止"; break; + case "start": + e.Value = "启动"; + //dgvTolList.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White; // 默认背景色 + break; + + case "stop": + dgvTolList.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Red; + e.Value = "停止"; + break; } } + //读取方式 if (dgvTolList.Columns .Cast() .Any(c => c.DataPropertyName == "readType" && c.Index == e.ColumnIndex)) @@ -194,6 +203,18 @@ namespace NSAnalysis case "2": e.Value = "文件内容"; break; } } + + // 位置 + if (dgvTolList.Columns + .Cast() + .Any(c => c.DataPropertyName == "position" && c.Index == e.ColumnIndex)) + { + switch (e.Value.ToString()) + { + case "L": e.Value = "左侧"; break; + case "R": e.Value = "右侧"; break; + } + } } } } \ No newline at end of file diff --git a/Analysis/Tolerance/FToleranceSetup.designer.cs b/Analysis/Tolerance/FToleranceSetup.designer.cs index 09e5ded..781d114 100644 --- a/Analysis/Tolerance/FToleranceSetup.designer.cs +++ b/Analysis/Tolerance/FToleranceSetup.designer.cs @@ -48,12 +48,12 @@ namespace NSAnalysis this.label15 = new System.Windows.Forms.Label(); this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn(); - this.lpcAddTol = new UserControlClass.LabPictureControl(); this.labSearchResult = new System.Windows.Forms.Label(); + this.lpcAddTol = new UserControlClass.LabPictureControl(); this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.modelsName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.modelsCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.DimensionName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.position = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sourceFile = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.targetFile = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Status = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -155,7 +155,7 @@ namespace NSAnalysis this.Id, this.modelsName, this.modelsCode, - this.DimensionName, + this.position, this.sourceFile, this.targetFile, this.Status, @@ -353,6 +353,20 @@ namespace NSAnalysis this.dataGridViewImageColumn2.ToolTipText = "点击删除机床信息"; this.dataGridViewImageColumn2.Width = 45; // + // labSearchResult + // + this.labSearchResult.Anchor = System.Windows.Forms.AnchorStyles.None; + this.labSearchResult.AutoSize = true; + this.labSearchResult.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); + this.labSearchResult.Font = new System.Drawing.Font("Segoe UI", 12F); + this.labSearchResult.ForeColor = System.Drawing.Color.Red; + this.labSearchResult.Location = new System.Drawing.Point(331, 465); + this.labSearchResult.Name = "labSearchResult"; + this.labSearchResult.Size = new System.Drawing.Size(452, 21); + this.labSearchResult.TabIndex = 457; + this.labSearchResult.Text = "查询完毕,未查询到任何结果,请检查查询条件是否正确!"; + this.labSearchResult.Visible = false; + // // lpcAddTol // this.lpcAddTol.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); @@ -368,20 +382,6 @@ namespace NSAnalysis this.lpcAddTol.TabIndex = 18; this.lpcAddTol.Click += new System.EventHandler(this.lpcAddTol_Click); // - // labSearchResult - // - this.labSearchResult.Anchor = System.Windows.Forms.AnchorStyles.None; - this.labSearchResult.AutoSize = true; - this.labSearchResult.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(60)))), ((int)(((byte)(68))))); - this.labSearchResult.Font = new System.Drawing.Font("Segoe UI", 12F); - this.labSearchResult.ForeColor = System.Drawing.Color.Red; - this.labSearchResult.Location = new System.Drawing.Point(331, 465); - this.labSearchResult.Name = "labSearchResult"; - this.labSearchResult.Size = new System.Drawing.Size(452, 21); - this.labSearchResult.TabIndex = 457; - this.labSearchResult.Text = "查询完毕,未查询到任何结果,请检查查询条件是否正确!"; - this.labSearchResult.Visible = false; - // // Id // this.Id.DataPropertyName = "Id"; @@ -407,13 +407,13 @@ namespace NSAnalysis this.modelsCode.ReadOnly = true; this.modelsCode.Width = 65; // - // DimensionName + // position // - this.DimensionName.DataPropertyName = "position"; - this.DimensionName.HeaderText = "车型位置"; - this.DimensionName.Name = "DimensionName"; - this.DimensionName.ReadOnly = true; - this.DimensionName.Width = 65; + this.position.DataPropertyName = "position"; + this.position.HeaderText = "车型位置"; + this.position.Name = "position"; + this.position.ReadOnly = true; + this.position.Width = 65; // // sourceFile // @@ -530,7 +530,7 @@ namespace NSAnalysis private System.Windows.Forms.DataGridViewTextBoxColumn Id; private System.Windows.Forms.DataGridViewTextBoxColumn modelsName; private System.Windows.Forms.DataGridViewTextBoxColumn modelsCode; - private System.Windows.Forms.DataGridViewTextBoxColumn DimensionName; + private System.Windows.Forms.DataGridViewTextBoxColumn position; private System.Windows.Forms.DataGridViewTextBoxColumn sourceFile; private System.Windows.Forms.DataGridViewTextBoxColumn targetFile; private System.Windows.Forms.DataGridViewTextBoxColumn Status; diff --git a/Analysis/Tolerance/FToleranceSetup.resx b/Analysis/Tolerance/FToleranceSetup.resx index 52d2697..06574d5 100644 --- a/Analysis/Tolerance/FToleranceSetup.resx +++ b/Analysis/Tolerance/FToleranceSetup.resx @@ -161,7 +161,7 @@ True - + True diff --git a/Analysis/UserControl/LabPictureControl.cs b/Analysis/UserControl/LabPictureControl.cs new file mode 100644 index 0000000..fea59dd --- /dev/null +++ b/Analysis/UserControl/LabPictureControl.cs @@ -0,0 +1,77 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace UserControlClass +{ + public partial class LabPictureControl : UserControl + { + public LabPictureControl() + { + InitializeComponent(); + } + + /// + /// 添加LabelText属性,可以对labelText进行设置 + /// + public string LabelText + { + get { return labText.Text; } + set { labText.Text = value; } + } + + /// + /// 上面Label的图片图片连接 + /// + public Image LabelTopImage + { + get { return labPicture.Image; } + set { labPicture.Image = value; } + } + + /// + /// 文字位置坐标 + /// + public Point LabelPoint + { + get { return labText.Location; } + set { labText.Location = value; } + } + + private void labPicture_MouseHover(object sender, EventArgs e) + { + LabPictureControl lpc = (LabPictureControl)(sender as Label).Parent; + lpc.BackColor = Color.FromArgb(0, 151, 186); + } + + private void labPicture_MouseLeave(object sender, EventArgs e) + { + LabPictureControl lpc = (LabPictureControl)(sender as Label).Parent; + lpc.BackColor = Color.FromArgb(19, 46, 53); + } + + private void labText_MouseHover(object sender, EventArgs e) + { + LabPictureControl lpc = (LabPictureControl)(sender as Label).Parent; + lpc.BackColor = Color.FromArgb(0, 151, 186); + } + + private void labText_MouseLeave(object sender, EventArgs e) + { + LabPictureControl lpc = (LabPictureControl)(sender as Label).Parent; + lpc.BackColor = Color.FromArgb(19, 46, 53); + } + + private void LabPictureControl_MouseHover(object sender, EventArgs e) + { + LabPictureControl lpc = sender as LabPictureControl; + lpc.BackColor = Color.FromArgb(0, 151, 186); + } + + private void LabPictureControl_MouseLeave(object sender, EventArgs e) + { + LabPictureControl lpc = sender as LabPictureControl; + lpc.BackColor = Color.FromArgb(19, 46, 53); + } + } +} \ No newline at end of file diff --git a/Analysis/UserControl/LabPictureControl.designer.cs b/Analysis/UserControl/LabPictureControl.designer.cs new file mode 100644 index 0000000..9899bbd --- /dev/null +++ b/Analysis/UserControl/LabPictureControl.designer.cs @@ -0,0 +1,84 @@ +namespace UserControlClass +{ + public partial class LabPictureControl + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.labText = new System.Windows.Forms.Label(); + this.labPicture = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // labText + // + this.labText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labText.Location = new System.Drawing.Point(2, 59); + this.labText.Name = "labText"; + this.labText.Size = new System.Drawing.Size(83, 25); + this.labText.TabIndex = 1; + this.labText.Text = "添加抽屉"; + this.labText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.labText.MouseLeave += new System.EventHandler(this.labText_MouseLeave); + this.labText.MouseHover += new System.EventHandler(this.labText_MouseHover); + // + // labPicture + // + this.labPicture.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labPicture.Location = new System.Drawing.Point(0, 3); + this.labPicture.Name = "labPicture"; + this.labPicture.Padding = new System.Windows.Forms.Padding(17, 21, 17, 21); + this.labPicture.Size = new System.Drawing.Size(86, 54); + this.labPicture.TabIndex = 0; + this.labPicture.MouseLeave += new System.EventHandler(this.labPicture_MouseLeave); + this.labPicture.MouseHover += new System.EventHandler(this.labPicture_MouseHover); + // + // LabPictureControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); + this.Controls.Add(this.labText); + this.Controls.Add(this.labPicture); + this.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.ForeColor = System.Drawing.Color.White; + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "LabPictureControl"; + this.Size = new System.Drawing.Size(86, 85); + this.MouseLeave += new System.EventHandler(this.LabPictureControl_MouseLeave); + this.MouseHover += new System.EventHandler(this.LabPictureControl_MouseHover); + this.ResumeLayout(false); + + } + + #endregion + + public System.Windows.Forms.Label labPicture; + public System.Windows.Forms.Label labText; + } +} diff --git a/Analysis/UserControl/LabPictureControl.resx b/Analysis/UserControl/LabPictureControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Analysis/UserControl/LabPictureControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Analysis/bin/x64/Debug/Debug.txt b/Analysis/bin/x64/Debug/Debug.txt index 914603d..dee1ff0 100644 --- a/Analysis/bin/x64/Debug/Debug.txt +++ b/Analysis/bin/x64/Debug/Debug.txt @@ -1,12 +1,12 @@ -2025-08-04 16:45:31.230----软件Program Main函数开始执行-- -2025-08-04 16:45:31.232--加载配置文件——>开始 -2025-08-04 16:45:31.327--加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 +2025-08-05 09:09:41.596----软件Program Main函数开始执行-- +2025-08-05 09:09:41.600--加载配置文件——>开始 +2025-08-05 09:09:41.633--加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) 在 System.Double.Parse(String s) 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 -2025-08-04 16:45:32.142--数据库连接 SqlServerName:127.0.0.1 -2025-08-04 16:45:32.143--数据库连接 SqlUserName:sa -2025-08-04 16:45:32.144--数据库连接 SqlPassword:Hexagon123 -2025-08-04 16:45:32.146--数据库连接 SqlDbName:CJLR -2025-08-04 16:45:32.147--数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-05 09:09:42.414--数据库连接 SqlServerName:127.0.0.1 +2025-08-05 09:09:42.415--数据库连接 SqlUserName:sa +2025-08-05 09:09:42.417--数据库连接 SqlPassword:Hexagon123 +2025-08-05 09:09:42.419--数据库连接 SqlDbName:CJLR +2025-08-05 09:09:42.420--数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; diff --git a/Analysis/bin/x64/Debug/NSAnalysis.exe b/Analysis/bin/x64/Debug/NSAnalysis.exe index 08e335f..b1c6bf3 100644 Binary files a/Analysis/bin/x64/Debug/NSAnalysis.exe and b/Analysis/bin/x64/Debug/NSAnalysis.exe differ diff --git a/Analysis/bin/x64/Debug/NSAnalysis.pdb b/Analysis/bin/x64/Debug/NSAnalysis.pdb index b52863d..4809b9e 100644 Binary files a/Analysis/bin/x64/Debug/NSAnalysis.pdb and b/Analysis/bin/x64/Debug/NSAnalysis.pdb differ diff --git a/Analysis/bin/x64/Debug/logs/2025-08-04.log b/Analysis/bin/x64/Debug/logs/2025-08-04.log index 8ece8a8..cdcf8c5 100644 --- a/Analysis/bin/x64/Debug/logs/2025-08-04.log +++ b/Analysis/bin/x64/Debug/logs/2025-08-04.log @@ -425,3 +425,255 @@ 2025-08-04 16:45:32.1409 [INFO] : 数据库连接 SqlPassword:Hexagon123 2025-08-04 16:45:32.1409 [INFO] : 数据库连接 SqlDbName:CJLR 2025-08-04 16:45:32.1409 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 16:47:28.1667 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 16:47:28.1842 [INFO] : 加载配置文件——>开始 +2025-08-04 16:47:28.2113 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 16:47:28.9161 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 16:47:28.9161 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 16:47:28.9161 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 16:47:28.9161 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 16:47:28.9161 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 16:53:16.1495 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 16:53:16.1735 [INFO] : 加载配置文件——>开始 +2025-08-04 16:53:16.2485 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 16:53:16.9998 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 16:53:16.9998 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 16:53:16.9998 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 16:53:16.9998 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 16:53:16.9998 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 16:55:47.8714 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 16:55:47.8859 [INFO] : 加载配置文件——>开始 +2025-08-04 16:55:47.9206 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 16:55:48.6459 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 16:55:48.6459 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 16:55:48.6459 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 16:55:48.6459 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 16:55:48.6459 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 16:56:57.5588 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 16:56:57.5730 [INFO] : 加载配置文件——>开始 +2025-08-04 16:56:57.5973 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 16:56:58.2450 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 16:56:58.2450 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 16:56:58.2450 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 16:56:58.2450 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 16:56:58.2450 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 16:59:03.8846 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 16:59:03.9018 [INFO] : 加载配置文件——>开始 +2025-08-04 16:59:03.9386 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 16:59:04.6816 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 16:59:04.6816 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 16:59:04.6816 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 16:59:04.6816 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 16:59:04.6816 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:00:02.9321 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:00:02.9675 [INFO] : 加载配置文件——>开始 +2025-08-04 17:00:03.0162 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:00:03.7328 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:00:03.7328 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:00:03.7328 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:00:03.7328 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:00:03.7366 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:04:50.9107 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:04:50.9363 [INFO] : 加载配置文件——>开始 +2025-08-04 17:04:50.9684 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:04:51.6505 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:04:51.6505 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:04:51.6505 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:04:51.6505 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:04:51.6505 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:24:36.1518 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:24:36.1697 [INFO] : 加载配置文件——>开始 +2025-08-04 17:24:36.1968 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:24:36.8826 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:24:36.8826 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:24:36.8826 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:24:36.8826 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:24:36.8826 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:49:18.5121 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:49:18.5264 [INFO] : 加载配置文件——>开始 +2025-08-04 17:49:18.5581 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:49:19.4231 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:49:19.4231 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:49:19.4231 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:49:19.4231 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:49:19.4231 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:51:19.2310 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:51:19.2527 [INFO] : 加载配置文件——>开始 +2025-08-04 17:51:19.2771 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:51:19.9649 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:51:19.9649 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:51:19.9649 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:51:19.9649 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:51:19.9649 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:53:59.0296 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:53:59.0489 [INFO] : 加载配置文件——>开始 +2025-08-04 17:53:59.0766 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:53:59.7059 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:53:59.7059 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:53:59.7059 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:53:59.7059 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:53:59.7059 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:54:53.7805 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:54:53.8117 [INFO] : 加载配置文件——>开始 +2025-08-04 17:54:53.8534 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:54:54.4847 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:54:54.4847 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:54:54.4847 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:54:54.4847 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:54:54.4847 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:55:59.4864 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:55:59.5078 [INFO] : 加载配置文件——>开始 +2025-08-04 17:55:59.5324 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:56:00.1884 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:56:00.1884 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:56:00.1884 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:56:00.1884 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:56:00.1884 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:57:01.2697 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:57:01.2927 [INFO] : 加载配置文件——>开始 +2025-08-04 17:57:01.3170 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:57:01.9718 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:57:01.9718 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:57:01.9718 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:57:01.9718 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:57:01.9718 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:58:25.1631 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:58:25.1789 [INFO] : 加载配置文件——>开始 +2025-08-04 17:58:25.2065 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:58:25.8581 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:58:25.8581 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:58:25.8581 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:58:25.8581 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:58:25.8581 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 17:59:28.0409 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 17:59:28.0741 [INFO] : 加载配置文件——>开始 +2025-08-04 17:59:28.1021 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 17:59:28.7283 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 17:59:28.7283 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 17:59:28.7283 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 17:59:28.7283 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 17:59:28.7283 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 18:06:05.5512 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 18:06:05.5976 [INFO] : 加载配置文件——>开始 +2025-08-04 18:06:05.6351 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 18:06:06.3661 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 18:06:06.3661 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 18:06:06.3661 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 18:06:06.3661 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 18:06:06.3661 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 18:11:03.7728 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 18:11:03.7961 [INFO] : 加载配置文件——>开始 +2025-08-04 18:11:03.8241 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 18:11:04.5008 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 18:11:04.5008 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 18:11:04.5008 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 18:11:04.5008 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 18:11:04.5008 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 18:12:25.2850 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 18:12:25.3103 [INFO] : 加载配置文件——>开始 +2025-08-04 18:12:25.3388 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 18:12:25.9859 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 18:12:25.9859 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 18:12:25.9859 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 18:12:25.9859 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 18:12:25.9859 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 18:15:03.0002 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 18:15:03.0781 [INFO] : 加载配置文件——>开始 +2025-08-04 18:15:03.0957 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 18:15:03.7610 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 18:15:03.7620 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 18:15:03.7620 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 18:15:03.7620 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 18:15:03.7620 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123; +2025-08-04 18:15:36.1081 [INFO] : --软件Program Main函数开始执行-- +2025-08-04 18:15:36.1275 [INFO] : 加载配置文件——>开始 +2025-08-04 18:15:36.1442 [ERROR] : 加载配置文件错误:System.FormatException: 输入字符串的格式不正确。 + 在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) + 在 System.Double.Parse(String s) + 在 NSAnalysis.ConfigDfn.LoadConfig() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 138 + 在 NSAnalysis.ConfigDfn.LoadConfigFile() 位置 D:\HexagonProjects\2025-01-捷豹路虎改造\code\Analysis\Define\Define.cs:行号 202 +2025-08-04 18:15:36.7885 [INFO] : 数据库连接 SqlServerName:127.0.0.1 +2025-08-04 18:15:36.7885 [INFO] : 数据库连接 SqlUserName:sa +2025-08-04 18:15:36.7885 [INFO] : 数据库连接 SqlPassword:Hexagon123 +2025-08-04 18:15:36.7885 [INFO] : 数据库连接 SqlDbName:CJLR +2025-08-04 18:15:36.7885 [INFO] : 数据库连接字符串:Data Source=127.0.0.1;initial Catalog=CJLR;User ID=sa;password=Hexagon123;