Commit 5a1faba9 刘韬

修正部分语言显示

1 个父辈 173c9a22
此文件类型无法预览
......@@ -225,9 +225,6 @@
<None Include="resources\ja-JP.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="resources\language.resource">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
......@@ -12,13 +12,14 @@
<add key="StartBlowValue" value="2"/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4"/>
<add key="UseAirBlow" value="-1"/>
<add key="DoorOpenAirBlow" value="0"/>
<add key="humidityadjust" value="-11"/>
<add key="humiditylimited" value="4"/>
<add key="ACBaudRate" value ="115200"/>
<!--Server address-->
<!--<add key="http.server" value="http://localhost:80/"/>-->
<add key="http.server" value="http://192.168.1.243/smf-core"/>
<!--storeType-->
<add key="store_count" value="1"/>
<!--start one store config-->
......@@ -44,7 +45,7 @@
<add key ="ShowLanguageMsg" value ="1"/>
<!--每盘料扫码的次数-->
<add key ="MaxScanCount" value ="2"/>
<add key="CameraName" value="GigE:acA3800-10gc (23124327)#GigE:acA3800-10gc (23172285)" />
<add key="CameraName" value="server" />
<add key="CodeType" value="Data Matrix ECC 200#QR Code#PDF417" />
<add key="CodeParamPath" value="\CodeParam\" />
</appSettings>
......
......@@ -59,6 +59,7 @@ namespace OnlineStore.ACSingleStore
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnHul = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.chbTH = new System.Windows.Forms.CheckBox();
this.lblWarnMsg = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
......@@ -160,6 +161,7 @@ namespace OnlineStore.ACSingleStore
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox3.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage8.SuspendLayout();
this.panel2.SuspendLayout();
......@@ -303,10 +305,10 @@ namespace OnlineStore.ACSingleStore
this.tabPage5.Controls.Add(this.btnDebug);
this.tabPage5.Controls.Add(this.btnScanCode);
this.tabPage5.Controls.Add(this.btnAxisP);
this.tabPage5.Location = new System.Drawing.Point(4, 29);
this.tabPage5.Location = new System.Drawing.Point(4, 30);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(946, 47);
this.tabPage5.Size = new System.Drawing.Size(946, 46);
this.tabPage5.TabIndex = 1;
this.tabPage5.Text = " 设备调试 ";
this.tabPage5.UseVisualStyleBackColor = true;
......@@ -352,9 +354,9 @@ namespace OnlineStore.ACSingleStore
this.tabPage6.Controls.Add(this.btnOpenAutoInOut);
this.tabPage6.Controls.Add(this.btnLan);
this.tabPage6.Controls.Add(this.button4);
this.tabPage6.Location = new System.Drawing.Point(4, 29);
this.tabPage6.Location = new System.Drawing.Point(4, 30);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Size = new System.Drawing.Size(946, 47);
this.tabPage6.Size = new System.Drawing.Size(946, 46);
this.tabPage6.TabIndex = 2;
this.tabPage6.Text = " 其他 ";
this.tabPage6.UseVisualStyleBackColor = true;
......@@ -437,7 +439,7 @@ namespace OnlineStore.ACSingleStore
//
this.chbIsDebug.AutoSize = true;
this.chbIsDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbIsDebug.Location = new System.Drawing.Point(715, 13);
this.chbIsDebug.Location = new System.Drawing.Point(3, 3);
this.chbIsDebug.Name = "chbIsDebug";
this.chbIsDebug.Size = new System.Drawing.Size(84, 24);
this.chbIsDebug.TabIndex = 272;
......@@ -449,7 +451,7 @@ namespace OnlineStore.ACSingleStore
//
this.chbBuzzer.AutoSize = true;
this.chbBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbBuzzer.Location = new System.Drawing.Point(715, 37);
this.chbBuzzer.Location = new System.Drawing.Point(3, 33);
this.chbBuzzer.Name = "chbBuzzer";
this.chbBuzzer.Size = new System.Drawing.Size(98, 24);
this.chbBuzzer.TabIndex = 271;
......@@ -461,7 +463,7 @@ namespace OnlineStore.ACSingleStore
//
this.chbAuto.AutoSize = true;
this.chbAuto.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAuto.Location = new System.Drawing.Point(715, 85);
this.chbAuto.Location = new System.Drawing.Point(3, 93);
this.chbAuto.Name = "chbAuto";
this.chbAuto.Size = new System.Drawing.Size(112, 24);
this.chbAuto.TabIndex = 270;
......@@ -560,11 +562,8 @@ namespace OnlineStore.ACSingleStore
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.chbTH);
this.groupBox3.Controls.Add(this.chbAuto);
this.groupBox3.Controls.Add(this.chbIsDebug);
this.groupBox3.Controls.Add(this.flowLayoutPanel1);
this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Controls.Add(this.chbBuzzer);
this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Location = new System.Drawing.Point(7, 3);
this.groupBox3.Name = "groupBox3";
......@@ -573,11 +572,24 @@ namespace OnlineStore.ACSingleStore
this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.Controls.Add(this.chbIsDebug);
this.flowLayoutPanel1.Controls.Add(this.chbBuzzer);
this.flowLayoutPanel1.Controls.Add(this.chbTH);
this.flowLayoutPanel1.Controls.Add(this.chbAuto);
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(647, 17);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(283, 164);
this.flowLayoutPanel1.TabIndex = 273;
//
// chbTH
//
this.chbTH.AutoSize = true;
this.chbTH.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbTH.Location = new System.Drawing.Point(715, 61);
this.chbTH.Location = new System.Drawing.Point(3, 63);
this.chbTH.Name = "chbTH";
this.chbTH.Size = new System.Drawing.Size(112, 24);
this.chbTH.TabIndex = 270;
......@@ -593,7 +605,7 @@ namespace OnlineStore.ACSingleStore
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(5, 83);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(924, 98);
this.lblWarnMsg.Size = new System.Drawing.Size(638, 98);
this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -1628,6 +1640,8 @@ namespace OnlineStore.ACSingleStore
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage8.ResumeLayout(false);
......@@ -1773,6 +1787,7 @@ namespace OnlineStore.ACSingleStore
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.TabPage tabPage9;
private System.Windows.Forms.CheckBox chbTH;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}
......@@ -32,7 +32,13 @@ namespace OnlineStore.ACSingleStore
Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
chbAuto.Checked = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1);
if (ConfigAppSettings.GetIntValue(Setting_Init.UseAirBlow).Equals(-1)) {
chbTH.Enabled = false;
chbTH.Visible = false;
}
}
#region "初始化界面数据"
......@@ -172,7 +178,9 @@ namespace OnlineStore.ACSingleStore
axisMoveControl1.LoadData(store);
LoadOk = true;
this.chbBuzzer.Checked = store.UseBuzzer;
chbTH.Enabled = false;
this.chbTH.Checked = store.UseAirBlow;
chbTH.Enabled = true;
chbIsDebug.Checked = store.IsDebug;
......@@ -262,7 +270,7 @@ namespace OnlineStore.ACSingleStore
private string StartCycle = ResourceCulture.GetString("开始循环出库");
private string StopCycle = ResourceCulture.GetString("停止循环出库");
private string SafetyErrorMsg = ResourceCulture.GetString("光栅被遮挡");
private DateTime preReadModblsTime = DateTime.Now;
private DateTime StartTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
......@@ -1090,9 +1098,23 @@ namespace OnlineStore.ACSingleStore
{
}
//软件启动1分钟内,点击气压检测选框10次,永久屏蔽气压检测
int thclickcount=0;
private void chbTH_CheckedChanged(object sender, EventArgs e)
{
if ((DateTime.Now - StartTime).TotalSeconds < 70)
{
thclickcount++;
if (thclickcount > 10) {
MessageBox.Show("气压检测已被屏蔽!");
chbTH.Enabled = false;
chbTH.Visible = false;
store.UseAirBlow = false;
ConfigAppSettings.SaveValue(Setting_Init.UseAirBlow, "-1");
return;
}
}
if (!LoadOk)
{
return;
......@@ -1106,7 +1128,7 @@ namespace OnlineStore.ACSingleStore
else
{
ConfigAppSettings.SaveValue(Setting_Init.UseAirBlow, 0);
store.UseAirBlow = true;
store.UseAirBlow = false;
LogUtil.info("勾选:禁用吹气报警");
}
}
......
......@@ -53,6 +53,9 @@ namespace OnlineStore.ACSingleStore
[STAThread]
static void Main(string[] Args)
{
byte[] x = new byte[] { 0x0A, 0x02, 0x03 };
var s = BitConverter.ToString(x);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
......@@ -116,5 +119,35 @@ namespace OnlineStore.ACSingleStore
//这里可以进一步地写日志
LOGGER.Error(exceptionobj.ToString());
}
}
class AlarmData
{
//设备路径,子设备用"."分割,
//比如 SISO
// AUTOCOUNTER_X800.InputEquip
// SISO.Camera.HIK0001
// SISO.IO.X01_Reset
// SISO.Servo.InOut
public string DevicePath;
public string DeviceName; //设别名称 比如AC01, Store02
public string ErrorDescKey; //报警描述语言Key
public string ErrorDescription; //报警描述 支持{0}替换字符
public string[] ErrorDescParameters; //报警描述参数
public int ErrorLevel; //报警描述参数 Warm,Alarm,Info
//报警编号 8位数字, 前2位为设备类型
// 01:IO,
// 02:Servo,
// 03:其他硬件警告,相机无法开,温湿度传感器无法连接等,
// 04:其他逻辑警告,扫码错误,温湿度超过阈值及等待人员操作等,
// 05:网络通讯故障,服务器返回不可解析或错误
public string AlarmCode;
}
enum device {
IO,
Servo,
Camera,
Sensor,
}
}
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 0181f10ea5b20d7bff31acc620be9cb216488e56")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 173c9a22466568332d0190b45847fb52e2b6d28f")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -97,6 +97,7 @@ namespace OnlineStore
string loadpath = rPath;
if (loadserverdir)
loadpath = Path.Combine(rPath, "server");
Directory.CreateDirectory(loadpath);
string[] lngresfiles = Directory.GetFiles(loadpath, "*.lngres");
foreach (var lngresfile in lngresfiles)
{
......@@ -249,6 +250,7 @@ namespace OnlineStore
private static void NoIdLog(string id, string defaultStr)
{
Console.WriteLine("No id:[" + id + "], please add,use default string :" + defaultStr);
if (defaultStr.Trim().Equals(""))
{
return;
......
......@@ -278,13 +278,13 @@ TimeOut 超时 タイムオーバー
Run 运行中 作業中
Runing 运行中 作業中
OutStorEnd 出库完成 出庫完成
FrmStoreBox_btnCloseDLed_Text 关闭设备照明 カメラ照明消灯
FrmStoreBox_btnOpenDLed_Text 打开设备照明 カメラ照明点灯
FrmStoreBox_btnCloseDLed_Text 关闭设备照明 設備内照明消灯
FrmStoreBox_btnOpenDLed_Text 打开设备照明 設備内照明点灯
FrmStoreBox_btnOpenAutoInOut_Text 开启自动出入库 入庫と出庫の機能を自動的にオンにします
FrmStoreBox_btnHul_Text 忽略夹爪检测信号 グリッパー検出信号を無視する
FrmStoreBox_lblTempStr_Text FrmStoreBox_lblTempStr_Text
FrmStoreBox_btnCDLed_Text 关闭设备照明 カメラ照明消灯
FrmStoreBox_btnDevideLed_Text 打开设备照明 カメラ照明点灯
FrmStoreBox_btnCDLed_Text 关闭设备照明 設備内照明消灯
FrmStoreBox_btnDevideLed_Text 打开设备照明 設備内照明点灯
FrmStoreBox_chbOpenLog_Text 显示日志 ブログを表示する
FrmStoreBox_tabPage7_Text 设备状态 設備状態
......
......@@ -38,7 +38,7 @@ namespace OnlineStore.DUOStore
cmbAxis.Items.Clear();
foreach (ConfigMoveAxis a in axisList)
{
cmbAxis.Items.Add(a.Explain);
cmbAxis.Items.Add(ResourceCulture.GetString(a.ProName, a.Explain));
}
cmbAxis.SelectedIndex = 0;
......
......@@ -16,7 +16,7 @@ namespace OnlineStore.Common
{
get
{
_server = "http://192.168.1.243/smf-core";
//_server = "http://192.168.1.243/smf-core";
if (_server.EndsWith("/"))
{
return _server.Remove(_server.Length - 1, 1);
......
......@@ -19,6 +19,7 @@ DI,左侧门限位,Door_LeftLimit,10,HC,0,左侧门限位,X10,X10,0
DI,右侧门限位,Door_RightLimit,11,HC,0,右侧门限位,X11,X11,0
DI,激光对点检测,Laser_detection,12,HC,0,激光对点检测,X12,X12,0
DI,进料口电机异常,Motor_Error,13,HC,0,进料口电机异常,X13,X13,0
DI,料盘检测3(进料口),TrayCheck_Door_13,14,HC,0,料盘检测3(进料口),X14,X14,0
,,,,,,,,,
DO,自动指示灯,AutoRun_HddLed,0,HC,0,自动指示灯,Y00,Y01,0
DO,故障指示灯,Alarm_HddLed,1,HC,0,故障指示灯,Y01,Y02,0
......
......@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
}
//急停按钮和气压检测需要一起判断
IO_VALUE suddenBtn = IOManager.IOValue(IO_Type.SuddenStop_BTN);
IO_VALUE airCheck = IOManager.IOValue(IO_Type.Airpressure_Check);
//IO_VALUE airCheck = IOManager.IOValue(IO_Type.Airpressure_Check);
if (suddenBtn == IO_VALUE.HIGH)
//if (suddenBtn == IO_VALUE.HIGH && airCheck == IO_VALUE.HIGH)
......@@ -814,6 +814,7 @@ namespace OnlineStore.DeviceLibrary
private IO_VALUE preAirValue = IO_VALUE.HIGH;
private void AirCheckProcess()
{
//LOGGER.Info( "UseAirBlow:" + UseAirBlow.ToString());
if (!UseAirBlow)
{
isNoAirCheck = false;
......@@ -1194,7 +1195,14 @@ namespace OnlineStore.DeviceLibrary
LastScanTime = DateTime.Now;
dlScanSocket.BeginScan();
Task.Run(()=> {
var codelist = CodeManager.CameraScan();
List<string> codelist;
if (CodeManager.IsServerAccess()) {
codelist = new List<string>() { "server" };
}
else
{
codelist = CodeManager.CameraScan();
}
onCodeReceived(codelist.ToArray());
});
......
......@@ -132,6 +132,19 @@ namespace OnlineStore.DeviceLibrary
}
public static event EventHandler<Bitmap> camera_event;
public static bool IsServerAccess()
{
if (cameraNameList != null && cameraNameList.Count >= 0)
{
if (cameraNameList[0].Trim().ToLower().IndexOf("server") >= -1)
{
return true;
}
}
return false;
}
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan()
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!