private void RefreshRemain() { System.Threading.Thread t = new System.Threading.Thread(delegate() { IItemDao itDao = GlobalData.getIDao <IItemDao>(); UInt32 cnt; cnt = itDao.CountNeedKansaItem_NotFlagged(); ControlUtil.SafelyOperated(this.textBox_remain, (MethodInvoker) delegate() { this.textBox_remain.Text = cnt.ToString(); }); UInt32 allcnt; allcnt = itDao.CountNeedKansaItem(); ControlUtil.SafelyOperated(this.textBox_allkansa, (MethodInvoker) delegate() { this.textBox_allkansa.Text = allcnt.ToString(); }); UInt32 sum; sum = itDao.SumNeedKansaItem_SellPrice(); ControlUtil.SafelyOperated(this.textBox_sum, (MethodInvoker) delegate() { this.textBox_sum.Text = sum.ToString("#,##0"); }); }); t.IsBackground = true; t.Start(); }