Example #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            panelCreator = new FactoryPanelCreator();
            DataBaseHandler dh = DataBaseHandler.getInstance();

            productList = new ArrayList();
            booklist    = dh.BookLoader();
            CurrentProductList.AddRange(booklist);
            musiclist    = dh.MusicCDLoader();
            magazinelist = dh.MagazineLoader();
            productList.Add(booklist);
            productList.Add(magazinelist);
            productList.Add(musiclist);
            cbProduct.SelectedIndex    = 0;
            worker.DoWork             += new DoWorkEventHandler(Worker_DoWork);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(Worker_RunWorkerCompleted);
            worker.ProgressChanged    += Worker_ProgressChanged;
        }
Example #2
0
        private void btnRoot_Click(object sender, EventArgs e)
        {
            Logger.logger(" Main Form Root");
            DataBaseHandler dh   = DataBaseHandler.getInstance();
            RootForm        root = new RootForm();

            root.ShowDialog();
            booklist.Clear();
            musiclist.Clear();
            magazinelist.Clear();
            CurrentProductList.Clear();
            booklist = dh.BookLoader();
            CurrentProductList.AddRange(booklist);

            musiclist    = dh.MusicCDLoader();
            magazinelist = dh.MagazineLoader();
            productList.Clear();
            productList.Add(booklist);
            productList.Add(magazinelist);
            productList.Add(musiclist);

            btnRoot.Visible = Isroot;
            cbProduct_SelectedIndexChanged(cbProduct, null);
        }