Пример #1
0
        private void button_remove_src_Click(object sender, EventArgs e)
        {
            string val = (string)listBox_src.SelectedItem;

            AppStockUtil.removeItem(AppStockData.getInstance().m_srcList, val);
            refreshSrcList();
        }
Пример #2
0
        private void button_pricecomp_refresh_Click(object sender, EventArgs e)
        {
            string beginDate = textBox_pricecomp_begindate.Text;
            string endDate   = textBox_pricecomp_enddate.Text;

            if (!DateUtil.isDateValid(beginDate))
            {
                beginDate = m_defaultBeginDate;
            }
            if (!DateUtil.isDateValid(endDate))
            {
                endDate = DateUtil.getTodayDate();
            }

            if (m_advMode)
            {
                AppPriceCompareCtrl <AppAdvancedCompareItem> .getInstance().refresh(AppStockData.getInstance().m_selfSelectedList.stocks, beginDate, endDate);

                rebuildAdvCompListView();
            }
            else
            {
                AppPriceCompareCtrl <AppPriceCompareItem> .getInstance().refresh(AppStockData.getInstance().m_selfSelectedList.stocks, beginDate, endDate);

                rebuildPriceCompListView();
            }
        }
Пример #3
0
        private void button_select_add_Click(object sender, EventArgs e)
        {
            AppGlobalCache.getInstance().setTargetList(AppStockData.getInstance().m_selfSelectedList);
            AddStockForm addForm = new AddStockForm();

            addForm.ShowDialog();
            AppGlobalCache.getInstance().setTargetList(null);
            refreshSelfSelectList();
        }
Пример #4
0
        private void button_screen_sort_Click(object sender, EventArgs e)
        {
            AppGlobalCache.getInstance().setTargetList(AppStockData.getInstance().m_screenedList);
            SortForm form = new SortForm();

            form.ShowDialog();
            AppGlobalCache.getInstance().setTargetList(null);
            refreshScreenedList();
        }
Пример #5
0
        private void button_export_screened_Click(object sender, EventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string filepath = dlg.FileName;
                AppStockData.getInstance().m_screenedList.save(filepath);
            }
        }
Пример #6
0
        private void button_import_src_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string filepath = dlg.FileName;
                AppStockData.getInstance().m_srcList.load(filepath);

                refreshSrcList();
            }
        }
Пример #7
0
 private void button_save_select_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_selfSelectedList.save("Intermediate/optional_stocks.txt");
 }
Пример #8
0
 public void start()
 {
     m_condition = new AppFilterCondition();
     m_srcList   = AppStockData.getInstance().m_srcList.stocks;
 }
Пример #9
0
 private void button_add_to_select_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_selfSelectedList.append(AppStockData.getInstance().m_screenedList);
     refreshSelfSelectList();
 }
Пример #10
0
 private void button_load_select_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_selfSelectedList.load("Intermediate/optional_stocks.txt");
     refreshSelfSelectList();
 }
Пример #11
0
 private void refreshSelfSelectList()
 {
     refreshListBox(listBox_selfSelect, AppStockData.getInstance().m_selfSelectedList.stocks);
     refreshListCount(label_select_count, AppStockData.getInstance().m_selfSelectedList.stocks);
 }
Пример #12
0
 private void button_move_to_src_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_srcList.copy(AppStockData.getInstance().m_screenedList);
     refreshSrcList();
 }
Пример #13
0
 private void refreshScreenedList()
 {
     refreshListBox(listBox_screened, AppStockData.getInstance().m_screenedList.stocks);
     refreshListCount(label_screen_count, AppStockData.getInstance().m_screenedList.stocks);
 }
Пример #14
0
 private void refreshSrcList()
 {
     refreshListBox(listBox_src, AppStockData.getInstance().m_srcList.stocks);
     refreshListCount(label_src_count, AppStockData.getInstance().m_srcList.stocks);
 }
Пример #15
0
 public void end()
 {
     AppStockData.getInstance().m_screenedList.copy(m_targetList);
 }
Пример #16
0
 private void button_select_clear_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_selfSelectedList.clear();
     refreshSelfSelectList();
 }
Пример #17
0
 private void button_src_defaultAll_Click(object sender, EventArgs e)
 {
     AppStockData.getInstance().m_srcList.copy(StockPool.getInstance().getAllStocks());
     refreshSrcList();
 }