禾欣总汇
This commit is contained in:
parent
bf64c5a2f6
commit
f50cdeeb39
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/LeatherProject/.vs
|
@ -13,6 +13,7 @@ using LeatherApp.Page;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Service;
|
using Service;
|
||||||
using LeatherApp.Utils;
|
using LeatherApp.Utils;
|
||||||
|
using HZH_Controls.Forms;
|
||||||
|
|
||||||
namespace LeatherApp
|
namespace LeatherApp
|
||||||
{
|
{
|
||||||
@ -188,6 +189,9 @@ namespace LeatherApp
|
|||||||
//HideProcessForm();//完成后关闭动画
|
//HideProcessForm();//完成后关闭动画
|
||||||
frm.TopLevel = true;
|
frm.TopLevel = true;
|
||||||
frm.UserName = szUserCode;
|
frm.UserName = szUserCode;
|
||||||
|
|
||||||
|
//查询硬盘
|
||||||
|
CheckDisk(this, 100);
|
||||||
//frm.Password = "1";
|
//frm.Password = "1";
|
||||||
frm.ShowDialog();
|
frm.ShowDialog();
|
||||||
frm.Dispose();
|
frm.Dispose();
|
||||||
@ -269,6 +273,50 @@ namespace LeatherApp
|
|||||||
this.HideProcessForm();
|
this.HideProcessForm();
|
||||||
this.Visible = true;
|
this.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 硬盘检测
|
||||||
|
public bool CheckDisk(IWin32Window owner, int max = 10)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(Config.ImagePath))
|
||||||
|
{
|
||||||
|
string path = Config.ImagePath;
|
||||||
|
string volume = path.Substring(0, path.IndexOf(':'));
|
||||||
|
long freespace = GetHardDiskSpace(volume);
|
||||||
|
if (freespace < max)
|
||||||
|
{
|
||||||
|
string tip = $"当前{volume}硬盘容量:{freespace}GB,小于{max}GB。注意清理!!";
|
||||||
|
FrmDialog.ShowDialog(owner, tip, "警告", true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//drive.TotalFreeSpace单位为bit,根据需要除以1024
|
||||||
|
//drive同时可以可以获取磁盘分区容量等
|
||||||
|
//单位GB
|
||||||
|
public long GetHardDiskSpace(string str_HardDiskName)
|
||||||
|
{
|
||||||
|
long totalSize = 0;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
str_HardDiskName = str_HardDiskName + ":\\";
|
||||||
|
System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
|
||||||
|
foreach (System.IO.DriveInfo drive in drives)
|
||||||
|
{
|
||||||
|
if (drive.Name == str_HardDiskName)
|
||||||
|
{
|
||||||
|
totalSize = drive.TotalFreeSpace / (1024 * 1024 * 1024);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
totalSize = 0;
|
||||||
|
}
|
||||||
|
return totalSize;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void FrmManager_FormClosing(object sender, FormClosingEventArgs e)
|
private void FrmManager_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
UILocalize.OK = "是";
|
UILocalize.OK = "是";
|
||||||
|
@ -5521,6 +5521,8 @@ namespace LeatherApp.Page
|
|||||||
DefectInfoList = deflist,
|
DefectInfoList = deflist,
|
||||||
UserName = model.UserName,
|
UserName = model.UserName,
|
||||||
WorkTeam = model.WorkTeam,
|
WorkTeam = model.WorkTeam,
|
||||||
|
PJXTBH = model.PJXTBH,
|
||||||
|
DefectType = model.DefectType,
|
||||||
};
|
};
|
||||||
htTask.Add(currKey, record);
|
htTask.Add(currKey, record);
|
||||||
|
|
||||||
|
@ -300,18 +300,22 @@ namespace LeatherApp.Utils
|
|||||||
//幅宽
|
//幅宽
|
||||||
double agvmf = 0;
|
double agvmf = 0;
|
||||||
double mf1 = 0, mf2 = 0, mf3 = 0;
|
double mf1 = 0, mf2 = 0, mf3 = 0;
|
||||||
if (records.FacePointList.Count > 10)
|
if (records.FacePointList != null && records.FacePointList.Count > 0)
|
||||||
mf1 = records.FacePointList[10][1];
|
{
|
||||||
else
|
if (records.FacePointList.Count > 10)
|
||||||
mf1 = records.FacePointList[0][1];
|
mf1 = records.FacePointList[10][1];
|
||||||
if (records.FacePointList.Count > 10)
|
else
|
||||||
mf3 = records.FacePointList[records.FacePointList.Count - 10][1];
|
mf1 = records.FacePointList[0][1];
|
||||||
else
|
if (records.FacePointList.Count > 10)
|
||||||
mf3 = records.FacePointList[records.FacePointList.Count - 1][1];
|
mf3 = records.FacePointList[records.FacePointList.Count - 10][1];
|
||||||
if (records.FacePointList.Count > 0)
|
else
|
||||||
mf2 = records.FacePointList[records.FacePointList.Count/2][1];
|
mf3 = records.FacePointList[records.FacePointList.Count - 1][1];
|
||||||
|
if (records.FacePointList.Count > 0)
|
||||||
|
mf2 = records.FacePointList[records.FacePointList.Count / 2][1];
|
||||||
|
|
||||||
agvmf = (mf1 + mf2 + mf3)/3;
|
agvmf = (mf1 + mf2 + mf3) / 3;
|
||||||
|
agvmf = records.FacePointList.Select(x => x[1]).ToList().Average();
|
||||||
|
}
|
||||||
//新数据插入
|
//新数据插入
|
||||||
db.Insertable(new XCLErpUploadData()
|
db.Insertable(new XCLErpUploadData()
|
||||||
{
|
{
|
||||||
@ -329,7 +333,7 @@ namespace LeatherApp.Utils
|
|||||||
MF1 = mf1,
|
MF1 = mf1,
|
||||||
MF2 = mf2,
|
MF2 = mf2,
|
||||||
MF3 = mf3,
|
MF3 = mf3,
|
||||||
AvgMF = records.FacePointList.Select(x => x[1]).ToList().Average(),
|
AvgMF = agvmf,
|
||||||
|
|
||||||
HD1= hd1,
|
HD1= hd1,
|
||||||
HD2= hd2,
|
HD2= hd2,
|
||||||
|
Loading…
Reference in New Issue
Block a user