Jelajahi Sumber

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 6 tahun lalu
induk
melakukan
7392bf4f33

+ 4 - 0
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -1650,6 +1650,7 @@
             // 
             this.si_detno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.si_detno.DataPropertyName = "si_detno";
+            this.si_detno.Frozen = true;
             this.si_detno.HeaderText = "顺序";
             this.si_detno.Name = "si_detno";
             this.si_detno.ReadOnly = true;
@@ -1693,6 +1694,7 @@
             // si_item
             // 
             this.si_item.DataPropertyName = "si_item";
+            this.si_item.Frozen = true;
             this.si_item.HeaderText = "采集项目";
             this.si_item.Name = "si_item";
             this.si_item.ReadOnly = true;
@@ -1701,8 +1703,10 @@
             // si_expressionitem
             // 
             this.si_expressionitem.DataPropertyName = "si_expressionitem";
+            this.si_expressionitem.Frozen = true;
             this.si_expressionitem.HeaderText = "正则项次";
             this.si_expressionitem.Name = "si_expressionitem";
+            this.si_expressionitem.Visible = false;
             // 
             // UAS_出货标签打印
             // 

+ 19 - 17
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -27,10 +27,6 @@ namespace UAS_LabelMachine
 
         DataTable dt;
         /// <summary>
-        /// 已经打印过的外箱号
-        /// </summary>
-        List<string> PrintedOutboxCode = new List<string>();
-        /// <summary>
         /// 已经打印过的Vivo外箱号
         /// </summary>
         List<string> PrintedVivoOutboxCode = new List<string>();
@@ -1608,11 +1604,9 @@ namespace UAS_LabelMachine
                         {
                             for (int h = 0; h < LabelInf.RowCount; h++)
                             {
-                                if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i] && (!PrintedOutboxCode.Contains(Outboxcode.ToArray()[i])))
+                                if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i])
                                 {
                                     OutBoxCodePrint(la_id, h);
-                                    //添加到已打印的列表中
-                                    PrintedOutboxCode.Add(Outboxcode.ToArray()[i]);
                                     break;
                                 }
                             }
@@ -1620,6 +1614,10 @@ namespace UAS_LabelMachine
                     }
                     catch { }
                 }
+                else
+                {
+                    MessageBox.Show("请勾选需要打印的外箱");
+                }
             }
             else
             {
@@ -2024,8 +2022,6 @@ namespace UAS_LabelMachine
         private void LoadGridData(object sender, EventArgs e)
         {
             AllCollect = false;
-            //加载数据的时候清除已打印的序列
-            PrintedOutboxCode.Clear();
             PrintedVivoOutboxCode.Clear();
             //如果是富为则使用特殊的查询语句                                
             if (DataHelper.DBConnectionString.Contains("richwell") || DataHelper.DBConnectionString.Contains("192.168.0.88"))
@@ -2298,18 +2294,24 @@ namespace UAS_LabelMachine
                 try { OutboxCapacity.Value = (decimal)dt.Rows[0]["pr_qtyperplace"] / (decimal)dt.Rows[0]["pr_zxbzs"]; }
                 catch (Exception) { }
             }
-            for (int i = 0; i < dt.Rows.Count; i++)
+            try
             {
-                int pd_qty = int.Parse(dt.Rows[i]["pd_qty"].ToString());
-                int pr_zxbzs = int.Parse(dt.Rows[i]["pr_zxbzs"].ToString());
-                int pd_cartons = int.Parse(dt.Rows[i]["pd_cartons"].ToString());
-                for (int j = 0; j < pd_qty * pd_cartons / pr_zxbzs; j++)
+                for (int i = 0; i < dt.Rows.Count; i++)
                 {
-                    LabelInf.Rows[Current].Cells["pib_outboxcode2"].Value = dt.Rows[i]["pd_cartonno"].ToString();
-                    Current++;
+                    int pd_qty = int.Parse(dt.Rows[i]["pd_qty"].ToString());
+                    int pr_zxbzs = int.Parse(dt.Rows[i]["pr_zxbzs"].ToString());
+                    int pd_cartons = int.Parse(dt.Rows[i]["pd_cartons"].ToString());
+                    for (int j = 0; j < pd_qty * pd_cartons / pr_zxbzs; j++)
+                    {
+                        LabelInf.Rows[Current].Cells["pib_outboxcode2"].Value = dt.Rows[i]["pd_cartonno"].ToString();
+                        Current++;
+                    }
                 }
+                GetPackingCode = true;
+            }
+            catch (Exception)
+            {
             }
-            GetPackingCode = true;
             SaveGrid_Click(sender, e);
         }
 

+ 1 - 1
UAS_DeviceMonitor/DataOperate/DataHelper.cs

@@ -9,7 +9,7 @@ namespace UAS_DeviceMonitor.DataOperate
     class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = UAS_DeviceMonitor.Properties.Settings.Default.Properties["MES"].DefaultValue.ToString();
+        private string ConnectionStrings = Properties.Settings.Default.Properties["MES"].DefaultValue.ToString();
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;
         public static OracleConnection connection = null;

+ 77 - 0
UAS_DeviceMonitor/Entity/SystemInf.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+
+namespace UAS_DeviceMonitor.Entity
+{
+    class SystemInf
+    {
+        /// <summary>
+        /// 连接字符串,用户登录的时候选择了数据库之后会使用该字符串作为连接字符串
+        /// </summary>
+        public static string ConnectionString;
+        /// <summary>
+        /// 用户登录的时间
+        /// </summary>
+        public static string LoginTime;
+        /// <summary>
+        /// 当前的连接数据库
+        /// </summary>
+        public static string CurrentDB;
+        /// <summary>
+        ///  配置文件默认的数据库
+        /// </summary>
+        public static string DefaultDB;
+        /// <summary>
+        /// 屏幕的宽度
+        /// </summary>
+        public static int ScreenWidth;
+        /// <summary>
+        /// 屏幕的高度
+        /// </summary>
+        public static int ScreenHeight;
+        /// <summary>
+        /// 当前岗位资源对应的Caller
+        /// </summary>
+        public static Dictionary<string, Dictionary<string, bool>> Caller = new Dictionary<string, Dictionary<string, bool>>();
+        /// <summary>
+        /// 打开的串口的名称
+        /// </summary>
+        public static List<string> OpenPort=new List<string>();
+        /// <summary>
+        /// 检测音频是否可用
+        /// </summary>
+        public static bool CheckAudioEnable=true;
+        /// <summary>
+        /// 导航宽度
+        /// </summary>
+        public static int NavWidth = 0;
+        /// <summary>
+        /// HeadBar的高度
+        /// </summary>
+        public static int HeadBarHeight = 0;
+        /// <summary>
+        /// 当前程序进程ID
+        /// </summary>
+        public static int ProcessesID;
+        /// <summary>
+        /// 是否允许打印程序
+        /// </summary>
+        public static bool EnablePrint;
+        /// <summary>
+        /// 缓存数据的文件夹
+        /// </summary>
+        public static string CacheFolder= Environment.GetEnvironmentVariable("windir").Substring(0, 1)+@":\UAS_MES\CacheFile\";
+        /// <summary>
+        /// 日志文件的缓存路径
+        /// </summary>
+        public static string LogFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\Log\";
+        /// <summary>
+        /// 缓存的XML文件的路径和名称
+        /// </summary>
+        public static string CacheFilePath= Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
+
+        public static bool UpperCollection = true;
+
+        public static DataOperate.DataHelper dh;
+    }
+}

+ 101 - 4
UAS_DeviceMonitor/Program.cs

@@ -1,21 +1,118 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
+using System.Security.Principal;
+using System.Text;
 using System.Windows.Forms;
+using System.Xml;
+using UAS_DeviceMonitor.Entity;
+using UAS_DeviceMonitor.PublicMethod;
 
 namespace UAS_DeviceMonitor
 {
     static class Program
     {
         /// <summary>
-        /// 应用程序的主入口点
+        /// 应用程序的主入口点
         /// </summary>
         [STAThread]
         static void Main()
         {
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Main());
+            try
+            {
+                WindowsIdentity identity = WindowsIdentity.GetCurrent();
+                WindowsPrincipal principal = new WindowsPrincipal(identity);
+                //设置应用程序处理异常方式:ThreadException处理
+                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
+                //处理UI线程异常
+                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
+                //处理非UI线程异常
+                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
+                #region 应用程序的主入口点
+                Application.EnableVisualStyles();
+                Application.SetCompatibleTextRenderingDefault(false);
+                //启用异常记录日志的操作
+                string sysdisc = Environment.GetEnvironmentVariable("windir").Substring(0, 1);
+                if (!Directory.Exists(SystemInf.LogFolder))
+                    Directory.CreateDirectory(SystemInf.LogFolder);
+                FileStream fs = new FileStream(SystemInf.LogFolder + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                fs.Close();
+                //创建存储登录信息的文件
+                if (!Directory.Exists(SystemInf.CacheFolder))
+                    Directory.CreateDirectory(SystemInf.CacheFolder);
+                FileStream fcaches = new FileStream(SystemInf.CacheFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                fcaches.Close();
+                //判断是否xml文件大小为0
+                FileInfo info = new FileInfo(SystemInf.CacheFilePath);
+                if (info.Length == 0)
+                {
+                    XmlDocument doc = new XmlDocument();
+                    //创建类型声明节点  
+                    XmlNode node = doc.CreateXmlDeclaration("1.0", "utf-8", "");
+                    doc.AppendChild(node);
+                    //创建根节点  
+                    XmlElement xeRoot = doc.CreateElement("cacheInfo");
+                    doc.AppendChild(xeRoot);
+                    doc.Save(SystemInf.CacheFilePath);
+                }
+                //创建记录打印进程的文件
+                FileStream fas = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                fas.Close();
+                if (principal.IsInRole(WindowsBuiltInRole.Administrator))
+                    Application.Run(new Main());
+                else
+                {
+                    //创建启动对象
+                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+                    // 设置运行文件
+                    startInfo.FileName = Application.ExecutablePath;
+                    //设置启动动作,确保以管理员身份运行
+                    startInfo.Verb = "runas";
+                    //如果不是管理员,则启动UAC
+                    System.Diagnostics.Process.Start(startInfo);
+                }
+                #endregion
+            }
+            catch (Exception ex)
+            {
+                string str = GetExceptionMsg(ex, string.Empty);
+                MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        //处理线程的异常
+        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
+        {
+            string str = GetExceptionMsg(e.Exception, e.ToString());
+            LogManager.DoLog(e.Exception.Message + "  " + e.Exception.TargetSite + "  " + e.Exception.StackTrace);
+            MessageBox.Show(str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+        }
+
+        //未处理的异常统一通过这里返回
+        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
+        {
+            string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
+            LogManager.DoLog(str);
+            MessageBox.Show(str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+        }
+
+        /// <summary>
+        /// 生成自定义异常消息
+        /// </summary>
+        /// <param name="ex">异常对象</param>
+        /// <param name="backStr">备用异常消息:当ex为null时有效</param>
+        /// <returns>异常字符串文本</returns>
+        static string GetExceptionMsg(Exception ex, string backStr)
+        {
+            StringBuilder sb = new StringBuilder();
+            if (ex != null)
+            {
+                sb.AppendLine(ex.Message);
+                //sb.AppendLine("【异常方法】:" + ex.StackTrace);
+            }
+            //else { sb.AppendLine("【未处理异常】:" + backStr); }
+            return sb.ToString();
         }
     }
 }

+ 63 - 0
UAS_DeviceMonitor/PublicMethod/LogManager.cs

@@ -0,0 +1,63 @@
+using System;
+using System.IO;
+using UAS_DeviceMonitor.Entity;
+
+namespace UAS_DeviceMonitor.PublicMethod
+{
+    class LogManager
+    {
+        public static string LogAddress = SystemInf.LogFolder;
+        /// <summary>
+        /// 记录操作
+        /// </summary>
+        /// <param name="Message"></param>
+        public static void DoLog(string Message)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【消息】" + Message + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+
+        /// <summary>
+        /// 记录操作和SQL
+        /// </summary>
+        /// <param name="Message"></param>
+        /// <param name="SQL"></param>
+        public static void DoLog(string Message, string SQL)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【消息】" + Message + "\n");
+                sw.WriteLine("【SQL】" + SQL + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+
+        /// <summary>
+        /// 记录SQL
+        /// </summary>
+        /// <param name="SQL"></param>
+        public static void DoSQLLog(string SQL)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【SQL】" + SQL + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+    }
+}

+ 277 - 0
UAS_DeviceMonitor/PublicMethod/ModeBusTCPServer.cs

@@ -0,0 +1,277 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace UAS_DeviceMonitor.PublicMethod
+{
+    class ModeBusTCPServer
+    {
+        private bool isOpen = false;
+
+        Thread threadWatch = null; //负责监听客户端的线程
+        Socket socketWatch = null; //负责监听客户端的套接字
+
+        public bool IsOpen
+        {
+            get
+            {
+                return isOpen;
+            }
+
+            set
+            {
+                isOpen = value;
+            }
+        }
+
+        public string IP
+        {
+            get
+            {
+                return iP;
+            }
+
+            set
+            {
+                iP = value;
+            }
+        }
+
+        public string Port
+        {
+            get
+            {
+                return port;
+            }
+
+            set
+            {
+                port = value;
+            }
+        }
+
+        private string iP;
+
+        private string port;
+
+        public List<Socket> list = new List<Socket>();
+
+
+        public ModeBusTCPServer()
+        {
+
+        }
+
+        public bool Open()
+        {
+            try
+            {
+                //定义一个套接字用于监听客户端发来的信息  包含3个参数(IP4寻址协议,流式连接,TCP协议)
+                socketWatch = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                //服务端发送信息 需要1个IP地址和端口号
+                IPAddress ipaddress = IPAddress.Parse(iP);
+                //将IP地址和端口号绑定到网络节点endpoint上 
+                IPEndPoint endpoint = new IPEndPoint(ipaddress, int.Parse(port));
+                //监听绑定的网络节点
+                socketWatch.Bind(endpoint);
+                //将套接字的监听队列长度限制为20
+                socketWatch.Listen(20);
+                //创建一个监听线程 
+                threadWatch = new Thread(WatchConnecting);
+                //将窗体线程设置为与后台同步
+                threadWatch.IsBackground = true;
+                //启动线程
+                threadWatch.Start();
+                isOpen = true;
+                return true;
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+                return false;
+            }
+        }
+
+        //private void SEND_Click(object sender, EventArgs e)
+        //{
+        //    foreach (Socket item in list)
+        //    {
+        //        if (item != null)
+        //        {
+        //            if (item.RemoteEndPoint != null)
+        //            {
+        //                if (item.RemoteEndPoint.ToString() == SelectIP.Text)
+        //                {
+        //                    switch (Encodingbox.Text)
+        //                    {
+        //                        case "UTF-8":
+        //                            item.Send(Encoding.UTF8.GetBytes(SENDMESSAGE.Text));
+        //                            break;
+        //                        case "ASCII":
+        //                            byte[] array = Encoding.ASCII.GetBytes(SENDMESSAGE.Text.Trim());
+        //                            string str = null;
+        //                            for (int i = 0; i < array.Length; i++)
+        //                            {
+        //                                int asciicode = (int)(array[i]);
+        //                                str += Convert.ToString(asciicode) + " ";
+        //                            }
+        //                            item.Send(Encoding.ASCII.GetBytes(str));
+        //                            break;
+        //                        case "Hexadecimal":
+        //                            char[] values = SENDMESSAGE.Text.ToCharArray();
+        //                            string strH = null;
+        //                            foreach (char letter in values)
+        //                            {
+        //                                // Get the integral value of the character.
+        //                                int value = Convert.ToInt32(letter);
+        //                                // Convert the decimal value to a hexadecimal value in string form.
+        //                                string hexOutput = String.Format("{0:X}", value);
+        //                                strH += hexOutput + " ";
+        //                            }
+        //                            item.Send(Encoding.UTF8.GetBytes(strH));
+        //                            break;
+        //                    }                        
+        //                }
+        //            }
+        //            else
+        //            {   
+        //                int index = SelectIP.Items.IndexOf(item.RemoteEndPoint.ToString());
+        //                SelectIP.Items.RemoveAt(index);
+        //                if (SelectIP.Items.Count > 0)
+        //                {
+        //                    if (SelectIP.Text == "")
+        //                        SelectIP.Text = SelectIP.Items[0].ToString();
+        //                }
+        //                else
+        //                    SelectIP.Text = "";
+        //                if (list.Contains(item))
+        //                {
+        //                    list.Remove(item);
+        //                }
+        //                //关闭之前accept出来的和客户端进行通信的套接字 
+        //                item.Close();
+        //            }
+        //        }
+        //    }
+        //}
+
+        private void WatchConnecting()
+        {
+            Socket connection = null;
+            while (true)  //持续不断监听客户端发来的请求
+            {
+                try
+                {
+                    connection = socketWatch.Accept();
+                }
+                catch (Exception)
+                {
+                    break;
+                }
+                //获取客户端的IP和端口号  
+                IPAddress clientIP = (connection.RemoteEndPoint as IPEndPoint).Address;
+                int clientPort = (connection.RemoteEndPoint as IPEndPoint).Port;
+
+                //让客户显示"连接成功的"的信息  
+                string sendmsg = "Connect Success!" + "LocalIP:" + clientIP + ",LocalPort" + clientPort.ToString();
+                byte[] arrSendMsg = Encoding.UTF8.GetBytes(sendmsg);
+                connection.Send(arrSendMsg);
+
+                //客户端网络结点号  
+                string remoteEndPoint = connection.RemoteEndPoint.ToString();
+                //显示与客户端连接情况
+                //IPEndPoint netpoint = new IPEndPoint(clientIP,clientPort); 
+                IPEndPoint netpoint = connection.RemoteEndPoint as IPEndPoint;
+
+                //创建一个通信线程      
+                ParameterizedThreadStart pts = new ParameterizedThreadStart(recv);
+                Thread thread = new Thread(pts);
+                //设置为后台线程,随着主线程退出而退出 
+                thread.IsBackground = true;
+                //启动线程     
+                thread.Start(connection);
+
+                //创建一个通信线程
+                //ParameterizedThreadStart sed = new ParameterizedThreadStart(sends);
+                //Thread threadsed = new Thread(sed);
+                //设置为后台线程,随着主线程退出而退出
+                //threadsed.IsBackground = true;
+                //启动线程
+                //threadsed.Start(connection);
+
+                list.Add(connection);
+
+            }
+        }
+
+
+        void recv(object socketclientpara)
+        {
+            Socket socketServer = socketclientpara as Socket;
+            while (true)
+            {
+                //创建一个内存缓冲区,其大小为1024*1024字节  即1M     
+                byte[] arrServerRecMsg = new byte[1024 * 1024];
+                //将接收到的信息存入到内存缓冲区,并返回其字节数组的长度    
+                try
+                {
+                    int length = socketServer.Receive(arrServerRecMsg);
+                    if (length == 0)
+                    {
+                        break;
+                    }
+                    //将机器接受到的字节数组转换为人可以读懂的字符串     
+                    string strSRecMsg = Encoding.UTF8.GetString(arrServerRecMsg, 0, length);
+                    //将发送的字符串信息附加到文本框txtMsg上     
+                }
+                catch (Exception)
+                {
+                    if (socketServer.RemoteEndPoint != null)
+                    {
+
+                    }
+                    if (list.Contains(socketServer))
+                    {
+                        list.Remove(socketServer);
+                    }
+                    //关闭之前accept出来的和客户端进行通信的套接字 
+                    socketServer.Close();
+                    break;
+                }
+            }
+            if (socketServer != null)
+            {
+                if (socketServer.RemoteEndPoint != null)
+                {
+
+                }
+                if (list.Contains(socketServer))
+                {
+                    list.Remove(socketServer);
+                }
+                socketServer.Close();
+            }
+        }
+
+        public void Close()
+        {
+            threadWatch.Abort();
+            socketWatch.Close();
+            isOpen = false;
+        }
+
+        public void SendOrder(string Code)
+        {
+
+            switch (Code)
+            {
+                default:
+                    break;
+            }
+        }
+    }
+}

+ 3 - 1
UAS_DeviceMonitor/UAS_DeviceMonitor.csproj

@@ -55,6 +55,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="DataOperate\DataHelper.cs" />
+    <Compile Include="Entity\SystemInf.cs" />
     <Compile Include="Main.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -63,6 +64,8 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="PublicMethod\LogManager.cs" />
+    <Compile Include="PublicMethod\ModeBusTCPServer.cs" />
     <EmbeddedResource Include="Main.resx">
       <DependentUpon>Main.cs</DependentUpon>
     </EmbeddedResource>
@@ -100,7 +103,6 @@
     <Folder Include="Device\Command\" />
     <Folder Include="Device\Information\" />
     <Folder Include="Device\Transfer\" />
-    <Folder Include="PublicMethod\" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.