Commit 3d5d7ae7 张东亮

翻译

1 个父辈 d45702e0
......@@ -148,7 +148,7 @@ namespace DeviceLibrary
LogUtil.info(JsonHelper.SerializeObject(operation));
if (RobotManage.InoutDebugMode)
return true;
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 5000);
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 5000,true);
if (resultOperation == null)
{
......@@ -164,12 +164,12 @@ namespace DeviceLibrary
LogUtil.info($"SendStoreState success,posid:{posid}, storeStatus:{storeStatus}");
ResultProcess(resultOperation);
//if (storeStatus == StoreStatus.OutStoreEnd ||
// storeStatus == StoreStatus.OutStoreBoxEnd ||
// storeStatus == StoreStatus.InStoreEnd)
//{
// this.storeStatus = StoreStatus.StoreOnline;
//}
if (storeStatus == StoreStatus.OutStoreEnd ||
storeStatus == StoreStatus.OutStoreBoxEnd ||
storeStatus == StoreStatus.InStoreEnd)
{
this.storeStatus = StoreStatus.StoreOnline;
}
}
return true;
}
......@@ -290,6 +290,7 @@ namespace DeviceLibrary
}
int getthtime = 0;
int laststatus = 0;
public static string ServerCommStr = "";
public void SendLineStatus()
{
if (RobotManage.InoutDebugMode)
......@@ -329,6 +330,7 @@ namespace DeviceLibrary
{
LogUtil.info(StoreName + "TimerProcess[" + span.TotalMilliseconds + "]");
}
ServerCommStr = $"Send:{JsonHelper.SerializeObject(lineOperation)}\r\n Recv:{JsonHelper.SerializeObject(resultOperation)}";
}
}
public int queueTaskCount = -1;
......
......@@ -8,9 +8,10 @@ using System.Threading.Tasks;
namespace DeviceLibrary
{
partial class ServerCommunication
public partial class ServerCommunication
{
Dictionary<string, string> AgvStatus() {
Dictionary<string, string> AgvStatus()
{
Dictionary<string, string> status = new Dictionary<string, string>();
status["X16"] = IOManager.GetDIValue("", 0, 16).Equals(IO_VALUE.HIGH) ? "1" : "0";
status["X27"] = IOManager.GetDIValue("", 0, 27).Equals(IO_VALUE.HIGH) ? "1" : "0";
......@@ -27,7 +28,7 @@ namespace DeviceLibrary
{
bool v;
//紧急料口 1开门 0关门
if (YDataCheck(dataMap, "Y10", out v)|| YDataCheck(dataMap, "Y11", out v))
if (YDataCheck(dataMap, "Y10", out v) || YDataCheck(dataMap, "Y11", out v))
{
if (v)
RobotManage.mainMachine.SingleDoor.ToHigh(null);
......@@ -35,7 +36,7 @@ namespace DeviceLibrary
RobotManage.mainMachine.SingleDoor.ToLow(null);
}
//折叠门 1开门 0关门
if (YDataCheck(dataMap, "Y15", out v)|| YDataCheck(dataMap, "Y14", out v))
if (YDataCheck(dataMap, "Y15", out v) || YDataCheck(dataMap, "Y14", out v))
{
if (v)
RobotManage.mainMachine.StringDoorOpen(null);
......@@ -60,7 +61,8 @@ namespace DeviceLibrary
}
}
Dictionary<string, int> LastSingnalSeq = new Dictionary<string, int>();
bool YDataCheck(Dictionary<string, string> dataMap, string key, out bool value) {
bool YDataCheck(Dictionary<string, string> dataMap, string key, out bool value)
{
value = false;
if (!dataMap.TryGetValue(key, out string v))
return false;
......@@ -82,7 +84,7 @@ namespace DeviceLibrary
v = v.Trim().ToLower();
LogUtil.info($"YDataCheck:{key},value:{v}");
if (v == "open")
{
{
value = true;
return true;
}
......
......@@ -39,6 +39,7 @@ namespace TheMachine
this.tp = new System.Windows.Forms.TableLayoutPanel();
this.cb_usefixpos = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tp.SuspendLayout();
this.SuspendLayout();
......@@ -47,10 +48,10 @@ namespace TheMachine
//
this.chbAutoRun.AutoSize = true;
this.tp.SetColumnSpan(this.chbAutoRun, 2);
this.chbAutoRun.Location = new System.Drawing.Point(10, 214);
this.chbAutoRun.Location = new System.Drawing.Point(10, 175);
this.chbAutoRun.Margin = new System.Windows.Forms.Padding(10);
this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(174, 32);
this.chbAutoRun.Size = new System.Drawing.Size(104, 19);
this.chbAutoRun.TabIndex = 1;
this.chbAutoRun.Text = "开机自启动";
this.chbAutoRun.UseVisualStyleBackColor = true;
......@@ -59,10 +60,10 @@ namespace TheMachine
//
this.cb_tempsensorport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_tempsensorport.FormattingEnabled = true;
this.cb_tempsensorport.Location = new System.Drawing.Point(276, 6);
this.cb_tempsensorport.Location = new System.Drawing.Point(161, 6);
this.cb_tempsensorport.Margin = new System.Windows.Forms.Padding(6);
this.cb_tempsensorport.Name = "cb_tempsensorport";
this.cb_tempsensorport.Size = new System.Drawing.Size(121, 35);
this.cb_tempsensorport.Size = new System.Drawing.Size(121, 23);
this.cb_tempsensorport.TabIndex = 2;
this.cb_tempsensorport.Tag = "not";
//
......@@ -73,7 +74,7 @@ namespace TheMachine
this.label_tempsensor.Location = new System.Drawing.Point(10, 10);
this.label_tempsensor.Margin = new System.Windows.Forms.Padding(10);
this.label_tempsensor.Name = "label_tempsensor";
this.label_tempsensor.Size = new System.Drawing.Size(250, 28);
this.label_tempsensor.Size = new System.Drawing.Size(135, 15);
this.label_tempsensor.TabIndex = 3;
this.label_tempsensor.Text = "温湿度控制器端口:";
this.label_tempsensor.TextAlign = System.Drawing.ContentAlignment.TopRight;
......@@ -81,7 +82,7 @@ namespace TheMachine
// button_positiontool
//
this.tp.SetColumnSpan(this.button_positiontool, 2);
this.button_positiontool.Location = new System.Drawing.Point(10, 106);
this.button_positiontool.Location = new System.Drawing.Point(10, 80);
this.button_positiontool.Margin = new System.Windows.Forms.Padding(10);
this.button_positiontool.Name = "button_positiontool";
this.button_positiontool.Size = new System.Drawing.Size(181, 36);
......@@ -94,10 +95,10 @@ namespace TheMachine
//
this.lbl_hmdstate.AutoSize = true;
this.tp.SetColumnSpan(this.lbl_hmdstate, 2);
this.lbl_hmdstate.Location = new System.Drawing.Point(10, 58);
this.lbl_hmdstate.Location = new System.Drawing.Point(10, 45);
this.lbl_hmdstate.Margin = new System.Windows.Forms.Padding(10);
this.lbl_hmdstate.Name = "lbl_hmdstate";
this.lbl_hmdstate.Size = new System.Drawing.Size(124, 28);
this.lbl_hmdstate.Size = new System.Drawing.Size(67, 15);
this.lbl_hmdstate.TabIndex = 5;
this.lbl_hmdstate.Tag = "not";
this.lbl_hmdstate.Text = "当前状态";
......@@ -132,17 +133,17 @@ namespace TheMachine
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.Size = new System.Drawing.Size(540, 256);
this.tp.Size = new System.Drawing.Size(310, 204);
this.tp.TabIndex = 6;
//
// cb_usefixpos
//
this.cb_usefixpos.AutoSize = true;
this.tp.SetColumnSpan(this.cb_usefixpos, 2);
this.cb_usefixpos.Location = new System.Drawing.Point(10, 162);
this.cb_usefixpos.Location = new System.Drawing.Point(10, 136);
this.cb_usefixpos.Margin = new System.Windows.Forms.Padding(10);
this.cb_usefixpos.Name = "cb_usefixpos";
this.cb_usefixpos.Size = new System.Drawing.Size(202, 32);
this.cb_usefixpos.Size = new System.Drawing.Size(119, 19);
this.cb_usefixpos.TabIndex = 6;
this.cb_usefixpos.Text = "启用校准库位";
this.cb_usefixpos.UseVisualStyleBackColor = true;
......@@ -158,6 +159,14 @@ namespace TheMachine
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 325);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(989, 397);
this.label1.TabIndex = 9;
this.label1.Text = "label1";
//
// uC_SetUserPassword1
//
this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -166,10 +175,12 @@ namespace TheMachine
this.uC_SetUserPassword1.Name = "uC_SetUserPassword1";
this.uC_SetUserPassword1.Size = new System.Drawing.Size(405, 272);
this.uC_SetUserPassword1.TabIndex = 8;
this.uC_SetUserPassword1.Tag = "not";
//
// SettingControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.label1);
this.Controls.Add(this.uC_SetUserPassword1);
this.Controls.Add(this.button1);
this.Controls.Add(this.tp);
......@@ -194,5 +205,6 @@ namespace TheMachine
private System.Windows.Forms.CheckBox cb_usefixpos;
private System.Windows.Forms.Button button1;
private UC_SetUserPassword uC_SetUserPassword1;
private System.Windows.Forms.Label label1;
}
}
......@@ -117,7 +117,7 @@ namespace TheMachine
{
if (!Visible)
return;
label1.Text = ServerCommunication.ServerCommStr;
lbl_hmdstate.Text = crc.GetString(L.current_status, "当前状态:");
if (!HumitureController.IsRun)
{
......
......@@ -224,6 +224,15 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="resources\en-US.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="resources\ja-JP.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="resources\zh-CN.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
......@@ -246,6 +255,7 @@
<Content Include="icon.ico" />
<Content Include="更新记录.txt" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
......
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -12,13 +13,36 @@ using System.Windows.Forms;
namespace TheMachine
{
using crc = OnlineStore.CodeResourceControl;
public partial class UC_SetUserPassword : UserControl
{
public UC_SetUserPassword()
{
InitializeComponent();
crc.GetLanguageEvent += Crc_GetLanguageEvent;
OnlineStore.CodeResourceControl.LanguageProcess(this);
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
}
private string Crc_GetLanguageEvent()
{
return ConfigHelper.Config.Get("Device_Default_Language", "zh-CN");
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
if (!this.Created)
return;
OnlineStore.CodeResourceControl.LanguageProcess(this);
this.Invoke((EventHandler)delegate
{
});
}
private void button_ok_Click(object sender, EventArgs e)
{
if (textBox_oldpwd.Text != Setting_Init.User_AdminPassword)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!