コード例 #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            if (ValidateForm())
            {
                ProcessMessage pm = new ProcessMessage();
                pm.MessagePath = txtMsgPath.Text.Trim();
                pm.DBServer = txtMongoServer.Text.Trim();
                pm.DBPort = txtMongoPort.Text.Trim();
                pm.DBUser = txtMongoUser.Text.Trim();
                pm.DBPassword = txtMongoPass.Text.Trim();
                pm.Feed = txtFeed.Text.Trim();

                loadThread = new Thread((ThreadStart)delegate { pm.ProcessFile(this); });
                loadThread.IsBackground = true;
                loadThread.Start();
            }
        }