Commit 71e8ac1d LN

bug修改

1 个父辈 1e8ce892
...@@ -133,10 +133,10 @@ namespace SmartShelf.Common ...@@ -133,10 +133,10 @@ namespace SmartShelf.Common
{ {
try try
{ {
if (key.Equals("") || value.Equals("")) //if (key.Equals("") || value.Equals(""))
{ //{
return; // return;
} //}
//增加的内容写在appSettings段下 <add key="RegCode" value="0"/> //增加的内容写在appSettings段下 <add key="RegCode" value="0"/>
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
......
...@@ -91,6 +91,24 @@ namespace SmartShelf.Common ...@@ -91,6 +91,24 @@ namespace SmartShelf.Common
if (count > 0) if (count > 0)
{ {
string content = Encoding.UTF8.GetString(buffer, 0, count); string content = Encoding.UTF8.GetString(buffer, 0, count);
// GET / rest / api / v1 / shelf / posOn ? posId = 1_3_1@green; 1_3_2@green; 1_3_7@red HTTP/ 1.1
//Accept: text / html,application / xhtml + xml,application / xml; q = 0.9,*/*;q=0.8
//Accept-Language: zh-Hans-CN,zh-Hans;q=0.5
//Upgrade-Insecure-Requests: 1
//User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362
//Accept-Encoding: gzip, deflate
//Host: localhost
//Connection: Keep-Alive
//POST / rest / api / v1 / shelf / posOn HTTP / 1.1
//Content - Type: application / x - www - form - urlencoded; charset = UTF - 8
//Host: localhost
//Content - Length: 39
//Connection: Keep - Alive
//posId = 1_3_1@green; 1_3_2@green; 1_3_7@red
LogUtil.debug(content + "\n"); LogUtil.debug(content + "\n");
// 解析 content // 解析 content
......
...@@ -25,6 +25,8 @@ namespace SmartShelf.DeviceLibrary ...@@ -25,6 +25,8 @@ namespace SmartShelf.DeviceLibrary
internal LEDColorArtNet(string ip) : base(ip) internal LEDColorArtNet(string ip) : base(ip)
{ {
this.phyIP = ip; this.phyIP = ip;
phyAddr = "00";
if (!String.IsNullOrEmpty(LEDManager.DefaultIP) || LEDManager.ConnectionMode.Equals(1)) if (!String.IsNullOrEmpty(LEDManager.DefaultIP) || LEDManager.ConnectionMode.Equals(1))
{ {
try try
...@@ -42,15 +44,15 @@ namespace SmartShelf.DeviceLibrary ...@@ -42,15 +44,15 @@ namespace SmartShelf.DeviceLibrary
LogUtil.error("IP【" + ip + "】解析phyAddr出错:" + ex.ToString()); LogUtil.error("IP【" + ip + "】解析phyAddr出错:" + ex.ToString());
} }
} }
if (!String.IsNullOrEmpty(LEDManager.DefaultIP)) if (!String.IsNullOrEmpty(LEDManager.DefaultIP) && LEDManager.ConnectionMode.Equals(0))
{ {
iep = new IPEndPoint(IPAddress.Parse(LEDManager.DefaultIP), 6454); iep = new IPEndPoint(IPAddress.Parse(LEDManager.DefaultIP), 6454);
} }
else else
{ {
phyAddr = "00";
iep = new IPEndPoint(IPAddress.Parse(ip), 6454); iep = new IPEndPoint(IPAddress.Parse(ip), 6454);
} }
LogUtil.info(" LEDColorArtNet 初始化 IP ["+ phyIP + "] phyAddr["+phyAddr+ "] iep.Address [" + iep.Address+"]");
Max_Light = 170; Max_Light = 170;
Max_DMX = 16; Max_DMX = 16;
datalength = 512; datalength = 512;
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<add key="App_AutoRun" value="0"/> <add key="App_AutoRun" value="0"/>
<add key="App_Title" value="料架"/> <add key="App_Title" value="料架"/>
<!--服务器端口号--> <!--服务器端口号-->
<add key="ServerPort" value="" /> <add key="ServerPort" value="80" />
<!--服务器地址--> <!--服务器地址-->
<add key="HttpServerAddr" value="http://192.168.8.101:8080/" /> <!--<add key="HttpServerAddr" value="http://192.168.8.101:8080/" />-->
<!--料架灯类型,0=单色灯料架,1=三色灯料架,2=art-net--> <!--料架灯类型,0=单色灯料架,1=三色灯料架,2=art-net-->
<add key="DeviceLedType" value="2" /> <add key="DeviceLedType" value="2" />
<!--料仓库位配置文件--> <!--料仓库位配置文件-->
......
...@@ -44,10 +44,10 @@ namespace SmartShelf ...@@ -44,10 +44,10 @@ namespace SmartShelf
} }
i++; i++;
} }
cmbConMode.SelectedIndex = 0; comBoxColor.SelectedIndex = 0;
if (LEDManager.ConnectionMode.Equals(0)) if (LEDManager.ConnectionMode.Equals(0))
{ {
comBoxColor.SelectedIndex = 0; cmbConMode.SelectedIndex = 0;
} }
else else
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!