Esempio n. 1
0
        private FillManagerBase GetFillManager(string dataFile, WebBrowser2 browser)
        {
            FillManagerBase manager = null;

            if (ribbon.SelectedPage == ghsite)
            {
                manager = new GHFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == fdlsite)
            {
                manager = new FDLFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == bhsite)
            {
                manager = new BHFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == xnysite)
            {
                manager = new XNYFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == cocsite)
            {
                manager = new COCFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == pzhsite)
            {
                manager = new PZHFillManager(browser, dataFile);
            }
            else if (ribbon.SelectedPage == cccsite)
            {
                if (cccProcess == null)
                {
                    this.Start3CProcess();
                    if (cccProcess == null)
                    {
                        return(null);
                    }
                    while (cccProcess.MainWindowHandle == IntPtr.Zero)
                    {
                        Application.DoEvents();
                    }
                }
                manager = new CCCFillManager((uint)cccProcess.Id, dataFile);
            }
            // 为填报器指定数据提供程序。
            if (manager != null)
            {
                string entripise = FileHelper.GetEntName();
                manager.DataProvider = DataProviders.DataProviderFactory.CreateProvider(entripise, GetSelectedPageType());

                manager.DataProvider.DataSourceFile = dataFile;
                if (manager.DataProvider.AllowAlternately)
                {
                    bool result = manager.DataProvider.ShowWindow();
                    return(result ? manager : null);
                }
            }
            return(manager);
        }
Esempio n. 2
0
        private void GenerateTreeDir_ItemClick(object sender, ItemClickEventArgs e)
        {
            CCCFillManager cccFiller = _fillManager as CCCFillManager;

            if (cccFiller != null)
            {
                cccFiller.GenerateDir();
            }
        }