启动 加载语言配置文件
This commit is contained in:
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<add key="GlobalPaletteMode" value="Professionaloffice2003"/>
|
<add key="GlobalPaletteMode" value="Professionaloffice2003"/>
|
||||||
<!--<add key="LanguageCode" value="Chinese"/>-->
|
<add key="LanguageCode" value="zh-CN"/>
|
||||||
<add key="LanguageCode" value="English"/>
|
<!--<add key="LanguageCode" value="English"/>-->
|
||||||
<add key="sqlmapConfigPath" value="Config/sqlmap.config"/>
|
<add key="sqlmapConfigPath" value="Config/sqlmap.config"/>
|
||||||
<!--MySql数据库连接字符串-->
|
<!--MySql数据库连接字符串-->
|
||||||
<add key="LeadMySql" value="Data Source = localhost; Port=3306;Initial Catalog = testasrs; Persist Security Info=True;User ID = root; Password=sa1234567;"/>
|
<add key="LeadMySql" value="Data Source = localhost; Port=3306;Initial Catalog = testasrs; Persist Security Info=True;User ID = root; Password=sa1234567;"/>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Krypton.Navigator" Version="60.22.2.32" />
|
<PackageReference Include="Krypton.Navigator" Version="60.22.2.32" />
|
||||||
<PackageReference Include="Krypton.Toolkit" Version="60.22.2.32" />
|
<PackageReference Include="Krypton.Toolkit" Version="60.22.2.32" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NModbus" Version="3.0.72" />
|
<PackageReference Include="NModbus" Version="3.0.72" />
|
||||||
<PackageReference Include="NModbus.Serial" Version="3.0.72" />
|
<PackageReference Include="NModbus.Serial" Version="3.0.72" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -42,10 +43,22 @@
|
|||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Settings.Designer.cs">
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="DataBase\clearMac.db">
|
<None Update="DataBase\clearMac.db">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -87,7 +87,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
|
|
||||||
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
||||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||||
@@ -117,7 +117,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的清洗方式数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的清洗方式数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -177,23 +177,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -122,7 +122,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的污染明细数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的污染明细数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -182,23 +182,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -132,7 +132,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的污染类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的污染类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -192,23 +192,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
@@ -116,7 +116,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -154,30 +154,30 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'";
|
string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'";
|
||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
|
|
||||||
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
||||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||||
@@ -112,7 +112,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的板材类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的板材类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -172,23 +172,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
|
|
||||||
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
||||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||||
@@ -117,7 +117,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的用户信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的用户信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -177,23 +177,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除用户数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
|
|
||||||
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
|
||||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||||
@@ -125,7 +125,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count > 0)
|
if (dataGridView.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的报警信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的报警信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
string WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -185,23 +185,23 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除报警数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警信息数据发生异常", "DeleteWarningMsgDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除报警信息数据发生异常", "DeleteWarningMsgDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 0";
|
string sql = $@"SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
||||||
|
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
||||||
|
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
private void frmMainDetail_Load(object sender, EventArgs e)
|
private void frmMainDetail_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
@@ -291,7 +291,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
||||||
LogHelper.WriteLog($"1111【{ex.Message}】", LogTypeEum.Err);
|
LogHelper.WriteLog($"1111【{ex.Message}】", LogTypeEum.Err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1586,19 +1586,19 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
if (string.IsNullOrEmpty(kcmb_SheetType.Text.Trim()))
|
if (string.IsNullOrEmpty(kcmb_SheetType.Text.Trim()))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入板材类型信息!!");
|
//KryptonMessageBox.Show("请输入板材类型信息!!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材类型信息!", "EnterSheetTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入板材类型信息!", "EnterSheetTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(ktb_IR.Text.Trim()))
|
if (string.IsNullOrEmpty(ktb_IR.Text.Trim()))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入IR收货编号信息!!");
|
//KryptonMessageBox.Show("请输入IR收货编号信息!!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入IR收货编号信息!", "EnterIRMsgInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入IR收货编号信息!", "EnterIRMsgInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!kdtp_RecordDate.Checked)
|
if (!kdtp_RecordDate.Checked)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择录入时间!!");
|
//KryptonMessageBox.Show("请选择录入时间!!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择录入时间!", "EnterInputTimeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择录入时间!", "EnterInputTimeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//string sqlWorkPallet = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
|
//string sqlWorkPallet = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
|
||||||
@@ -1875,7 +1875,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("保存IR数据发生异常!" + ex.Message);
|
//KryptonMessageBox.Show("保存IR数据发生异常!" + ex.Message);
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2322,7 +2322,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (ktb_IR.Enabled)
|
if (ktb_IR.Enabled)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg"));
|
KryptonMessageBox.Show(this.GetInfoText("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
LoadManualFrmData = new dlgLoadManualFrmData(GetManualPlcItemVlaue);
|
LoadManualFrmData = new dlgLoadManualFrmData(GetManualPlcItemVlaue);
|
||||||
GetManualPlcItemVlaue();
|
GetManualPlcItemVlaue();
|
||||||
GlobalHelper.OnSyncFinishPalletData += SyncFinishPalletData;
|
GlobalHelper.OnSyncFinishPalletData += SyncFinishPalletData;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
private void frmMechineCheck_Load(object sender, EventArgs e)
|
private void frmMechineCheck_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
Thread th1 = new Thread(MainDtlRunTh);
|
Thread th1 = new Thread(MainDtlRunTh);
|
||||||
th1.IsBackground = true;
|
th1.IsBackground = true;
|
||||||
th1.Start();
|
th1.Start();
|
||||||
@@ -246,7 +246,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "False", PlcItemTypeDesc.M);
|
PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "False", PlcItemTypeDesc.M);
|
||||||
//测试未通过,请检查并重新测试
|
//测试未通过,请检查并重新测试
|
||||||
GlobalHelper.CanOperate = false;
|
GlobalHelper.CanOperate = false;
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg"));
|
KryptonMessageBox.Show(this.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg"));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||||
kdtp_CreateStartTime.Checked = false;
|
kdtp_CreateStartTime.Checked = false;
|
||||||
kdtp_CreateEndTime.Checked = false;
|
kdtp_CreateEndTime.Checked = false;
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
RefreshFrmHost = new dlgRefreshFrmHost(Init);
|
RefreshFrmHost = new dlgRefreshFrmHost(Init);
|
||||||
Init();
|
Init();
|
||||||
foreach (Control item in tableLayoutPanel2.Controls)
|
foreach (Control item in tableLayoutPanel2.Controls)
|
||||||
@@ -106,7 +106,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
private void frmPlcAlarmLog_Load(object sender, EventArgs e)
|
private void frmPlcAlarmLog_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
kcmb_plcAlarmStatus.Items.Clear();
|
kcmb_plcAlarmStatus.Items.Clear();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
private void frmPlcItemConfig_Load(object sender, EventArgs e)
|
private void frmPlcItemConfig_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
@@ -256,7 +256,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载PLC变量数据界面发生异常", "LoadFrmPlcItemExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载PLC变量数据界面发生异常", "LoadFrmPlcItemExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void kbt_Query_Click(object sender, EventArgs e)
|
private void kbt_Query_Click(object sender, EventArgs e)
|
||||||
@@ -290,7 +290,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择要编辑的PLC变量数据行!");
|
//KryptonMessageBox.Show("请选择要编辑的PLC变量数据行!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
if (kryptonDataGridView1.SelectedRows.Count > 0)
|
if (kryptonDataGridView1.SelectedRows.Count > 0)
|
||||||
{
|
{
|
||||||
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的PLC变量信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的PLC变量信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.OK)
|
if (dr == DialogResult.OK)
|
||||||
{
|
{
|
||||||
string PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
|
string PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
@@ -309,25 +309,25 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("删除PLC变量数据成功!");
|
//KryptonMessageBox.Show("删除PLC变量数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo"));
|
||||||
RefreshFrmHost();
|
RefreshFrmHost();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("删除PLC变量数据失败!");
|
//KryptonMessageBox.Show("删除PLC变量数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择要删除的PLC变量数据行!");
|
//KryptonMessageBox.Show("请选择要删除的PLC变量数据行!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sqlQuerySheetType = $@"SELECT SHEET_TYPE_CODE,SHEET_TYPE_NAME FROM BAS_SHEET_TYPE WHERE USED_FLAG = 1 and DEL_FLAG = 0 ORDER BY SHEET_TYPE_ID";
|
string sqlQuerySheetType = $@"SELECT SHEET_TYPE_CODE,SHEET_TYPE_NAME FROM BAS_SHEET_TYPE WHERE USED_FLAG = 1 and DEL_FLAG = 0 ORDER BY SHEET_TYPE_ID";
|
||||||
DataTable dtQuerySheetType = LeadDbHelperSQLite.Query(sqlQuerySheetType).Tables[0];
|
DataTable dtQuerySheetType = LeadDbHelperSQLite.Query(sqlQuerySheetType).Tables[0];
|
||||||
if (dtQuerySheetType != null && dtQuerySheetType.Rows.Count > 0)
|
if (dtQuerySheetType != null && dtQuerySheetType.Rows.Count > 0)
|
||||||
@@ -180,7 +180,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#region 打印测试代码
|
#region 打印测试代码
|
||||||
@@ -334,7 +334,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,12 +409,12 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请勾选要打印的托盘数据行!!");
|
//KryptonMessageBox.Show("请勾选要打印的托盘数据行!!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void PrintWorkedIrMsg(string workingIrCodeMsg)
|
private void PrintWorkedIrMsg(string workingIrCodeMsg)
|
||||||
@@ -697,7 +697,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请勾选要编辑的作业托盘数据行!!");
|
//KryptonMessageBox.Show("请勾选要编辑的作业托盘数据行!!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow"));
|
KryptonMessageBox.Show(this.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4067
CleanMachineHMI/Lang/en-US.json
Normal file
4067
CleanMachineHMI/Lang/en-US.json
Normal file
File diff suppressed because it is too large
Load Diff
1
CleanMachineHMI/Lang/zh-CN.json
Normal file
1
CleanMachineHMI/Lang/zh-CN.json
Normal file
File diff suppressed because one or more lines are too long
2
CleanMachineHMI/Properties/Settings.Designer.cs
generated
2
CleanMachineHMI/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace CleanMachineHMI.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Krypton.Toolkit;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@@ -46,6 +47,11 @@ namespace CleanMachineHMI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static string LanguageCode { get; set; } = AppConfigHelper.Get("LanguageCode");
|
public static string LanguageCode { get; set; } = AppConfigHelper.Get("LanguageCode");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言字典
|
||||||
|
/// </summary>
|
||||||
|
public static Dictionary<string, string> ThemeLanguage = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户信息
|
/// 用户信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -176,5 +182,43 @@ namespace CleanMachineHMI
|
|||||||
CanOperate = false;
|
CanOperate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载主题
|
||||||
|
/// </summary>
|
||||||
|
public static void LoadTheme()
|
||||||
|
{
|
||||||
|
if (ThemeLanguage == null || ThemeLanguage.Count == 0)
|
||||||
|
{
|
||||||
|
var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
|
||||||
|
var filePath = appPath + $"Lang\\{GlobalHelper.LanguageCode}.json";
|
||||||
|
using (StreamReader sr = new StreamReader(filePath))
|
||||||
|
{
|
||||||
|
var str = sr.ReadToEnd();
|
||||||
|
var lstLanguage = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
|
||||||
|
//var tmpThemeLanguage = new List<ThemeLanguage>();
|
||||||
|
//lstLanguage.ForEach(item =>
|
||||||
|
//{
|
||||||
|
// var part = tmpThemeLanguage.FirstOrDefault(x => x.formCode == item.formCode && x.controlCode == item.controlCode);
|
||||||
|
// if (part == null)
|
||||||
|
// {
|
||||||
|
// tmpThemeLanguage.Add(item);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// part.options.Add(item.controlName);
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
//var str1 = Newtonsoft.Json.JsonConvert.SerializeObject(tmpThemeLanguage);
|
||||||
|
//WriteFile(appPath + "\\Lang", filePath, str1);
|
||||||
|
var tmpThemeLanguage = new Dictionary<string, string>();
|
||||||
|
lstLanguage.ForEach(item =>
|
||||||
|
{
|
||||||
|
tmpThemeLanguage.Add(item.formCode + "|" + item.controlCode, item.controlName);
|
||||||
|
});
|
||||||
|
ThemeLanguage = tmpThemeLanguage;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using NX_LogUtility;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
@@ -19,6 +20,7 @@ namespace CleanMachineHMI.Utils
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static class frmUtil
|
public static class frmUtil
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 给一个字符串进行MD5加密
|
/// 给一个字符串进行MD5加密
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -116,22 +118,44 @@ namespace CleanMachineHMI.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
private static void WriteFile(string strDir, string filePath, string txt)
|
||||||
/// object 选择返回值
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string GetObjToString(this object obj)
|
|
||||||
{
|
{
|
||||||
if (obj == null)
|
FileStream fs = null;
|
||||||
|
StreamWriter sw = null;
|
||||||
|
try
|
||||||
{
|
{
|
||||||
return string.Empty;
|
if (!Directory.Exists(strDir))//如果日志文件存放的文件夹不存在,就新建一个文件夹。
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(strDir);
|
||||||
}
|
}
|
||||||
if (obj.ToString() == "")
|
|
||||||
|
if (File.Exists(filePath))//日志文件存放路径存在,向日志文件追加记录。
|
||||||
{
|
{
|
||||||
return string.Empty;
|
fs = new FileStream(filePath, FileMode.Append);
|
||||||
|
}
|
||||||
|
else//日志文件存放路径不存在,创建日志文件。
|
||||||
|
{
|
||||||
|
fs = new FileStream(filePath, FileMode.Create);
|
||||||
|
}
|
||||||
|
sw = new StreamWriter(fs);
|
||||||
|
//开始写入
|
||||||
|
sw.Write(txt);
|
||||||
|
//清空缓冲区
|
||||||
|
sw.Flush();
|
||||||
|
//关闭流
|
||||||
|
sw.Close();
|
||||||
|
fs.Close();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (sw != null)
|
||||||
|
sw.Close();
|
||||||
|
if (fs != null)
|
||||||
|
fs.Close();
|
||||||
}
|
}
|
||||||
return obj.ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -139,39 +163,38 @@ namespace CleanMachineHMI.Utils
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="form">窗体对象</param>
|
/// <param name="form">窗体对象</param>
|
||||||
/// <param name="languageCode">语言编码</param>
|
/// <param name="languageCode">语言编码</param>
|
||||||
public static void SetFormControlText(this Form form,string languageCode)
|
public static void SetFormControlText(this ContainerControl form)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
foreach (Control item in form.Controls)
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
{
|
||||||
AND FORM_CODE='{form.Name}' AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE !='DataSource'";
|
var key = form.Name + "|" + item.Name;
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||||
ErgodicControlsText(form, dt);
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (item is KryptonGroupBox)
|
||||||
|
{
|
||||||
|
//Console.Write("模块名称"+ ((KryptonGroupBox)tmpC[0]).Values.Heading);
|
||||||
|
//Console.Write("\r\n");
|
||||||
|
|
||||||
|
((KryptonGroupBox)item).Values.Heading = GlobalHelper.ThemeLanguage[key];
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.Write("控件名称:"+ tmpC[0].Name+ ":控件中文名:" + tmpC[0].Text);
|
||||||
|
//Console.Write("\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void SetFormControlText(this UserControl form, string languageCode)
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
|
||||||
AND FORM_CODE='{form.Name}' AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE !='DataSource'";
|
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
|
||||||
ErgodicControlsText(form, dt);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设定数据视图列文本
|
/// 设定数据视图列文本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -202,12 +225,10 @@ namespace CleanMachineHMI.Utils
|
|||||||
/// <param name="dataGrid"></param>
|
/// <param name="dataGrid"></param>
|
||||||
/// <param name="formName"></param>
|
/// <param name="formName"></param>
|
||||||
/// <param name="languageCode"></param>
|
/// <param name="languageCode"></param>
|
||||||
public static DataTable GetInfoLanguageText(this Form form, string languageCode, string controlType = "Info")
|
public static DataTable GetInfoLanguageText(this ContainerControl form, string languageCode, string controlType = "Info")
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
||||||
AND (FORM_CODE='{form.Name}' OR IFNULL(FORM_CODE,'')='') AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE = '{controlType}' ORDER BY LANGUAGE_CONTROL_ID";
|
AND (FORM_CODE='{form.Name}' OR IFNULL(FORM_CODE,'')='') AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE = '{controlType}' ORDER BY LANGUAGE_CONTROL_ID";
|
||||||
@@ -219,55 +240,7 @@ namespace CleanMachineHMI.Utils
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static DataTable GetInfoLanguageText(this UserControl form, string languageCode, string controlType = "Info")
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
|
||||||
AND (FORM_CODE='{form.Name}' OR IFNULL(FORM_CODE,'')='') AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE = '{controlType}' ORDER BY LANGUAGE_CONTROL_ID";
|
|
||||||
return LeadDbHelperSQLite.Query(sql).Tables[0];
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static DataTable GetInfoLanguageText_1(this Form form, string languageCode, string controlType = "Info")
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
|
||||||
AND (FORM_CODE='{form.Name}' OR IFNULL(FORM_CODE,'')='') AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE like '{controlType}' ORDER BY LANGUAGE_CONTROL_ID";
|
|
||||||
return LeadDbHelperSQLite.Query(sql).Tables[0];
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static DataTable GetInfoLanguageText_1(this UserControl form, string languageCode, string controlType = "Info")
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
|
||||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
|
||||||
AND (FORM_CODE='{form.Name}' OR IFNULL(FORM_CODE,'')='') AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE like '{controlType}' ORDER BY LANGUAGE_CONTROL_ID";
|
|
||||||
return LeadDbHelperSQLite.Query(sql).Tables[0];
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取等于查询行
|
/// 获取等于查询行
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -322,20 +295,18 @@ namespace CleanMachineHMI.Utils
|
|||||||
/// <param name="dataTable"></param>
|
/// <param name="dataTable"></param>
|
||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetInfoText(this DataTable dataTable,string defaultValue,string key)
|
public static string GetInfoText(this Control form, string defaultValue, string infoCode, string controlType = "Info")
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var likeSql = $"`CONTROL_CODE` = '{key}' and `CONTROL_TYPE` = 'Info'";
|
var key = form.Name + "|" + infoCode;
|
||||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||||
if (dataRow == null || !dataRow.Any())
|
|
||||||
{
|
{
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return dataRow[0]["CONTROL_NAME"].ToString();
|
return GlobalHelper.ThemeLanguage[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -344,28 +315,7 @@ namespace CleanMachineHMI.Utils
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static string GetInfoText_1(this DataTable dataTable, string defaultValue, string key, string controlType)
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var likeSql = $"`CONTROL_CODE` = '{key}' and `CONTROL_TYPE` = '{controlType}'";
|
|
||||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
|
||||||
if (dataRow == null || !dataRow.Any())
|
|
||||||
{
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return dataRow[0]["CONTROL_NAME"].ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static DataRow[] GetComBoboxItemArr(this DataTable dataTable, string key, string controlType)
|
public static DataRow[] GetComBoboxItemArr(this DataTable dataTable, string key, string controlType)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -389,6 +339,7 @@ namespace CleanMachineHMI.Utils
|
|||||||
/// <param name="dataTable"></param>
|
/// <param name="dataTable"></param>
|
||||||
private static void ErgodicControlsText(Control container, DataTable dataTable)
|
private static void ErgodicControlsText(Control container, DataTable dataTable)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = 0; i < dataTable.Rows.Count; i++)
|
for (int i = 0; i < dataTable.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
Control[] tmpC = container.Controls.Find(dataTable.Rows[i]["CONTROL_CODE"].ToString(), true);
|
Control[] tmpC = container.Controls.Find(dataTable.Rows[i]["CONTROL_CODE"].ToString(), true);
|
||||||
@@ -431,4 +382,22 @@ namespace CleanMachineHMI.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ThemeLanguage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 窗体编码
|
||||||
|
/// </summary>
|
||||||
|
public string formCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 控件编码
|
||||||
|
/// </summary>
|
||||||
|
public string controlCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 控件名称
|
||||||
|
/// </summary>
|
||||||
|
public string controlName { get; set; }
|
||||||
|
|
||||||
|
public List<string> options { get; set; } = new List<string>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace CleanMachineHMI.forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
foreach (Control item in kryptonPanel1.Controls)
|
foreach (Control item in kryptonPanel1.Controls)
|
||||||
{
|
{
|
||||||
if (item.Tag != null && item.Tag.ToString() != "")
|
if (item.Tag != null && item.Tag.ToString() != "")
|
||||||
@@ -91,7 +91,7 @@ namespace CleanMachineHMI.forms
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
}
|
}
|
||||||
private void txt_GotFocus(object sender, EventArgs e)
|
private void txt_GotFocus(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -52,12 +52,12 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(txtCleanModeCode.Text))
|
if (string.IsNullOrEmpty(txtCleanModeCode.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_CODE = '{txtCleanModeCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_CODE = '{txtCleanModeCode.Text}'";
|
||||||
@@ -106,18 +106,18 @@ namespace CleanMachineHMI.frmChild
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
|
||||||
frmCleanMode.RefreshFrmHost();
|
frmCleanMode.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
cmbContaminationType.DisplayMember = "Text";
|
cmbContaminationType.DisplayMember = "Text";
|
||||||
@@ -71,7 +71,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,17 +81,17 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (cmbContaminationType.SelectedIndex == 0)
|
if (cmbContaminationType.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_DTL WHERE CONTAMINATION_TYPE_CODE = '{((ListItem)cmbContaminationType.SelectedItem).Value}' AND CONTAMINATION_DTL_CODE = '{txtContaminationDTLCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_DTL WHERE CONTAMINATION_TYPE_CODE = '{((ListItem)cmbContaminationType.SelectedItem).Value}' AND CONTAMINATION_DTL_CODE = '{txtContaminationDTLCode.Text}'";
|
||||||
@@ -142,18 +142,18 @@ namespace CleanMachineHMI.frmChild
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "AddSuccessInfo"));
|
||||||
frmContaminationDTL.RefreshFrmHost();
|
frmContaminationDTL.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
cmbCleanMode.DisplayMember = "Text";
|
cmbCleanMode.DisplayMember = "Text";
|
||||||
@@ -71,7 +71,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,19 +81,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (cmbCleanMode.SelectedIndex == 0)
|
if (cmbCleanMode.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入污染类型编码!");
|
//KryptonMessageBox.Show("请输入污染类型编码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入污染类型名称!");
|
//KryptonMessageBox.Show("请输入污染类型名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_TYPE WHERE CLEAN_MODE_CODE = '{((ListItem)cmbCleanMode.SelectedItem).Value}' AND CONTAMINATION_TYPE_CODE = '{txtContaminationTypeCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_TYPE WHERE CLEAN_MODE_CODE = '{((ListItem)cmbCleanMode.SelectedItem).Value}' AND CONTAMINATION_TYPE_CODE = '{txtContaminationTypeCode.Text}'";
|
||||||
@@ -144,18 +144,18 @@ namespace CleanMachineHMI.frmChild
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据成功!", "AddSuccessInfo"));
|
||||||
frmContaminationType.RefreshFrmHost();
|
frmContaminationType.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddPlcItem_Load(object sender, EventArgs e)
|
private void frmAddPlcItem_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
@@ -87,25 +87,25 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入PLC编码");
|
//KryptonMessageBox.Show("请输入PLC编码");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入PLC名称");
|
//KryptonMessageBox.Show("请输入PLC名称");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择PLC类型");
|
//KryptonMessageBox.Show("请选择PLC类型");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择PLC数据类型");
|
//KryptonMessageBox.Show("请选择PLC数据类型");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
||||||
@@ -206,19 +206,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("添加PLC变量数据成功!");
|
//KryptonMessageBox.Show("添加PLC变量数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
||||||
frmPlcItemConfig.RefreshFrmHost();
|
frmPlcItemConfig.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("添加PLC变量数据失败!");
|
//KryptonMessageBox.Show("添加PLC变量数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddRole_Load(object sender, EventArgs e)
|
private void frmAddRole_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
@@ -65,18 +65,18 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(txtRoleCode.Text))
|
if (string.IsNullOrEmpty(txtRoleCode.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtRoleName.Text))
|
if (string.IsNullOrEmpty(txtRoleName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int roleGrade = 0;
|
int roleGrade = 0;
|
||||||
if (kcmb_roleGrade.SelectedIndex == 0)
|
if (kcmb_roleGrade.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (kcmb_roleGrade.SelectedIndex == 1)
|
else if (kcmb_roleGrade.SelectedIndex == 1)
|
||||||
@@ -85,7 +85,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
roleGrade = 100;
|
roleGrade = 100;
|
||||||
@@ -143,18 +143,18 @@ namespace CleanMachineHMI.frmChild
|
|||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增角色数据成功!", "AddSuccessInfo"));
|
||||||
frmRole.RefreshFrmHost();
|
frmRole.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增角色数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,13 +31,13 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtSheetTypeCode.Text))
|
if (string.IsNullOrEmpty(txtSheetTypeCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入板材编码!");
|
//KryptonMessageBox.Show("请输入板材编码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材编码!", "EnterSheetTypeCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入板材编码!", "EnterSheetTypeCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入板材名称!");
|
//KryptonMessageBox.Show("请输入板材名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_CODE = '{txtSheetTypeCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_CODE = '{txtSheetTypeCode.Text}'";
|
||||||
@@ -87,19 +87,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增板材数据成功!");
|
//KryptonMessageBox.Show("新增板材数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增板材数据成功!", "AddSuccessInfo"));
|
||||||
frmSheetType.RefreshFrmHost();
|
frmSheetType.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增板材数据失败!");
|
//KryptonMessageBox.Show("新增板材数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增板材数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddSheetType_Load(object sender, EventArgs e)
|
private void frmAddSheetType_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
kryptonPanel1.Focus();
|
kryptonPanel1.Focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddUser_Load(object sender, EventArgs e)
|
private void frmAddUser_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
cmbGender.Items.Clear();
|
cmbGender.Items.Clear();
|
||||||
@@ -93,42 +93,42 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(txtAccount.Text))
|
if (string.IsNullOrEmpty(txtAccount.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtName.Text))
|
if (string.IsNullOrEmpty(txtName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtPS.Text))
|
if (string.IsNullOrEmpty(txtPS.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入用户密码!");
|
//KryptonMessageBox.Show("请输入用户密码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtPS1.Text))
|
if (string.IsNullOrEmpty(txtPS1.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请确认用户密码!");
|
//KryptonMessageBox.Show("请确认用户密码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cmbGender.SelectedIndex == 0)
|
if (cmbGender.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择性别!");
|
//KryptonMessageBox.Show("请选择性别!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kcmb_Role.SelectedIndex == 0)
|
if (kcmb_Role.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择所属角色!");
|
//KryptonMessageBox.Show("请选择所属角色!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (txtPS1.Text != txtPS.Text)
|
if (txtPS1.Text != txtPS.Text)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM SYS_USER WHERE USER_CODE = '{txtAccount.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM SYS_USER WHERE USER_CODE = '{txtAccount.Text}'";
|
||||||
@@ -187,19 +187,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增用户数据成功!");
|
//KryptonMessageBox.Show("新增用户数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
||||||
frmUser.RefreshFrmHost();
|
frmUser.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增用户数据失败!");
|
//KryptonMessageBox.Show("新增用户数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddWaringMsg_Load(object sender, EventArgs e)
|
private void frmAddWaringMsg_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Clear();
|
kcmb_WarningType.Items.Clear();
|
||||||
@@ -71,19 +71,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入报警条码!");
|
//KryptonMessageBox.Show("请输入报警条码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtWarningName.Text))
|
if (string.IsNullOrEmpty(txtWarningName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入报警名称!");
|
//KryptonMessageBox.Show("请输入报警名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kcmb_WarningType.SelectedIndex == 0)
|
if (kcmb_WarningType.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择报警类型!");
|
//KryptonMessageBox.Show("请选择报警类型!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'";
|
||||||
@@ -139,20 +139,20 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增基础报警数据成功!");
|
//KryptonMessageBox.Show("新增基础报警数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据成功!", "AddSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据成功!", "AddSuccessInfo"));
|
||||||
// frmWarning.RefreshFrmHost();
|
// frmWarning.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("新增基础报警数据失败!");
|
//KryptonMessageBox.Show("新增基础报警数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据失败!", "AddFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据失败!", "AddFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show(ex.Message);
|
//KryptonMessageBox.Show(ex.Message);
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
}
|
}
|
||||||
private void txt_GotFocus(object sender, EventArgs e)
|
private void txt_GotFocus(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -59,12 +59,12 @@ namespace CleanMachineHMI.frmChild
|
|||||||
txtCleanModeCode.Enabled = false;
|
txtCleanModeCode.Enabled = false;
|
||||||
txtCleanModeName.Text = dt.Rows[0]["CLEAN_MODE_NAME"].ToString();
|
txtCleanModeName.Text = dt.Rows[0]["CLEAN_MODE_NAME"].ToString();
|
||||||
}
|
}
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
kryptonPanel1.Focus();
|
kryptonPanel1.Focus();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入板材名称!");
|
//KryptonMessageBox.Show("请输入板材名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update BAS_CLEAN_MODE set CLEAN_MODE_NAME = '{txtCleanModeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CLEAN_MODE_ID = '{CleanModeId}'";
|
string sql = $@"update BAS_CLEAN_MODE set CLEAN_MODE_NAME = '{txtCleanModeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CLEAN_MODE_ID = '{CleanModeId}'";
|
||||||
@@ -83,7 +83,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改清洗方式数据成功!");
|
//KryptonMessageBox.Show("修改清洗方式数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据成功!", "EditSuccessInfo"));
|
||||||
|
|
||||||
frmCleanMode.RefreshFrmHost();
|
frmCleanMode.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
@@ -91,12 +91,12 @@ namespace CleanMachineHMI.frmChild
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改清洗方式数据失败!");
|
//KryptonMessageBox.Show("修改清洗方式数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,19 +91,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (cmbContaminationType.SelectedIndex == 0)
|
if (cmbContaminationType.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择污染类型!");
|
//KryptonMessageBox.Show("请选择污染类型!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入污染明细编码!");
|
//KryptonMessageBox.Show("请输入污染明细编码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入污染明细名称!");
|
//KryptonMessageBox.Show("请输入污染明细名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update BAS_CONTAMINATION_DTL set CONTAMINATION_DTL_NAME = '{txtContaminationDTLName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_DTL_ID = '{ContaminationDtlId}'";
|
string sql = $@"update BAS_CONTAMINATION_DTL set CONTAMINATION_DTL_NAME = '{txtContaminationDTLName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_DTL_ID = '{ContaminationDtlId}'";
|
||||||
@@ -111,19 +111,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改污染明细数据成功!");
|
//KryptonMessageBox.Show("修改污染明细数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
|
||||||
frmContaminationDTL.RefreshFrmHost();
|
frmContaminationDTL.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改污染明细数据失败!");
|
//KryptonMessageBox.Show("修改污染明细数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -81,7 +81,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,35 +91,35 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (cmbCleanMode.SelectedIndex == 0)
|
if (cmbCleanMode.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update BAS_CONTAMINATION_TYPE set CONTAMINATION_TYPE_NAME = '{txtContaminationTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_TYPE_ID = '{ContaminationId}'";
|
string sql = $@"update BAS_CONTAMINATION_TYPE set CONTAMINATION_TYPE_NAME = '{txtContaminationTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_TYPE_ID = '{ContaminationId}'";
|
||||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据成功!", "EditSuccessInfo"));
|
||||||
frmContaminationType.RefreshFrmHost();
|
frmContaminationType.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"SELECT * FROM SYS_PARAMETER WHERE PARAMETER_ID = '{ParamaterId}'";
|
string sql = $@"SELECT * FROM SYS_PARAMETER WHERE PARAMETER_ID = '{ParamaterId}'";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -56,7 +56,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtValue.Text))
|
if (string.IsNullOrEmpty(txtValue.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入参数值!");
|
//KryptonMessageBox.Show("请输入参数值!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入参数值!", "EnterparamaterVlaueInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入参数值!", "EnterparamaterVlaueInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update SYS_PARAMETER set PARAMETER_VALUE = '{txtValue.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where PARAMETER_ID = '{ParamaterId}'";
|
string sql = $@"update SYS_PARAMETER set PARAMETER_VALUE = '{txtValue.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where PARAMETER_ID = '{ParamaterId}'";
|
||||||
@@ -75,19 +75,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改参数信息数据成功!");
|
//KryptonMessageBox.Show("修改参数信息数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据成功!", "EditSuccessInfo"));
|
||||||
frmParamater.RefreshFrmHost();
|
frmParamater.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改参数信息数据失败!");
|
//KryptonMessageBox.Show("修改参数信息数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
@@ -86,7 +86,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -106,25 +106,25 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入PLC编码");
|
//KryptonMessageBox.Show("请输入PLC编码");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入PLC名称");
|
//KryptonMessageBox.Show("请输入PLC名称");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择PLC类型");
|
//KryptonMessageBox.Show("请选择PLC类型");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择PLC数据类型");
|
//KryptonMessageBox.Show("请选择PLC数据类型");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
||||||
@@ -182,19 +182,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("编辑PLC变量数据成功!");
|
//KryptonMessageBox.Show("编辑PLC变量数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
|
||||||
frmPlcItemConfig.RefreshFrmHost();
|
frmPlcItemConfig.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("编辑PLC变量数据失败!");
|
//KryptonMessageBox.Show("编辑PLC变量数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
@@ -78,7 +78,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,14 +89,14 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtRoleName.Text))
|
if (string.IsNullOrEmpty(txtRoleName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入角色名称!");
|
//KryptonMessageBox.Show("请输入角色名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int roleGrade = 0;
|
int roleGrade = 0;
|
||||||
if (kcmb_roleGrade.SelectedIndex == 0)
|
if (kcmb_roleGrade.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择角色级别!");
|
//KryptonMessageBox.Show("请选择角色级别!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (kcmb_roleGrade.SelectedIndex == 1)
|
else if (kcmb_roleGrade.SelectedIndex == 1)
|
||||||
@@ -119,19 +119,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改角色数据成功!");
|
//KryptonMessageBox.Show("修改角色数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改角色数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改角色数据成功!", "EditSuccessInfo"));
|
||||||
frmRole.RefreshFrmHost();
|
frmRole.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改角色数据失败!");
|
//KryptonMessageBox.Show("修改角色数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改角色数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改角色数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"SELECT * FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_ID = '{SheetTypeId}'";
|
string sql = $@"SELECT * FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_ID = '{SheetTypeId}'";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -59,7 +59,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入板材名称!");
|
//KryptonMessageBox.Show("请输入板材名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update BAS_SHEET_TYPE set SHEET_TYPE_NAME = '{txtSheetTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where SHEET_TYPE_ID = '{SheetTypeId}'";
|
string sql = $@"update BAS_SHEET_TYPE set SHEET_TYPE_NAME = '{txtSheetTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where SHEET_TYPE_ID = '{SheetTypeId}'";
|
||||||
@@ -78,19 +78,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改板材数据成功!");
|
//KryptonMessageBox.Show("修改板材数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据成功!", "EditSuccessInfo"));
|
||||||
frmSheetType.RefreshFrmHost();
|
frmSheetType.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改板材数据失败!");
|
//KryptonMessageBox.Show("修改板材数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
cmbGender.Items.Clear();
|
cmbGender.Items.Clear();
|
||||||
@@ -97,7 +97,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,36 +107,36 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(txtAccount.Text))
|
if (string.IsNullOrEmpty(txtAccount.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtName.Text))
|
if (string.IsNullOrEmpty(txtName.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtPS.Text))
|
if (string.IsNullOrEmpty(txtPS.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入用户密码!");
|
//KryptonMessageBox.Show("请输入用户密码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtPS1.Text))
|
if (string.IsNullOrEmpty(txtPS1.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请确认用户密码!");
|
//KryptonMessageBox.Show("请确认用户密码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cmbGender.SelectedIndex == 0)
|
if (cmbGender.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择性别!");
|
//KryptonMessageBox.Show("请选择性别!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (txtPS1.Text != txtPS.Text)
|
if (txtPS1.Text != txtPS.Text)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sql = $@"update SYS_USER set USER_CODE = '{txtAccount.Text}',USER_NAME = '{txtName.Text}',PASSWORD = '{txtPS1.Text}',GENDER = '{cmbGender.SelectedIndex}',ROLE_ID = '{((ListItem)kcmb_Role.SelectedItem).Value}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where USER_ID = '{UserId}'";
|
string sql = $@"update SYS_USER set USER_CODE = '{txtAccount.Text}',USER_NAME = '{txtName.Text}',PASSWORD = '{txtPS1.Text}',GENDER = '{cmbGender.SelectedIndex}',ROLE_ID = '{((ListItem)kcmb_Role.SelectedItem).Value}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where USER_ID = '{UserId}'";
|
||||||
@@ -144,19 +144,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改用户数据成功!");
|
//KryptonMessageBox.Show("修改用户数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改用户数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改用户数据成功!", "EditSuccessInfo"));
|
||||||
frmUser.RefreshFrmHost();
|
frmUser.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改用户数据失败!");
|
//KryptonMessageBox.Show("修改用户数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改用户数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改用户数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
InitControlEvent();
|
InitControlEvent();
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Clear();
|
kcmb_WarningType.Items.Clear();
|
||||||
@@ -79,7 +79,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,19 +90,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入报警条码!");
|
//KryptonMessageBox.Show("请输入报警条码!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(txtWarningName.Text))
|
if (string.IsNullOrEmpty(txtWarningName.Text))
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请输入报警名称!");
|
//KryptonMessageBox.Show("请输入报警名称!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kcmb_WarningType.SelectedIndex == 0)
|
if (kcmb_WarningType.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("请选择报警类型!");
|
//KryptonMessageBox.Show("请选择报警类型!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'";
|
string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'";
|
||||||
@@ -118,19 +118,19 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (row > 0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改基础报警数据成功!");
|
//KryptonMessageBox.Show("修改基础报警数据成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改基础报警数据成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据成功!", "EditSuccessInfo"));
|
||||||
//frmWarning.RefreshFrmHost();
|
//frmWarning.RefreshFrmHost();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("修改基础报警数据失败!");
|
//KryptonMessageBox.Show("修改基础报警数据失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改基础报警数据失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"select * from VW_WORKING_PALLET_MSG where WORKING_PALLET_CODE = '{PalletCode}'";
|
string sql = $@"select * from VW_WORKING_PALLET_MSG where WORKING_PALLET_CODE = '{PalletCode}'";
|
||||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
@@ -53,7 +53,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
string sql = $@"SELECT * FROM SYS_MENU";
|
string sql = $@"SELECT * FROM SYS_MENU";
|
||||||
allMenuData = LeadDbHelperSQLite.Query(sql).Tables[0];
|
allMenuData = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||||
if (allMenuData != null && allMenuData.Rows.Count > 0)
|
if (allMenuData != null && allMenuData.Rows.Count > 0)
|
||||||
@@ -77,7 +77,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,24 +208,24 @@ namespace CleanMachineHMI.frmChild
|
|||||||
if (rowSum > 0)
|
if (rowSum > 0)
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("该角色菜单授权成功!");
|
//KryptonMessageBox.Show("该角色菜单授权成功!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("该角色的菜单权限授权成功!", "EditSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权成功!", "EditSuccessInfo"));
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("该角色菜单授权失败!");
|
//KryptonMessageBox.Show("该角色菜单授权失败!");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("该角色的菜单权限授权失败!", "EditFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权失败!", "EditFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//KryptonMessageBox.Show("未选择任何菜单项,无法配置权限。");
|
//KryptonMessageBox.Show("未选择任何菜单项,无法配置权限。");
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
int directNum = Convert.ToInt32(PlcOperationHelper.Instance.ReadPlcItem("DischargeDirectionSelection", PlcItemTypeDesc.D));
|
int directNum = Convert.ToInt32(PlcOperationHelper.Instance.ReadPlcItem("DischargeDirectionSelection", PlcItemTypeDesc.D));
|
||||||
if (GlobalHelper.LanguageCode == "English")
|
if (GlobalHelper.LanguageCode == "English")
|
||||||
{
|
{
|
||||||
@@ -70,7 +70,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
{
|
{
|
||||||
if (kcmb_SwitchRunDirection.SelectedIndex == 0)
|
if (kcmb_SwitchRunDirection.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PlcOperationHelper.Instance.isConn)
|
if (!PlcOperationHelper.Instance.isConn)
|
||||||
@@ -90,17 +90,17 @@ namespace CleanMachineHMI.frmChild
|
|||||||
}
|
}
|
||||||
if (PlcOperationHelper.Instance.WritePlcItem("DischargeDirectionSelection", (kcmb_SwitchRunDirection.SelectedIndex - 1).ToString(), PlcItemTypeDesc.D))
|
if (PlcOperationHelper.Instance.WritePlcItem("DischargeDirectionSelection", (kcmb_SwitchRunDirection.SelectedIndex - 1).ToString(), PlcItemTypeDesc.D))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
|
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ namespace CleanMachineHMI
|
|||||||
KryptonLabel label1 = new KryptonLabel();
|
KryptonLabel label1 = new KryptonLabel();
|
||||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||||
label1.Location = new Point(44, 6);
|
label1.Location = new Point(44, 6);
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
|
|
||||||
panel.Controls.Add(label);
|
panel.Controls.Add(label);
|
||||||
panel.Controls.Add(button);
|
panel.Controls.Add(button);
|
||||||
@@ -247,7 +247,7 @@ namespace CleanMachineHMI
|
|||||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||||
label1.Location = new Point(44, 6);
|
label1.Location = new Point(44, 6);
|
||||||
//label1.Text = item.PlcItemName.Replace("(I/O监控)", "");
|
//label1.Text = item.PlcItemName.Replace("(I/O监控)", "");
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
|
|
||||||
panel.Controls.Add(label);
|
panel.Controls.Add(label);
|
||||||
panel.Controls.Add(button);
|
panel.Controls.Add(button);
|
||||||
@@ -338,7 +338,7 @@ namespace CleanMachineHMI
|
|||||||
KryptonLabel label1 = new KryptonLabel();
|
KryptonLabel label1 = new KryptonLabel();
|
||||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||||
label1.Location = new Point(44, 6);
|
label1.Location = new Point(44, 6);
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
|
|
||||||
panel.Controls.Add(label);
|
panel.Controls.Add(label);
|
||||||
panel.Controls.Add(button);
|
panel.Controls.Add(button);
|
||||||
@@ -372,7 +372,7 @@ namespace CleanMachineHMI
|
|||||||
KryptonLabel label1 = new KryptonLabel();
|
KryptonLabel label1 = new KryptonLabel();
|
||||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||||
label1.Location = new Point(44, 6);
|
label1.Location = new Point(44, 6);
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
|
|
||||||
panel.Controls.Add(label);
|
panel.Controls.Add(label);
|
||||||
panel.Controls.Add(button);
|
panel.Controls.Add(button);
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
||||||
|
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
|
||||||
|
|
||||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace CleanMachineHMI
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
@@ -48,12 +48,12 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(txtAccount.Text))
|
if (string.IsNullOrWhiteSpace(txtAccount.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入登陆账号!", "PleaseInputAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("请输入登陆账号!", "PleaseInputAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrWhiteSpace(txtPs.Text))
|
if (string.IsNullOrWhiteSpace(txtPs.Text))
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入登陆密码!", "PleaseInputPassword"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("请输入登陆密码!", "PleaseInputPassword"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,17 +64,17 @@ namespace CleanMachineHMI
|
|||||||
var data = dt.Rows[0];
|
var data = dt.Rows[0];
|
||||||
if (data["USED_FLAG"].ToString() == "0")
|
if (data["USED_FLAG"].ToString() == "0")
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("用户已被停用!", "UserStop"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("用户已被停用!", "UserStop"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data["DEL_FLAG"].ToString() == "1")
|
if (data["DEL_FLAG"].ToString() == "1")
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("用户已被删除!", "UserDeleted"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("用户已被删除!", "UserDeleted"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data["PASSWORD"].ToString().ToLower() != txtPs.Text.ToLower())
|
if (data["PASSWORD"].ToString().ToLower() != txtPs.Text.ToLower())
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("输入密码错误!", "PasswordFail"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("输入密码错误!", "PasswordFail"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AppConfigHelper.Update("LastTimeUserCode",txtAccount.Text.Trim());
|
AppConfigHelper.Update("LastTimeUserCode",txtAccount.Text.Trim());
|
||||||
@@ -107,7 +107,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
KryptonMessageBox.Show(this.GetInfoText("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace CleanMachineHMI
|
|||||||
public frmMainNew()
|
public frmMainNew()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_InfoLanguageTextList = this.GetInfoLanguageText_1(GlobalHelper.LanguageCode, "Info%");
|
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "Info%");
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 全局变量
|
#region 全局变量
|
||||||
@@ -145,7 +145,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
this.SetFormControlText();
|
||||||
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
|
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
|
||||||
|
|
||||||
string sql1 = $@" SELECT * FROM BAS_PLC_ITEM ";
|
string sql1 = $@" SELECT * FROM BAS_PLC_ITEM ";
|
||||||
@@ -186,7 +186,7 @@ namespace CleanMachineHMI
|
|||||||
bool isInitStatus = PlcOperationHelper.Instance.PlcInit();
|
bool isInitStatus = PlcOperationHelper.Instance.PlcInit();
|
||||||
if (isInitStatus)
|
if (isInitStatus)
|
||||||
{
|
{
|
||||||
label3Professional.Text = _InfoLanguageTextList.GetInfoText_1("串口打开成功,PLC连接成功!", "label3Professional", "Info_Success");
|
label3Professional.Text = this.GetInfoText("串口打开成功,PLC连接成功!", "label3Professional", "Info_Success");
|
||||||
label3Professional.BackColor = Color.Lime;
|
label3Professional.BackColor = Color.Lime;
|
||||||
isPlcConnStatus = true;
|
isPlcConnStatus = true;
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ namespace CleanMachineHMI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//label3Professional.Text = "串口打开失败,PLC连接失败!";
|
//label3Professional.Text = "串口打开失败,PLC连接失败!";
|
||||||
label3Professional.Text = _InfoLanguageTextList.GetInfoText_1("串口打开失败,PLC连接失败!", "label3Professional", "Info_Failed");
|
label3Professional.Text = this.GetInfoText("串口打开失败,PLC连接失败!", "label3Professional", "Info_Failed");
|
||||||
label3Professional.BackColor = Color.Red;
|
label3Professional.BackColor = Color.Red;
|
||||||
isPlcConnStatus = false;
|
isPlcConnStatus = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user