Exemplo n.º 1
0
        public void L_ReceptionistNumber()
        {
            IP_PortSetting ipPortSetting = new IP_PortSetting();
            ConConnection  conConnection = new ConConnection();

            CallSystem.Class.Socket socket = new  CallSystem.Class.Socket();
            try
            {
                //Logger.Write(LogPriority.High, "トレ\x30FCス", "採血1の受付番号表示", (object)"呼出音操作前");
                this.Dispatcher.Invoke((Delegate) new MyDelegate2(this.LAddText), (object)PublicClass.LReceptionNo);
                int reshowflog = 0;
                if (DBClass.ListValue.LInfo == false)
                {
                    reshowflog = 0;
                }
                if (DBClass.ListValue.LInfo == true)
                {
                    reshowflog = 1;
                }
                PDM.UpdateShowInfo(PublicClass.LReceptionNo, Config.LName, reshowflog.ToString());
                if (DBClass.ListValue.IsYes == false)
                {
                    MessageBox.Show("更新失败");
                }
                conConnection.conconne();
            }
            catch (Exception ex)
            {
                //if (!this.LErorrLog)
                //    return;
                //Logger.Write(LogPriority.High, "例外", (object)ex);
                //this.LErorrLog = false;
                output(ex.ToString() + "\r\n");
            }
        }
Exemplo n.º 2
0
        void BGW_R_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            IP_PortSetting ipPortSetting = new IP_PortSetting();
            ConConnection  conConnection = new ConConnection();

            CallSystem.Class.Socket socket = new CallSystem.Class.Socket();
            try
            {
                // int port = (int)e.Argument;
                int port = Config.Rport;
                PublicClass.PortRight = port.ToString();
                TcpListener server = ipPortSetting.IP_PortSet(Config.IPAddress, port);
                while (true)
                {
                    using (this.Rstream = conConnection.ConConne(server, txtMsg))
                    {
                        this.Rdata = socket.Rsocket(this.Rstream, Config.WriteEncoder, txtMsg);
                        if (!this.IsRDo)
                        {
                            if (!string.IsNullOrWhiteSpace(this.Rdata))
                            {
                                this.IsRDo = true;
                                socket.Responsesocket(this.Rstream, Config.WriteEncoder);
                                if (this.Rdata.Split('_').Length == 2)
                                {
                                    PublicClass.RReceptionNo = this.Rdata.Split('_')[0];
                                }
                                if (this.Rdata.Contains("False"))
                                {
                                    DBClass.ListValue.RInfo = false;
                                    Thread.Sleep(Config.Delay);
                                }
                                if (this.Rdata.Contains("True"))
                                {
                                    DBClass.ListValue.RInfo = true;
                                }
                                this.R_ReceptionistNumber();
                                this.Rdata = string.Empty;
                                this.IsRDo = false;
                            }
                        }
                    }
                    Thread.Sleep(10);
                }
            }
            catch (Exception ex)
            {
                // if (!this.LErorrLog)
                //     return;
                //// Logger.Write(LogPriority.High, "例外", (object)ex);
                // this.LErorrLog = false;
                output(ex.ToString() + "\r\n");
            }
        }