1
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Krypton.Navigator" 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.Serial" Version="3.0.72" />
|
||||
</ItemGroup>
|
||||
@@ -42,10 +43,22 @@
|
||||
<Reference Include="System.Management" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Settings.Designer.cs">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="DataBase\clearMac.db">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -18,15 +18,12 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
[FormType(EnumFormType.CleanMode)]
|
||||
public partial class frmCleanMode : UserControl
|
||||
{
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
|
||||
public frmCleanMode()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
|
||||
}
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
@@ -62,7 +59,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -87,7 +84,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
|
||||
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"));
|
||||
@@ -117,7 +114,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +126,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +156,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +166,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -177,23 +174,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmContaminationDTL()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
|
||||
public void Init()
|
||||
@@ -53,7 +52,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -76,7 +75,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -122,7 +121,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +133,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -182,23 +181,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmContaminationType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
@@ -63,7 +62,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -86,7 +85,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -132,7 +131,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +143,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +183,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -192,23 +191,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmRole()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
public void Init()
|
||||
@@ -58,7 +54,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -80,13 +76,13 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
kcmb_roleGrade.SelectedIndex = 0;
|
||||
}
|
||||
@@ -116,7 +112,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +132,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +142,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -154,30 +150,30 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
||||
return;
|
||||
}
|
||||
string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'";
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +185,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +209,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmSheetType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
protected override CreateParams CreateParams
|
||||
@@ -59,7 +58,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -83,7 +82,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
|
||||
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"));
|
||||
@@ -112,7 +111,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +123,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +153,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -172,23 +171,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
|
||||
@@ -56,7 +52,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -79,19 +75,19 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
|
||||
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_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_gender.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_gender.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_gender.Name))
|
||||
{
|
||||
kcmb_gender.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_gender.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_gender.SelectedIndex = 0;
|
||||
@@ -117,7 +113,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +125,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +155,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +165,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -177,23 +173,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除用户数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +24,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmWarning()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public void Init()
|
||||
{
|
||||
var sql = $@"select WARNING_ID 序号,WARNING_CODE 报警编码,WARNING_NAME 报警名称,PLC_ITEM_CODE 'PLC信息',CASE WARNING_TYPE WHEN '1' THEN 'Cleaning machine alarm' ELSE 'Frequency converter alarm' END '报警类型',WARNING_MESSAGE 报警描述,CREATE_TIME 创建时间 from BAS_WARNING where DEL_FLAG=0";
|
||||
@@ -53,7 +49,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
dataGridView.Columns.Clear();
|
||||
dataGridView.DataSource = dt;
|
||||
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
dataGridView.SetDataViewColumnText(this.Name);
|
||||
|
||||
}
|
||||
|
||||
@@ -86,19 +82,19 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
|
||||
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_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_WarningType.SelectedIndex = 0;
|
||||
@@ -125,7 +121,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +133,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -185,23 +181,23 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除报警数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
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
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -55,7 +55,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
kryptonTextBox1.Text = currPalletMsg;
|
||||
kryptonTextBox2.Text = currIrMsg;
|
||||
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -20,12 +20,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmIOMonitor()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "Label");
|
||||
}
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void frmIOMonitorNew_Load(object sender, EventArgs e)
|
||||
{
|
||||
initControl();
|
||||
@@ -91,7 +87,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;
|
||||
|
||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode);
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -108,7 +104,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;
|
||||
|
||||
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
|
||||
label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -24,12 +24,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmMainDetail()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private readonly DataTable _InfoLanguageTextList;
|
||||
|
||||
|
||||
private List<BasCleanTypeMsg> basCleanTypeMsgList = new List<BasCleanTypeMsg>();
|
||||
/// <summary>
|
||||
/// 模板地址
|
||||
@@ -114,7 +111,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
private void frmMainDetail_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
@@ -250,7 +247,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
//if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("FullPalletMode", PlcItemTypeDesc.M)))
|
||||
//{
|
||||
// swtbtn_fullPalletMod.L_IsOpen = true;
|
||||
// if (GlobalHelper.LanguageCode == "English")
|
||||
//
|
||||
// {
|
||||
// kryptonLabel12.Text = "Delay Full";
|
||||
// }
|
||||
@@ -262,7 +259,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
//else
|
||||
//{
|
||||
// swtbtn_fullPalletMod.L_IsOpen = false;
|
||||
// if (GlobalHelper.LanguageCode == "English")
|
||||
//
|
||||
// {
|
||||
// kryptonLabel12.Text = "Count Full";
|
||||
// }
|
||||
@@ -291,7 +288,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
||||
LogHelper.WriteLog($"1111【{ex.Message}】", LogTypeEum.Err);
|
||||
}
|
||||
}
|
||||
@@ -472,7 +469,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1586,19 +1583,19 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
if (string.IsNullOrEmpty(kcmb_SheetType.Text.Trim()))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入板材类型信息!!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材类型信息!", "EnterSheetTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入板材类型信息!", "EnterSheetTypeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(ktb_IR.Text.Trim()))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入IR收货编号信息!!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入IR收货编号信息!", "EnterIRMsgInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入IR收货编号信息!", "EnterIRMsgInfo"));
|
||||
return;
|
||||
}
|
||||
if (!kdtp_RecordDate.Checked)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择录入时间!!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择录入时间!", "EnterInputTimeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择录入时间!", "EnterInputTimeInfo"));
|
||||
return;
|
||||
}
|
||||
//string sqlWorkPallet = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
|
||||
@@ -1875,7 +1872,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
catch (Exception ex)
|
||||
{
|
||||
//KryptonMessageBox.Show("保存IR数据发生异常!" + ex.Message);
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2322,7 +2319,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
if (ktb_IR.Enabled)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2935,7 +2932,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
//if (swtbtn_fullPalletMod.L_IsOpen)
|
||||
//{
|
||||
// PlcOperationHelper.Instance.WritePlcItem("FullPalletMode", "True", PlcItemTypeDesc.M);
|
||||
// if (GlobalHelper.LanguageCode == "English")
|
||||
//
|
||||
// {
|
||||
// kryptonLabel12.Text = "Delay Full";
|
||||
// }
|
||||
@@ -2948,7 +2945,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
//else
|
||||
//{
|
||||
// PlcOperationHelper.Instance.WritePlcItem("FullPalletMode", "False", PlcItemTypeDesc.M);
|
||||
// if (GlobalHelper.LanguageCode == "English")
|
||||
//
|
||||
// {
|
||||
// kryptonLabel12.Text = "Count Full";
|
||||
// }
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
LoadManualFrmData = new dlgLoadManualFrmData(GetManualPlcItemVlaue);
|
||||
GetManualPlcItemVlaue();
|
||||
GlobalHelper.OnSyncFinishPalletData += SyncFinishPalletData;
|
||||
|
||||
@@ -17,14 +17,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
[FormType(EnumFormType.MechineCheck)]
|
||||
public partial class frmMechineCheck : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public frmMechineCheck()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
|
||||
//注销退出
|
||||
@@ -118,7 +113,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void frmMechineCheck_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
Thread th1 = new Thread(MainDtlRunTh);
|
||||
th1.IsBackground = true;
|
||||
th1.Start();
|
||||
@@ -246,7 +241,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "False", PlcItemTypeDesc.M);
|
||||
//测试未通过,请检查并重新测试
|
||||
GlobalHelper.CanOperate = false;
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmParamater()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +52,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
kryptonDataGridView1.Columns.Clear();
|
||||
kryptonDataGridView1.DataSource = dt;
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name);
|
||||
|
||||
|
||||
}
|
||||
@@ -83,7 +82,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||
kdtp_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
RefreshFrmHost = new dlgRefreshFrmHost(Init);
|
||||
Init();
|
||||
foreach (Control item in tableLayoutPanel2.Controls)
|
||||
@@ -106,7 +105,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -119,7 +118,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +142,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmPlcAlarmLog()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public delegate void dlgRefreshFrmHost(bool isContainHisData);
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
@@ -38,7 +34,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,19 +61,17 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void frmPlcAlarmLog_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
kcmb_plcAlarmStatus.Items.Clear();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name))
|
||||
{
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcAlarmStatus.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
}
|
||||
kcmb_plcAlarmHandleResult.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcAlarmHandleResult.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
}
|
||||
kcmb_plcAlarmStatus.Items.Add(item);
|
||||
}
|
||||
kcmb_plcAlarmHandleResult.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name))
|
||||
{
|
||||
kcmb_plcAlarmHandleResult.Items.Add(item);
|
||||
}
|
||||
kcmb_plcAlarmStatus.SelectedIndex = 0;
|
||||
kcmb_plcAlarmHandleResult.SelectedIndex = 0;
|
||||
@@ -229,7 +223,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
dt.DefaultView.Sort = "报警时间 DESC";
|
||||
dt = dt.DefaultView.ToTable();
|
||||
kryptonDataGridView1.DataSource = dt;
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -21,11 +21,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmPlcItemConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -50,18 +47,18 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void frmPlcItemConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
kcmb_plcItemDateType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDateType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDateType.Name))
|
||||
{
|
||||
kcmb_plcItemDateType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemDateType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
@@ -247,7 +244,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
kryptonDataGridView1.DataSource = dt;
|
||||
kryptonDataGridView1.ClearSelection();
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,7 +253,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
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)
|
||||
@@ -290,7 +287,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择要编辑的PLC变量数据行!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +297,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
string PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -309,25 +306,25 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("删除PLC变量数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("删除PLC变量数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择要删除的PLC变量数据行!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
public frmPrinterMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
public delegate void dlgRefreshFrmHost();
|
||||
public static dlgRefreshFrmHost RefreshFrmHost;
|
||||
@@ -44,7 +43,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
kryptonDataGridView2.DataSource = dt;
|
||||
kryptonDataGridView2.SetDataViewColumnText(this.Name + "." + kryptonDataGridView2.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView2.SetDataViewColumnText(this.Name + "." + kryptonDataGridView2.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -100,13 +99,13 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
kryptonDataGridView1.Rows[index].Cells[4].Value = item["创建人"].ToString();
|
||||
kryptonDataGridView1.Rows[index].Cells[5].Value = item["创建时间"].ToString();
|
||||
}
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name);
|
||||
isSlectRow = true;
|
||||
kryptonDataGridView1_SelectionChanged(kryptonDataGridView1, new EventArgs());
|
||||
}
|
||||
else
|
||||
{
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name);
|
||||
kryptonDataGridView1.Rows.Clear();
|
||||
}
|
||||
}
|
||||
@@ -132,7 +131,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
try
|
||||
{
|
||||
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";
|
||||
DataTable dtQuerySheetType = LeadDbHelperSQLite.Query(sqlQuerySheetType).Tables[0];
|
||||
if (dtQuerySheetType != null && dtQuerySheetType.Rows.Count > 0)
|
||||
@@ -180,7 +179,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
#region 打印测试代码
|
||||
@@ -334,7 +333,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,12 +408,12 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("请勾选要打印的托盘数据行!!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
private void PrintWorkedIrMsg(string workingIrCodeMsg)
|
||||
@@ -697,7 +696,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("请勾选要编辑的作业托盘数据行!!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3827
CleanMachineHMI/Lang/en-US.json
Normal file
3827
CleanMachineHMI/Lang/en-US.json
Normal file
File diff suppressed because it is too large
Load Diff
1872
CleanMachineHMI/Lang/zh-CN.json
Normal file
1872
CleanMachineHMI/Lang/zh-CN.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,9 @@ namespace CleanMachineHMI
|
||||
if (canCreateNew)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
//frmUtil.DB2Json();//语言字典从数据库转json
|
||||
GlobalHelper.LoadTheme();
|
||||
GlobalHelper.LoadzhCN();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
GlobalHelper.LoadAllFormData();
|
||||
Application.Run(GlobalHelper.LoginForm);
|
||||
|
||||
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.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 {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
@@ -8,6 +8,7 @@ using Krypton.Toolkit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
@@ -22,7 +23,7 @@ namespace CleanMachineHMI
|
||||
/// <summary>
|
||||
/// 主窗体_New
|
||||
/// </summary>
|
||||
public static frmMainNew MainFormNew{ get; set; }
|
||||
public static frmMainNew MainFormNew { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 登陆窗体
|
||||
@@ -44,7 +45,12 @@ 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>
|
||||
/// 用户信息
|
||||
@@ -77,7 +83,7 @@ namespace CleanMachineHMI
|
||||
public static List<WarningLog> CmWarningLogMd_List { get; set; }
|
||||
|
||||
public static List<WarningLog> CmWarningLogMd_List_1 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 参数列表
|
||||
/// </summary>
|
||||
@@ -131,8 +137,8 @@ namespace CleanMachineHMI
|
||||
public static string GetPalletCode()
|
||||
{
|
||||
string currDateStr = DateTime.Now.ToString("yyyyMMdd");
|
||||
string PalletIndexPrefix = AppConfigHelper.Get("PalletIndexPrefix");
|
||||
string PalletIndexDateMsg = AppConfigHelper.Get("PalletIndexDateMsg");
|
||||
string PalletIndexPrefix = AppConfigHelper.Get("PalletIndexPrefix");
|
||||
string PalletIndexDateMsg = AppConfigHelper.Get("PalletIndexDateMsg");
|
||||
int PalletIndexLen = Convert.ToInt32(AppConfigHelper.Get("PalletIndexLen"));
|
||||
int PalletIndexValue = Convert.ToInt32(AppConfigHelper.Get("PalletIndexValue"));
|
||||
if (currDateStr == PalletIndexDateMsg)
|
||||
@@ -155,7 +161,7 @@ namespace CleanMachineHMI
|
||||
/// 根据自定义特性和窗体的绑定原理,
|
||||
/// 自动加载所有的窗体数据。
|
||||
/// </summary>
|
||||
public static void LoadAllFormData()
|
||||
public static void LoadAllFormData()
|
||||
{
|
||||
var types = Assembly.GetExecutingAssembly().GetTypes().Where(x => x.GetCustomAttributes(typeof(FormTypeAttribute), false).Count() > 0);
|
||||
FrmModelList = new List<FormModel<Type>>();
|
||||
@@ -176,5 +182,47 @@ namespace CleanMachineHMI
|
||||
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";
|
||||
var str = File.ReadAllText(filePath);
|
||||
var lstLanguage = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
|
||||
var tmpThemeLanguage = new Dictionary<string, string>();
|
||||
lstLanguage.ForEach(item =>
|
||||
{
|
||||
if (item.options != null && item.options.Count > 0)
|
||||
{
|
||||
tmpThemeLanguage.Add(item.formCode + "|" + item.controlCode, string.Join(",", item.options));
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpThemeLanguage.Add(item.formCode + "|" + item.controlCode, item.controlName);
|
||||
}
|
||||
});
|
||||
ThemeLanguage = tmpThemeLanguage;
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadzhCN()
|
||||
{
|
||||
if (Utils.frmUtil.znCNLang == null || Utils.frmUtil.znCNLang.Count == 0)
|
||||
{
|
||||
var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
|
||||
var filePath = appPath + $"Lang\\zh-CN.json";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var str = File.ReadAllText(filePath);
|
||||
Utils.frmUtil.znCNLang = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,7 +809,6 @@ namespace CleanMachineHMI
|
||||
}
|
||||
private int wcsToPlcHeartDataNew = 0;
|
||||
private DateTime HeartbeatTime = new DateTime();
|
||||
private int ReConnNum = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 心跳处理
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
using Krypton.Navigator;
|
||||
using Krypton.Toolkit;
|
||||
using LeadDataBaseUtility;
|
||||
using Newtonsoft.Json;
|
||||
using NX_LogUtility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
@@ -19,6 +21,8 @@ namespace CleanMachineHMI.Utils
|
||||
/// </summary>
|
||||
public static class frmUtil
|
||||
{
|
||||
public static List<ThemeLanguage> znCNLang = new List<ThemeLanguage>();
|
||||
|
||||
/// <summary>
|
||||
/// 给一个字符串进行MD5加密
|
||||
/// </summary>
|
||||
@@ -116,22 +120,25 @@ namespace CleanMachineHMI.Utils
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// object 选择返回值
|
||||
/// 递归获取子控件
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="control"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetObjToString(this object obj)
|
||||
public static List<Control> GetAllControls(Control control)
|
||||
{
|
||||
if (obj == null)
|
||||
var list = new List<Control>();
|
||||
foreach (Control con in control.Controls)
|
||||
{
|
||||
return string.Empty;
|
||||
list.Add(con);
|
||||
if (con.Controls.Count > 0)
|
||||
{
|
||||
list.AddRange(GetAllControls(con));
|
||||
}
|
||||
}
|
||||
if (obj.ToString() == "")
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return obj.ToString();
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -139,56 +146,51 @@ namespace CleanMachineHMI.Utils
|
||||
/// </summary>
|
||||
/// <param name="form">窗体对象</param>
|
||||
/// <param name="languageCode">语言编码</param>
|
||||
public static void SetFormControlText(this Form form,string languageCode)
|
||||
public static void SetFormControlText(this Control form)
|
||||
{
|
||||
|
||||
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);
|
||||
var lstControls = GetAllControls(form);
|
||||
lstControls.Add(form);
|
||||
foreach (Control item in lstControls)
|
||||
{
|
||||
var key = form.Name + "|" + item.Name;
|
||||
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
AddzhCN(key, item.Text, "");
|
||||
if (item is KryptonGroupBox)
|
||||
{
|
||||
((KryptonGroupBox)item).Values.Heading = GlobalHelper.ThemeLanguage[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Text = GlobalHelper.ThemeLanguage[key];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
}
|
||||
}
|
||||
public static void SetFormControlText(this UserControl form, string languageCode)
|
||||
{
|
||||
|
||||
public static void SetSingleControlText(this Control form, Control control)
|
||||
{
|
||||
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);
|
||||
var key = form.Name + "|" + control.Name;
|
||||
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||
{
|
||||
control.Text = control.Name;
|
||||
}
|
||||
AddzhCN(key, control.Text, "");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 设定数据视图列文本
|
||||
/// </summary>
|
||||
/// <param name="dataGrid"></param>
|
||||
/// <param name="formName"></param>
|
||||
/// <param name="languageCode"></param>
|
||||
public static void SetDataViewColumnText(this DataGridView dataGrid ,string formName, string languageCode)
|
||||
{
|
||||
control.Text = GlobalHelper.ThemeLanguage[key];
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
var sql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL
|
||||
WHERE USED_FLAG = 1 AND DEL_FLAG = 0
|
||||
AND FORM_CODE='{formName}' AND LANGUAGE_CODE='{languageCode}' AND CONTROL_TYPE ='DataSource'";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
ErgodicColumnsText(dataGrid, dt);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -202,119 +204,27 @@ namespace CleanMachineHMI.Utils
|
||||
/// <param name="dataGrid"></param>
|
||||
/// <param name="formName"></param>
|
||||
/// <param name="languageCode"></param>
|
||||
public static DataTable GetInfoLanguageText(this Form form, string languageCode, string controlType = "Info")
|
||||
public static void SetDataViewColumnText(this DataGridView dataGrid, string formName)
|
||||
{
|
||||
|
||||
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];
|
||||
foreach (DataGridViewColumn item in dataGrid.Columns)
|
||||
{
|
||||
var key = formName + "|" + item.Name;
|
||||
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
AddzhCN(key, item.HeaderText, "");
|
||||
item.HeaderText = GlobalHelper.ThemeLanguage[key];
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
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>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static DataRow[] GetEqualSelectRow(this DataTable dataTable,string key,string value)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var likeSql = $"`{key}` = '{value}'";
|
||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
||||
return dataRow;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取包含查询行
|
||||
/// </summary>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static DataRow[] GetContainSelectRow(this DataTable dataTable, string key, string value)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
var likeSql = $"`{key}` like '%{value}%'";
|
||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
||||
return dataRow;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取信息文本
|
||||
@@ -322,20 +232,19 @@ namespace CleanMachineHMI.Utils
|
||||
/// <param name="dataTable"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetInfoText(this DataTable dataTable,string defaultValue,string key)
|
||||
public static string GetInfoText(this Control form, string defaultValue, string infoCode)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var likeSql = $"`CONTROL_CODE` = '{key}' and `CONTROL_TYPE` = 'Info'";
|
||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
||||
if (dataRow == null || !dataRow.Any())
|
||||
var key = form.Name + "|" + infoCode;
|
||||
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return dataRow[0]["CONTROL_NAME"].ToString();
|
||||
AddzhCN(key, defaultValue, "");
|
||||
return GlobalHelper.ThemeLanguage[key];
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -344,21 +253,28 @@ namespace CleanMachineHMI.Utils
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static string GetInfoText_1(this DataTable dataTable, string defaultValue, string key, string controlType)
|
||||
{
|
||||
|
||||
public static List<string> GetComBoboxItemArr(this Control form, string controlCode)
|
||||
{
|
||||
try
|
||||
{
|
||||
var likeSql = $"`CONTROL_CODE` = '{key}' and `CONTROL_TYPE` = '{controlType}'";
|
||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
||||
if (dataRow == null || !dataRow.Any())
|
||||
var key = form.Name + "|" + controlCode;
|
||||
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||
{
|
||||
return defaultValue;
|
||||
return new List<string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return dataRow[0]["CONTROL_NAME"].ToString();
|
||||
var control = (KryptonComboBox)form.Controls.Find(controlCode,true)[0];
|
||||
var str = "";
|
||||
foreach (var item in control.Items) {
|
||||
str += $"{item},";
|
||||
}
|
||||
|
||||
AddzhCN(key, "", string.IsNullOrEmpty(str) ? GlobalHelper.ThemeLanguage[key] : str.TrimEnd(new char[] { ',' }));
|
||||
return GlobalHelper.ThemeLanguage[key].Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -366,69 +282,104 @@ namespace CleanMachineHMI.Utils
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static DataRow[] GetComBoboxItemArr(this DataTable dataTable, string key, string controlType)
|
||||
{
|
||||
|
||||
public static void DB2Json()
|
||||
{
|
||||
var tmpThemeLanguage = new List<ThemeLanguage>();
|
||||
var table = LeadDbHelperSQLite.Query("SELECT FORM_CODE,CONTROL_CODE,CONTROL_NAME FROM SYS_LANGUAGE_CONTROL WHERE FORM_CODE <> 'frmMain'").Tables[0];
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
|
||||
var part = tmpThemeLanguage.FirstOrDefault(x => x.formCode == row["FORM_CODE"].ToString() && x.controlCode == row["CONTROL_CODE"].ToString());
|
||||
if (part == null)
|
||||
{
|
||||
tmpThemeLanguage.Add(new ThemeLanguage
|
||||
{
|
||||
formCode = row["FORM_CODE"].ToString(),
|
||||
controlCode = row["CONTROL_CODE"].ToString(),
|
||||
controlName = row["CONTROL_NAME"].ToString(),
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (part.options == null)
|
||||
{
|
||||
part.options = new List<string> { part.controlName, row["CONTROL_NAME"].ToString() };
|
||||
part.controlName = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
part.options.Add(row["CONTROL_NAME"].ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
var str1 = Newtonsoft.Json.JsonConvert.SerializeObject(tmpThemeLanguage);
|
||||
WriteLangFile("en.json", str1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写文本文件
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="txt"></param>
|
||||
private static void WriteLangFile(string fileName, string txt)
|
||||
{
|
||||
var fileDir = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0] + "Lang\\";
|
||||
try
|
||||
{
|
||||
var likeSql = $"`CONTROL_CODE` = '{key}' and `CONTROL_TYPE` = '{controlType}'";
|
||||
DataRow[] dataRow = dataTable.Select(likeSql);
|
||||
return dataRow;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 遍历控制界面
|
||||
/// </summary>
|
||||
/// <param name="container"></param>
|
||||
/// <param name="dataTable"></param>
|
||||
private static void ErgodicControlsText(Control container,DataTable dataTable)
|
||||
{
|
||||
for (int i = 0; i < dataTable.Rows.Count; i++)
|
||||
{
|
||||
Control[] tmpC = container.Controls.Find(dataTable.Rows[i]["CONTROL_CODE"].ToString(), true);
|
||||
if (tmpC.Length>0)
|
||||
if (!Directory.Exists(fileDir))//如果文件夹不存在,就新建一个文件夹。
|
||||
{
|
||||
if (tmpC[0] is KryptonGroupBox)
|
||||
{
|
||||
//Console.Write("模块名称"+ ((KryptonGroupBox)tmpC[0]).Values.Heading);
|
||||
//Console.Write("\r\n");
|
||||
((KryptonGroupBox)tmpC[0]).Values.Heading = dataTable.Rows[i]["CONTROL_NAME"].ToString();
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
//Console.Write("控件名称:"+ tmpC[0].Name+ ":控件中文名:" + tmpC[0].Text);
|
||||
//Console.Write("\r\n");
|
||||
tmpC[0].Text = dataTable.Rows[i]["CONTROL_NAME"].ToString();
|
||||
|
||||
Directory.CreateDirectory(fileDir);
|
||||
}
|
||||
File.WriteAllText(fileDir + fileName, txt);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 遍历数据视图控件
|
||||
/// </summary>
|
||||
/// <param name="dataGrid"></param>
|
||||
/// <param name="dataTable"></param>
|
||||
private static void ErgodicColumnsText(DataGridView dataGrid, DataTable dataTable)
|
||||
private static void AddzhCN(string key, string name, string options)
|
||||
{
|
||||
for(int k = 0; k < dataGrid.Columns.Count; k++)
|
||||
if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(options)) {
|
||||
Console.WriteLine(key+"空");
|
||||
return;
|
||||
}
|
||||
var codes = key.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (znCNLang.Any(x => x.formCode == codes[0] && x.controlCode == codes[1]))
|
||||
{
|
||||
for (int i = 0; i < dataTable.Rows.Count; i++)
|
||||
{
|
||||
if (dataGrid.Columns[k].Name == dataTable.Rows[i]["CONTROL_CODE"].ToString())
|
||||
{
|
||||
dataGrid.Columns[k].HeaderText = dataTable.Rows[i]["CONTROL_NAME"].ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
znCNLang.Add(new ThemeLanguage
|
||||
{
|
||||
formCode = codes[0],
|
||||
controlCode = codes[1],
|
||||
controlName = string.IsNullOrEmpty(options) ? name : null,
|
||||
options = string.IsNullOrEmpty(options) ? null : options.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList(),
|
||||
});
|
||||
var str1 = Newtonsoft.Json.JsonConvert.SerializeObject(znCNLang);
|
||||
WriteLangFile("zh-CN.json", str1);
|
||||
}
|
||||
}
|
||||
|
||||
public class ThemeLanguage
|
||||
{
|
||||
/// <summary>
|
||||
/// 窗体编码
|
||||
/// </summary>
|
||||
public string formCode { get; set; }
|
||||
/// <summary>
|
||||
/// 控件编码
|
||||
/// </summary>
|
||||
public string controlCode { get; set; }
|
||||
/// <summary>
|
||||
/// 控件名称
|
||||
/// </summary>
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string controlName { get; set; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<string> options { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,7 @@ namespace CleanMachineHMI.forms
|
||||
public frmBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
@@ -71,7 +66,7 @@ namespace CleanMachineHMI.forms
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
foreach (Control item in kryptonPanel1.Controls)
|
||||
{
|
||||
if (item.Tag != null && item.Tag.ToString() != "")
|
||||
@@ -91,7 +86,7 @@ namespace CleanMachineHMI.forms
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,14 +20,12 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddCleanCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -52,12 +50,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtCleanModeCode.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_CODE = '{txtCleanModeCode.Text}'";
|
||||
@@ -106,18 +104,18 @@ namespace CleanMachineHMI.frmChild
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
|
||||
frmCleanMode.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddContaminationDtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -46,7 +45,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
cmbContaminationType.DisplayMember = "Text";
|
||||
@@ -71,7 +70,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,17 +80,17 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (cmbContaminationType.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_DTL WHERE CONTAMINATION_TYPE_CODE = '{((ListItem)cmbContaminationType.SelectedItem).Value}' AND CONTAMINATION_DTL_CODE = '{txtContaminationDTLCode.Text}'";
|
||||
@@ -142,18 +141,18 @@ namespace CleanMachineHMI.frmChild
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "AddSuccessInfo"));
|
||||
frmContaminationDTL.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddContaminationType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -46,7 +45,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
cmbCleanMode.DisplayMember = "Text";
|
||||
@@ -71,7 +70,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,19 +80,19 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (cmbCleanMode.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入污染类型编码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入污染类型名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_TYPE WHERE CLEAN_MODE_CODE = '{((ListItem)cmbCleanMode.SelectedItem).Value}' AND CONTAMINATION_TYPE_CODE = '{txtContaminationTypeCode.Text}'";
|
||||
@@ -144,18 +143,18 @@ namespace CleanMachineHMI.frmChild
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据成功!", "AddSuccessInfo"));
|
||||
frmContaminationType.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddPlcItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -51,18 +47,18 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddPlcItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
@@ -87,25 +83,25 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入PLC编码");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入PLC名称");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择PLC类型");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择PLC数据类型");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||
return;
|
||||
}
|
||||
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
||||
@@ -206,19 +202,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("添加PLC变量数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
||||
frmPlcItemConfig.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("添加PLC变量数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddRole()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -46,13 +42,13 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddRole_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_roleGrade.SelectedIndex = 0;
|
||||
@@ -65,18 +61,18 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtRoleCode.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtRoleName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
return;
|
||||
}
|
||||
int roleGrade = 0;
|
||||
if (kcmb_roleGrade.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
return;
|
||||
}
|
||||
else if (kcmb_roleGrade.SelectedIndex == 1)
|
||||
@@ -85,7 +81,7 @@ namespace CleanMachineHMI.frmChild
|
||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
||||
return;
|
||||
}
|
||||
roleGrade = 100;
|
||||
@@ -143,18 +139,18 @@ namespace CleanMachineHMI.frmChild
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据成功!", "AddSuccessInfo"));
|
||||
frmRole.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddSheetType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -31,13 +29,13 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtSheetTypeCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入板材编码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材编码!", "EnterSheetTypeCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入板材编码!", "EnterSheetTypeCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入板材名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_CODE = '{txtSheetTypeCode.Text}'";
|
||||
@@ -87,19 +85,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("新增板材数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增板材数据成功!", "AddSuccessInfo"));
|
||||
frmSheetType.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("新增板材数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增板材数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +125,7 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddSheetType_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
kryptonPanel1.Focus();
|
||||
|
||||
}
|
||||
|
||||
@@ -21,11 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -52,13 +49,13 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddUser_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||
{
|
||||
cmbGender.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
}
|
||||
string sql = $"SELECT ROLE_ID,ROLE_CODE,ROLE_NAME FROM SYS_ROLE ";
|
||||
@@ -93,42 +90,42 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtAccount.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS1.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请确认用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (cmbGender.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择性别!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
return;
|
||||
}
|
||||
if (kcmb_Role.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择所属角色!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
||||
return;
|
||||
}
|
||||
if (txtPS1.Text != txtPS.Text)
|
||||
{
|
||||
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM SYS_USER WHERE USER_CODE = '{txtAccount.Text}'";
|
||||
@@ -187,19 +184,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("新增用户数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
||||
frmUser.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("新增用户数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddWaringMsg()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -51,13 +47,13 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddWaringMsg_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_WarningType.SelectedIndex = 0;
|
||||
@@ -71,19 +67,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入报警条码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtWarningName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入报警名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (kcmb_WarningType.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择报警类型!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||
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}'";
|
||||
@@ -139,20 +135,20 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("新增基础报警数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据成功!", "AddSuccessInfo"));
|
||||
// frmWarning.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("新增基础报警数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//KryptonMessageBox.Show(ex.Message);
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,14 +20,13 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditCleanCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string CleanModeId { get; set; }
|
||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
}
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -59,12 +58,12 @@ namespace CleanMachineHMI.frmChild
|
||||
txtCleanModeCode.Enabled = false;
|
||||
txtCleanModeName.Text = dt.Rows[0]["CLEAN_MODE_NAME"].ToString();
|
||||
}
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
kryptonPanel1.Focus();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtCleanModeName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入板材名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
|
||||
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}'";
|
||||
@@ -83,7 +82,7 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改清洗方式数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据成功!", "EditSuccessInfo"));
|
||||
|
||||
frmCleanMode.RefreshFrmHost();
|
||||
this.Close();
|
||||
@@ -91,12 +90,12 @@ namespace CleanMachineHMI.frmChild
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改清洗方式数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditContaminationDtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string ContaminationDtlId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -46,7 +44,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -80,7 +78,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,19 +89,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (cmbContaminationType.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择污染类型!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入污染明细编码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入污染明细名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
|
||||
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}'";
|
||||
@@ -111,19 +109,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改污染明细数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
|
||||
frmContaminationDTL.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改污染明细数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditContaminationType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -46,7 +45,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -81,7 +80,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,35 +90,35 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (cmbCleanMode.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationTypeCode.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtContaminationTypeName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo"));
|
||||
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}'";
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据成功!", "EditSuccessInfo"));
|
||||
frmContaminationType.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditParamater()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string ParamaterId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -43,7 +42,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"SELECT * FROM SYS_PARAMETER WHERE PARAMETER_ID = '{ParamaterId}'";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -56,7 +55,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +66,7 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtValue.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入参数值!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入参数值!", "EnterparamaterVlaueInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入参数值!", "EnterparamaterVlaueInfo"));
|
||||
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}'";
|
||||
@@ -75,19 +74,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改参数信息数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据成功!", "EditSuccessInfo"));
|
||||
frmParamater.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改参数信息数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditPlcItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string PlcItemId { get; set; }
|
||||
int modbusMinIndex = 0;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -53,18 +49,18 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
@@ -86,7 +82,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -106,25 +102,25 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入PLC编码");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入PLC名称");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择PLC类型");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择PLC数据类型");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
|
||||
return;
|
||||
}
|
||||
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
|
||||
@@ -182,19 +178,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("编辑PLC变量数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
|
||||
frmPlcItemConfig.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("编辑PLC变量数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditRole()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string RoleId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -47,13 +43,13 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_roleGrade.SelectedIndex = 0;
|
||||
@@ -78,7 +74,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,14 +85,14 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtRoleName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入角色名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
return;
|
||||
}
|
||||
int roleGrade = 0;
|
||||
if (kcmb_roleGrade.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择角色级别!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
return;
|
||||
}
|
||||
else if (kcmb_roleGrade.SelectedIndex == 1)
|
||||
@@ -119,19 +115,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改角色数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改角色数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改角色数据成功!", "EditSuccessInfo"));
|
||||
frmRole.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改角色数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改角色数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改角色数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditSheetType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string SheetTypeId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -46,7 +44,7 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"SELECT * FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_ID = '{SheetTypeId}'";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -59,7 +57,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +68,7 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtSheetTypeName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入板材名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo"));
|
||||
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}'";
|
||||
@@ -78,19 +76,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改板材数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据成功!", "EditSuccessInfo"));
|
||||
frmSheetType.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改板材数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑板材数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string UserId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -56,13 +52,13 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||
{
|
||||
cmbGender.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
}
|
||||
string sql1 = $"SELECT ROLE_ID,ROLE_CODE,ROLE_NAME FROM SYS_ROLE ";
|
||||
@@ -97,7 +93,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,36 +103,36 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtAccount.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS1.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请确认用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (cmbGender.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择性别!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
return;
|
||||
}
|
||||
if (txtPS1.Text != txtPS.Text)
|
||||
{
|
||||
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
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}'";
|
||||
@@ -144,19 +140,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改用户数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改用户数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改用户数据成功!", "EditSuccessInfo"));
|
||||
frmUser.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改用户数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改用户数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改用户数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditWaringMsg()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string WarningId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -54,13 +50,13 @@ namespace CleanMachineHMI.frmChild
|
||||
try
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_WarningType.SelectedIndex = 0;
|
||||
@@ -79,7 +75,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,19 +86,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (string.IsNullOrEmpty(txtWarningCode.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入报警条码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtWarningName.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入报警名称!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (kcmb_WarningType.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择报警类型!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo"));
|
||||
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}'";
|
||||
@@ -118,19 +114,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("修改基础报警数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改基础报警数据成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据成功!", "EditSuccessInfo"));
|
||||
//frmWarning.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("修改基础报警数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("修改基础报警数据失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,15 +20,14 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditWorkingPalletData()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string PalletCode { get; set; }
|
||||
private void frmEditWorkingPalletData_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"select * from VW_WORKING_PALLET_MSG where WORKING_PALLET_CODE = '{PalletCode}'";
|
||||
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
@@ -48,12 +47,12 @@ namespace CleanMachineHMI.frmChild
|
||||
kryptonDataGridView1.Rows[index].Cells[9].Value = item["INPUT_TIME"].ToString();
|
||||
}
|
||||
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
|
||||
kryptonDataGridView1.SetDataViewColumnText(this.Name);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +87,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,16 +18,15 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmSetRoleMenuPermission()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string RoleId { get; set; }
|
||||
DataTable allMenuData = new DataTable();
|
||||
private void frmSetRoleMenuPermission_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
string sql = $@"SELECT * FROM SYS_MENU";
|
||||
allMenuData = LeadDbHelperSQLite.Query(sql).Tables[0];
|
||||
if (allMenuData != null && allMenuData.Rows.Count > 0)
|
||||
@@ -77,7 +76,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,24 +207,24 @@ namespace CleanMachineHMI.frmChild
|
||||
if (rowSum > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("该角色菜单授权成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("该角色的菜单权限授权成功!", "EditSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权成功!", "EditSuccessInfo"));
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("该角色菜单授权失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("该角色的菜单权限授权失败!", "EditFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权失败!", "EditFailInfo"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("未选择任何菜单项,无法配置权限。");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,17 +18,15 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmSwitchRunDirection()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void frmSwitchRunDirection_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
int directNum = Convert.ToInt32(PlcOperationHelper.Instance.ReadPlcItem("DischargeDirectionSelection", PlcItemTypeDesc.D));
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
if (GlobalHelper.LanguageCode != "zh-CN")
|
||||
{
|
||||
if (directNum == 0)
|
||||
{
|
||||
@@ -70,7 +68,7 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +78,7 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (kcmb_SwitchRunDirection.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
|
||||
return;
|
||||
}
|
||||
if (!PlcOperationHelper.Instance.isConn)
|
||||
@@ -90,17 +88,17 @@ namespace CleanMachineHMI.frmChild
|
||||
}
|
||||
if (PlcOperationHelper.Instance.WritePlcItem("DischargeDirectionSelection", (kcmb_SwitchRunDirection.SelectedIndex - 1).ToString(), PlcItemTypeDesc.D))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,13 +24,9 @@ namespace CleanMachineHMI
|
||||
public frmIOMonitor_Old()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "Label");
|
||||
InitControl();
|
||||
}
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
bool isThRun = false;
|
||||
List<BtnPlcItemMonitor> lstMoitor_X = new List<BtnPlcItemMonitor>();
|
||||
List<BtnPlcItemMonitor> lstMoitor_Y = new List<BtnPlcItemMonitor>();
|
||||
@@ -171,14 +167,7 @@ namespace CleanMachineHMI
|
||||
int colSecondLocY = 8;
|
||||
|
||||
int panalTemplateWidth = 245;
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
{
|
||||
panalTemplateWidth = 245;
|
||||
}
|
||||
else
|
||||
{
|
||||
panalTemplateWidth = 175;
|
||||
}
|
||||
|
||||
int panalTemplateHeight = 30;
|
||||
|
||||
int wdNum = kryptonPanel2.Width / 2;
|
||||
@@ -212,7 +201,7 @@ namespace CleanMachineHMI
|
||||
KryptonLabel label1 = new KryptonLabel();
|
||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||
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);
|
||||
|
||||
panel.Controls.Add(label);
|
||||
panel.Controls.Add(button);
|
||||
@@ -247,7 +236,7 @@ namespace CleanMachineHMI
|
||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||
label1.Location = new Point(44, 6);
|
||||
//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);
|
||||
|
||||
panel.Controls.Add(label);
|
||||
panel.Controls.Add(button);
|
||||
@@ -295,14 +284,6 @@ namespace CleanMachineHMI
|
||||
int colSecondLocY = 8;
|
||||
|
||||
int panalTemplateWidth = 245;
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
{
|
||||
panalTemplateWidth = 245;
|
||||
}
|
||||
else
|
||||
{
|
||||
panalTemplateWidth = 175;
|
||||
}
|
||||
int panalTemplateHeight = 30;
|
||||
|
||||
int wdNum = kryptonPanel3.Width / 2;
|
||||
@@ -338,7 +319,7 @@ namespace CleanMachineHMI
|
||||
KryptonLabel label1 = new KryptonLabel();
|
||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||
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);
|
||||
|
||||
panel.Controls.Add(label);
|
||||
panel.Controls.Add(button);
|
||||
@@ -372,7 +353,7 @@ namespace CleanMachineHMI
|
||||
KryptonLabel label1 = new KryptonLabel();
|
||||
label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular);
|
||||
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);
|
||||
|
||||
panel.Controls.Add(label);
|
||||
panel.Controls.Add(button);
|
||||
|
||||
@@ -17,13 +17,9 @@ namespace CleanMachineHMI
|
||||
public frmIoMonitorNew()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "Label");
|
||||
}
|
||||
private object lockObj = new object();
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public const int WM_SYSCOMMAND = 0x112;
|
||||
public const int SC_MOVE = 0xF012;
|
||||
protected override void WndProc(ref Message m)
|
||||
@@ -179,7 +175,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
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);
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -196,7 +192,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
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);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -20,17 +20,11 @@ namespace CleanMachineHMI
|
||||
[FormType(EnumFormType.Login)]
|
||||
public partial class frmLogin : KryptonForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 页面信息语言文本列表
|
||||
/// </summary>
|
||||
private readonly DataTable _InfoLanguageTextList;
|
||||
|
||||
public frmLogin()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
}
|
||||
|
||||
private void Init()
|
||||
@@ -48,12 +42,12 @@ namespace CleanMachineHMI
|
||||
{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -64,17 +58,17 @@ namespace CleanMachineHMI
|
||||
var data = dt.Rows[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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
AppConfigHelper.Update("LastTimeUserCode",txtAccount.Text.Trim());
|
||||
@@ -107,7 +101,7 @@ namespace CleanMachineHMI
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace CleanMachineHMI
|
||||
public frmMainNew()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText_1(GlobalHelper.LanguageCode, "Info%");
|
||||
}
|
||||
|
||||
#region 全局变量
|
||||
@@ -62,8 +61,9 @@ namespace CleanMachineHMI
|
||||
if (isDefaultPage)
|
||||
{
|
||||
kryptonNavigator1.Pages[0].Controls.Clear();
|
||||
kryptonNavigator1.Pages[0].Text = enumFormType.ToString();
|
||||
//kryptonNavigator1.Pages[0].Text = enumFormType.ToString();
|
||||
kryptonNavigator1.Pages[0].Name = enumFormType.ToString();
|
||||
this.SetSingleControlText(kryptonNavigator1.Pages[0]);
|
||||
kryptonNavigator1.SelectedPage = kryptonNavigator1.Pages[0];
|
||||
if (frmType.BaseType.Name == "UserControl")
|
||||
{
|
||||
@@ -93,6 +93,7 @@ namespace CleanMachineHMI
|
||||
else
|
||||
{
|
||||
KryptonPage tmpPage1 = new KryptonPage { Text = enumFormType.ToString(), Name = enumFormType.ToString() };
|
||||
this.SetSingleControlText(tmpPage1);
|
||||
ButtonSpecAny bsa = new ButtonSpecAny();
|
||||
bsa.Style = PaletteButtonStyle.FormClose;
|
||||
bsa.Type = PaletteButtonSpecStyle.FormClose;
|
||||
@@ -145,7 +146,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
|
||||
|
||||
string sql1 = $@" SELECT * FROM BAS_PLC_ITEM ";
|
||||
@@ -186,7 +187,7 @@ namespace CleanMachineHMI
|
||||
bool isInitStatus = PlcOperationHelper.Instance.PlcInit();
|
||||
if (isInitStatus)
|
||||
{
|
||||
label3Professional.Text = _InfoLanguageTextList.GetInfoText_1("串口打开成功,PLC连接成功!", "label3Professional", "Info_Success");
|
||||
label3Professional.Text = this.GetInfoText("串口打开成功,PLC连接成功!", "label3Professional_Success");
|
||||
label3Professional.BackColor = Color.Lime;
|
||||
isPlcConnStatus = true;
|
||||
|
||||
@@ -233,7 +234,7 @@ namespace CleanMachineHMI
|
||||
else
|
||||
{
|
||||
//label3Professional.Text = "串口打开失败,PLC连接失败!";
|
||||
label3Professional.Text = _InfoLanguageTextList.GetInfoText_1("串口打开失败,PLC连接失败!", "label3Professional", "Info_Failed");
|
||||
label3Professional.Text = this.GetInfoText("串口打开失败,PLC连接失败!", "label3Professional_Failed");
|
||||
label3Professional.BackColor = Color.Red;
|
||||
isPlcConnStatus = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user