Example #1
0
        public void RefreshStatusBar()
        {
            System.Threading.Thread t = new System.Threading.Thread(
                (delegate() {
                try
                {
                    IItemDao itemDao = GlobalData.getIDao <IItemDao>();
                    string itemcount = itemDao.CountAll().ToString() + "個の商品";
                    string sold = "売上 ¥" + itemDao.SumSellPrice().ToString("#,##0") + "- " + itemDao.CountSoldItem().ToString() + "個";

                    ControlUtil.SafelyOperated(this.statusStrip1,
                                               (MethodInvoker) delegate()
                    {
                        this.status_itemcount.Text = itemcount;
                    });

                    ControlUtil.SafelyOperated(this.statusStrip1,
                                               (MethodInvoker) delegate()
                    {
                        this.status_sold.Text = sold;
                    });
                }
                catch { }
            }));
            t.Start();
        }