using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Windows.Forms; using B3ButcherWeightClient.Data; using BO; using Forks.EnterpriseServices.BusinessInterfaces; using Forks.EnterpriseServices.DomainObjects2; using Forks.Utils.Data; using Timer = System.Threading.Timer; namespace B3ButcherWeightClient { public partial class Main : Form { #region 变量实例 private string _msg = string.Empty; private readonly IDataFormat _dataFormat; private Thread _insertThread; private Thread _inQueryThread, _outQueryThread; private bool _mainProcessIsRun; private static DateTime NewToday { get { return new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, ConfigUtil.PerDayStartHour, 0, 0); } } private static DateTime NextNewToday { get { return NewToday.AddHours(24); } } private readonly ManualResetEvent _manualResetEvent = new ManualResetEvent(false); private readonly object _queLocker = new object(); private readonly Queue _weightQueue = new Queue(); readonly ConcurrentQueue _dataQueue = new ConcurrentQueue(); readonly StringBuilder _dataStrBuilder = new StringBuilder(); readonly Form _parentForm; readonly IList _dTable = new List(); readonly IList