Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4f03e02f
由
几米阳光
编写于
2018-09-04 16:20:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
删除wcf代码
1 个父辈
b0473fa5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
73 行增加
和
83 行删除
ACSingleStore.sln
source/ACSingleStore/ACSingleStore.csproj
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/WCFControl.cs
ACSingleStore.sln
查看文件 @
4f03e02
...
...
@@ -15,8 +15,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserFromControl", "source\U
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "source\LoadCVSLibrary\LoadCSVLibrary.csproj", "{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcStoreWCF", "source\AcStoreWCF\AcStoreWCF.csproj", "{BC133455-A1C9-4202-8489-16458C7FA5E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -47,10 +45,6 @@ Global
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Debug|Any CPU.Build.0 = Debug|Any CPU
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Release|Any CPU.ActiveCfg = Release|Any CPU
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Release|Any CPU.Build.0 = Release|Any CPU
{BC133455-A1C9-4202-8489-16458C7FA5E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC133455-A1C9-4202-8489-16458C7FA5E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC133455-A1C9-4202-8489-16458C7FA5E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC133455-A1C9-4202-8489-16458C7FA5E5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
source/ACSingleStore/ACSingleStore.csproj
查看文件 @
4f03e02
...
...
@@ -101,7 +101,6 @@
<Compile Include="ManagerUtil.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WCFControl.cs" />
<EmbeddedResource Include="FrmAxisDebug.resx">
<DependentUpon>FrmAxisDebug.cs</DependentUpon>
</EmbeddedResource>
...
...
@@ -222,10 +221,6 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AcStoreWCF\AcStoreWCF.csproj">
<Project>{bc133455-a1c9-4202-8489-16458c7fa5e5}</Project>
<Name>AcStoreWCF</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
4f03e02
...
...
@@ -146,6 +146,7 @@
this
.
设备调试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
轴卡点动
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
扫码测试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
摄像机调试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
配置信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
轴运动配置
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -161,7 +162,6 @@
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
摄像机调试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -1656,35 +1656,35 @@
// 查看IOToolStripMenuItem
//
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
//
// 料仓运转ONToolStripMenuItem
//
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
//
// 料仓运转OFFToolStripMenuItem
//
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
//
// 打开舱门ToolStripMenuItem
//
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
打开舱门
ToolStripMenuItem
.
Text
=
"打开仓门"
;
this
.
打开舱门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开舱门
ToolStripMenuItem_Click
);
//
// 关闭仓门ToolStripMenuItem
//
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
关闭仓门
ToolStripMenuItem
.
Text
=
"关闭仓门"
;
this
.
关闭仓门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭仓门
ToolStripMenuItem_Click
);
//
...
...
@@ -1701,17 +1701,24 @@
// 轴卡点动ToolStripMenuItem
//
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
36
,
22
);
this
.
轴卡点动
ToolStripMenuItem
.
Text
=
"轴卡点动"
;
this
.
轴卡点动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
轴卡点动
ToolStripMenuItem_Click
);
//
// 扫码测试ToolStripMenuItem
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
36
,
22
);
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
//
// 摄像机调试ToolStripMenuItem
//
this
.
摄像机调试
ToolStripMenuItem
.
Name
=
"摄像机调试ToolStripMenuItem"
;
this
.
摄像机调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
136
,
22
);
this
.
摄像机调试
ToolStripMenuItem
.
Text
=
"摄像机调试"
;
this
.
摄像机调试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
摄像机调试
ToolStripMenuItem_Click
);
//
// 配置信息ToolStripMenuItem
//
this
.
配置信息
ToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
...
...
@@ -1724,7 +1731,7 @@
// 轴运动配置ToolStripMenuItem
//
this
.
轴运动配置
ToolStripMenuItem
.
Name
=
"轴运动配置ToolStripMenuItem"
;
this
.
轴运动配置
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
轴运动配置
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
36
,
22
);
this
.
轴运动配置
ToolStripMenuItem
.
Text
=
"轴运动配置"
;
this
.
轴运动配置
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
轴运动配置
ToolStripMenuItem_Click
);
//
...
...
@@ -1787,6 +1794,7 @@
this
.
groupBox6
.
TabIndex
=
269
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"WCF测试"
;
this
.
groupBox6
.
Visible
=
false
;
//
// btnOpenWCF
//
...
...
@@ -1850,13 +1858,6 @@
this
.
notifyIcon1
.
Text
=
"料仓客户端"
;
this
.
notifyIcon1
.
Visible
=
true
;
//
// 摄像机调试ToolStripMenuItem
//
this
.
摄像机调试
ToolStripMenuItem
.
Name
=
"摄像机调试ToolStripMenuItem"
;
this
.
摄像机调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
22
);
this
.
摄像机调试
ToolStripMenuItem
.
Text
=
"摄像机调试"
;
this
.
摄像机调试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
摄像机调试
ToolStripMenuItem_Click
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
4f03e02
...
...
@@ -260,17 +260,17 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg
.
Text
=
""
;
btnStartAuTo
.
Text
=
"开始自动出入库"
;
}
if
(
WCFControl
.
isRun
)
{
btnOpenWCF
.
Enabled
=
false
;
btnCloseWCF
.
Enabled
=
true
;
}
else
{
btnOpenWCF
.
Enabled
=
true
;
btnCloseWCF
.
Enabled
=
false
;
//
if (WCFControl.isRun)
//
{
//
btnOpenWCF.Enabled = false;
//
btnCloseWCF.Enabled = true;
//
}
//
else
//
{
//
btnOpenWCF.Enabled = true ;
//
btnCloseWCF.Enabled = false ;
}
//
}
}
private
void
ReadPosistion
()
...
...
@@ -1083,12 +1083,12 @@ namespace OnlineStore.ACSingleStore
private
void
btnOpenWCF_Click
(
object
sender
,
EventArgs
e
)
{
WCFControl
.
OpenWCF
();
//
WCFControl.OpenWCF();
}
private
void
btnCloseWCF_Click
(
object
sender
,
EventArgs
e
)
{
WCFControl
.
CloseWCF
();
//
WCFControl.CloseWCF();
}
private
void
chbAuto_CheckedChanged
(
object
sender
,
EventArgs
e
)
...
...
@@ -1132,7 +1132,7 @@ namespace OnlineStore.ACSingleStore
KNDManager
.
CloseAllDO
();
StoreOpenStatus
(
false
);
KNDManager
.
CloseAllConnection
();
WCFControl
.
CloseWCF
();
//
WCFControl.CloseWCF();
System
.
Environment
.
Exit
(
System
.
Environment
.
ExitCode
);
}
catch
(
Exception
ex
)
...
...
source/ACSingleStore/WCFControl.cs
查看文件 @
4f03e02
...
...
@@ -11,49 +11,49 @@ namespace OnlineStore.ACSingleStore
{
public
class
WCFControl
{
public
static
bool
isRun
=
false
;
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
private
static
ServiceHost
host
=
null
;
public
static
void
OpenWCF
()
{
if
(
isRun
)
{
return
;
}
try
{
if
(
host
==
null
)
{
host
=
new
ServiceHost
(
typeof
(
AcStoreWCF
.
CWSMDBox
));
}
if
(
host
.
State
!=
CommunicationState
.
Opening
)
{
host
.
Open
();
}
isRun
=
true
;
LogUtil
.
info
(
"打开WCF服务成功"
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"打开WCF服务出错:"
+
ex
.
ToString
());
}
}
//
public static bool isRun=false;
//
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//
private static ServiceHost host = null;
//
public static void OpenWCF()
//
{
//
if (isRun)
//
{
//
return;
//
}
//
try
//
{
//
if (host == null)
//
{
//
host = new ServiceHost(typeof(AcStoreWCF.CWSMDBox));
//
}
//
if (host.State != CommunicationState.Opening)
//
{
//
host.Open();
//
}
//
isRun = true;
//
LogUtil.info("打开WCF服务成功");
//
}
//
catch (Exception ex)
//
{
//
LogUtil.error("打开WCF服务出错:" + ex.ToString());
//
}
//
}
public
static
void
CloseWCF
()
{
try
{
isRun
=
false
;
if
(
host
!=
null
)
{
host
.
Close
();
}
LogUtil
.
info
(
"关闭WCF服务成功"
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"关闭WCF服务出错:"
+
ex
.
ToString
());
}
}
//
public static void CloseWCF()
//
{
//
try
//
{
//
isRun = false;
//
if (host != null)
//
{
//
host.Close();
//
}
//
LogUtil.info("关闭WCF服务成功");
//
}
//
catch (Exception ex)
//
{
//
LogUtil.error("关闭WCF服务出错:" + ex.ToString());
//
}
//
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论