コード例 #1
0
        private async void UpdateStkBasicallyData_BarButtonItem1_ItemClick(
            object sender,
            DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DBUpdate_barSubItem1.Enabled = false;
            CatchStkData cd = new CatchStkData();

            string[] msgFormat         = { "更新股票代碼中...UpdateStkCodeProgress%" };
            ShowReportProgressMsg srpm = new ShowReportProgressMsg(stateListBox, msgFormat);
            //取得更新資料庫進度
            Progress <RptStructure> progress = new Progress <RptStructure>(srpm.DisplayMsgToUserCtrl);

            try
            {
                await Task.Run(() => cd.MultiCatch(progress));
            }
            catch (NullReferenceException nullEx)
            {
                stateListBox.Items.Add("股票代碼更新失敗!");
                stateListBox.Items.Add(nullEx.Message);
            }

            UserControlItemUpdateAndRemove userControlItemUpdateAndRemove = new UserControlItemUpdateAndRemove();

            userControlItemUpdateAndRemove.UpdateListBoxControlItem(stockListBox, stateListBox, notifyIcon1);
            DBUpdate_barSubItem1.Enabled = true;
        }
コード例 #2
0
        private void StateBoxPanel_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            //更新不動作才可以清除狀態欄內的資料
            UserControlItemUpdateAndRemove userControlItemRemove = new UserControlItemUpdateAndRemove();

            userControlItemRemove.RemoveListBoxCotrolItem(stateListBox, DBUpdate_barSubItem1, notifyIcon1);
        }
コード例 #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            UserControlItemUpdateAndRemove userControlItemUpdateAndRemove = new UserControlItemUpdateAndRemove();

            userControlItemUpdateAndRemove.UpdateListBoxControlItem(stockListBox, stateListBox, notifyIcon1);
        }