Commit 4f03e02f 几米阳光

删除wcf代码

1 个父辈 b0473fa5
...@@ -15,8 +15,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserFromControl", "source\U ...@@ -15,8 +15,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserFromControl", "source\U
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "source\LoadCVSLibrary\LoadCSVLibrary.csproj", "{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "source\LoadCVSLibrary\LoadCSVLibrary.csproj", "{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcStoreWCF", "source\AcStoreWCF\AcStoreWCF.csproj", "{BC133455-A1C9-4202-8489-16458C7FA5E5}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -47,10 +45,6 @@ Global ...@@ -47,10 +45,6 @@ Global
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Debug|Any CPU.Build.0 = Debug|Any CPU {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.ActiveCfg = Release|Any CPU
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
<Compile Include="ManagerUtil.cs" /> <Compile Include="ManagerUtil.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WCFControl.cs" />
<EmbeddedResource Include="FrmAxisDebug.resx"> <EmbeddedResource Include="FrmAxisDebug.resx">
<DependentUpon>FrmAxisDebug.cs</DependentUpon> <DependentUpon>FrmAxisDebug.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -222,10 +221,6 @@ ...@@ -222,10 +221,6 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\AcStoreWCF\AcStoreWCF.csproj">
<Project>{bc133455-a1c9-4202-8489-16458c7fa5e5}</Project>
<Name>AcStoreWCF</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project> <Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name> <Name>Common</Name>
......
...@@ -146,6 +146,7 @@ ...@@ -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();
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 @@ ...@@ -161,7 +162,6 @@
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.摄像机调试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -1656,35 +1656,35 @@ ...@@ -1656,35 +1656,35 @@
// 查看IOToolStripMenuItem // 查看IOToolStripMenuItem
// //
this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem"; this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem";
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.查看IOToolStripMenuItem.Text = "查看IO"; this.查看IOToolStripMenuItem.Text = "查看IO";
this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click); this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click);
// //
// 料仓运转ONToolStripMenuItem // 料仓运转ONToolStripMenuItem
// //
this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem"; this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem";
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON"; this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON";
this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click); this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click);
// //
// 料仓运转OFFToolStripMenuItem // 料仓运转OFFToolStripMenuItem
// //
this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem"; this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem";
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF"; this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF";
this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click); this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click);
// //
// 打开舱门ToolStripMenuItem // 打开舱门ToolStripMenuItem
// //
this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem"; this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem";
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.打开舱门ToolStripMenuItem.Text = "打开仓门"; this.打开舱门ToolStripMenuItem.Text = "打开仓门";
this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click); this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click);
// //
// 关闭仓门ToolStripMenuItem // 关闭仓门ToolStripMenuItem
// //
this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem"; this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem";
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.关闭仓门ToolStripMenuItem.Text = "关闭仓门"; this.关闭仓门ToolStripMenuItem.Text = "关闭仓门";
this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click); this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click);
// //
...@@ -1701,17 +1701,24 @@ ...@@ -1701,17 +1701,24 @@
// 轴卡点动ToolStripMenuItem // 轴卡点动ToolStripMenuItem
// //
this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem"; this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem";
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.轴卡点动ToolStripMenuItem.Text = "轴卡点动"; this.轴卡点动ToolStripMenuItem.Text = "轴卡点动";
this.轴卡点动ToolStripMenuItem.Click += new System.EventHandler(this.轴卡点动ToolStripMenuItem_Click); this.轴卡点动ToolStripMenuItem.Click += new System.EventHandler(this.轴卡点动ToolStripMenuItem_Click);
// //
// 扫码测试ToolStripMenuItem // 扫码测试ToolStripMenuItem
// //
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem"; this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.扫码测试ToolStripMenuItem.Text = "扫码测试"; this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click); 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 // 配置信息ToolStripMenuItem
// //
this.配置信息ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.配置信息ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
...@@ -1724,7 +1731,7 @@ ...@@ -1724,7 +1731,7 @@
// 轴运动配置ToolStripMenuItem // 轴运动配置ToolStripMenuItem
// //
this.轴运动配置ToolStripMenuItem.Name = "轴运动配置ToolStripMenuItem"; this.轴运动配置ToolStripMenuItem.Name = "轴运动配置ToolStripMenuItem";
this.轴运动配置ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.轴运动配置ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.轴运动配置ToolStripMenuItem.Text = "轴运动配置"; this.轴运动配置ToolStripMenuItem.Text = "轴运动配置";
this.轴运动配置ToolStripMenuItem.Click += new System.EventHandler(this.轴运动配置ToolStripMenuItem_Click); this.轴运动配置ToolStripMenuItem.Click += new System.EventHandler(this.轴运动配置ToolStripMenuItem_Click);
// //
...@@ -1787,6 +1794,7 @@ ...@@ -1787,6 +1794,7 @@
this.groupBox6.TabIndex = 269; this.groupBox6.TabIndex = 269;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "WCF测试"; this.groupBox6.Text = "WCF测试";
this.groupBox6.Visible = false;
// //
// btnOpenWCF // btnOpenWCF
// //
...@@ -1850,13 +1858,6 @@ ...@@ -1850,13 +1858,6 @@
this.notifyIcon1.Text = "料仓客户端"; this.notifyIcon1.Text = "料仓客户端";
this.notifyIcon1.Visible = true; 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 // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
...@@ -260,17 +260,17 @@ namespace OnlineStore.ACSingleStore ...@@ -260,17 +260,17 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg.Text = ""; lblWarnMsg.Text = "";
btnStartAuTo.Text = "开始自动出入库"; btnStartAuTo.Text = "开始自动出入库";
} }
if (WCFControl.isRun) //if (WCFControl.isRun)
{ //{
btnOpenWCF.Enabled = false; // btnOpenWCF.Enabled = false;
btnCloseWCF.Enabled = true; // btnCloseWCF.Enabled = true;
} //}
else //else
{ //{
btnOpenWCF.Enabled = true ; // btnOpenWCF.Enabled = true ;
btnCloseWCF.Enabled = false ; // btnCloseWCF.Enabled = false ;
} //}
} }
private void ReadPosistion() private void ReadPosistion()
...@@ -1083,12 +1083,12 @@ namespace OnlineStore.ACSingleStore ...@@ -1083,12 +1083,12 @@ namespace OnlineStore.ACSingleStore
private void btnOpenWCF_Click(object sender, EventArgs e) private void btnOpenWCF_Click(object sender, EventArgs e)
{ {
WCFControl.OpenWCF(); //WCFControl.OpenWCF();
} }
private void btnCloseWCF_Click(object sender, EventArgs e) private void btnCloseWCF_Click(object sender, EventArgs e)
{ {
WCFControl.CloseWCF(); //WCFControl.CloseWCF();
} }
private void chbAuto_CheckedChanged(object sender, EventArgs e) private void chbAuto_CheckedChanged(object sender, EventArgs e)
...@@ -1132,7 +1132,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1132,7 +1132,7 @@ namespace OnlineStore.ACSingleStore
KNDManager.CloseAllDO(); KNDManager.CloseAllDO();
StoreOpenStatus(false); StoreOpenStatus(false);
KNDManager.CloseAllConnection(); KNDManager.CloseAllConnection();
WCFControl.CloseWCF(); //WCFControl.CloseWCF();
System.Environment.Exit(System.Environment.ExitCode); System.Environment.Exit(System.Environment.ExitCode);
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -11,49 +11,49 @@ namespace OnlineStore.ACSingleStore ...@@ -11,49 +11,49 @@ namespace OnlineStore.ACSingleStore
{ {
public class WCFControl public class WCFControl
{ {
public static bool isRun=false; //public static bool isRun=false;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static ServiceHost host = null; //private static ServiceHost host = null;
public static void OpenWCF() //public static void OpenWCF()
{ //{
if (isRun) // if (isRun)
{ // {
return; // return;
} // }
try // try
{ // {
if (host == null) // if (host == null)
{ // {
host = new ServiceHost(typeof(AcStoreWCF.CWSMDBox)); // host = new ServiceHost(typeof(AcStoreWCF.CWSMDBox));
} // }
if (host.State != CommunicationState.Opening) // if (host.State != CommunicationState.Opening)
{ // {
host.Open(); // host.Open();
} // }
isRun = true; // isRun = true;
LogUtil.info("打开WCF服务成功"); // LogUtil.info("打开WCF服务成功");
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
LogUtil.error("打开WCF服务出错:" + ex.ToString()); // LogUtil.error("打开WCF服务出错:" + ex.ToString());
} // }
} //}
public static void CloseWCF() //public static void CloseWCF()
{ //{
try // try
{ // {
isRun = false; // isRun = false;
if (host != null) // if (host != null)
{ // {
host.Close(); // host.Close();
} // }
LogUtil.info("关闭WCF服务成功"); // LogUtil.info("关闭WCF服务成功");
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
LogUtil.error("关闭WCF服务出错:" + ex.ToString()); // LogUtil.error("关闭WCF服务出错:" + ex.ToString());
} // }
} //}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!