Exemple #1
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            string reportInbox = tbxReportPath.Text;

            if (!Directory.Exists(reportInbox))
            {
                MessageBox.Show("报告路径不存在");
                return;
            }

            string serverIP         = tbxServerIP.Text;
            string serverPort       = tbxServerPort.Text;
            bool   bConfirmOKReport = cbxConfirmOKReport.Checked;

            ConfigurationManager.AppSettings["ReportInbox"]         = reportInbox;
            ConfigurationManager.AppSettings["ServerIP"]            = serverIP;
            ConfigurationManager.AppSettings["ServerPort"]          = serverPort;
            ConfigurationManager.AppSettings["NeedConfirmOkReport"] = bConfirmOKReport ? "1" : "0";

            ReportClient.Stop();

            int nPort = 11121;

            int.TryParse(serverPort, out nPort);

            ReportClient.ServerIP             = serverIP;
            ReportClient.ServerPort           = nPort;
            ReportClient.PdfReportFolder      = reportInbox;
            ReportClient.LogPath              = @"C:\ReportLog\Client";
            ReportClient.NeedConfirmPatientId = bConfirmOKReport;

            ReportClient.Start();

            HideForm();
        }
Exemple #2
0
 private void timer_Tick(object sender, EventArgs e)
 {
     //check usb at specified folder
     if (IsUSBAlive())
     {
         ReportClient.Start();
     }
     else
     {
         ReportClient.Stop();
     }
 }