Пример #1
0
        private void Parsing_Start(CParsingParameters parsingParams)
        {
            if (m_parser == null)
            {
                // refresh regex and replacements
                FilenameParser.reLoadExpressions();

                m_parser = new OnlineParsing(this);
                m_parser.Start(parsingParams);
            }
        }
Пример #2
0
        private void OnlineParsing_OnCompleted(bool newEpisodes)
        {
            TimeSpan span = DateTime.Now - m_timingStart;
            MPTVSeriesLog.Write("Online Parsing Completed in " + span);           
            m_parser = null;
            ImportWizardParseParams = null;
            DBOption.SetOptions(DBOption.cImportOnlineUpdateScanLastTime, DateTime.Now.ToString());
            LoadTree();

            if (ParsingWizardHost != null && tabPage_Import.Contains(ParsingWizardHost))
            {                
                ParsingWizardHost.SetButtonVisibility(ImportWizard.WizardButton.Finish, true);
                ParsingWizardHost.SetButtonVisibility(ImportWizard.WizardButton.Cancel, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
            }

            EnableImportButtonState(true);
        }        
Пример #3
0
        private void StartImport()
        {
            ImportWizardParseParams = new CParsingParameters(true, true);

            if (m_parser == null)
            {
                // refresh regex and replacements
                FilenameParser.reLoadExpressions();

                ParsingWizardHost = new ImportWizard(this);
                ParsingWizardParsingPage = new ImportPanelParsing();
                ParsingWizardSeriesIDPage = new ImportPanelSeriesID();
                ParsingWizardEpIDPage = new ImportPanelEpID();
                ParsingWizardProgress = new ImportPanelProgress();                

                tabPage_Import.Controls.Add(ParsingWizardHost);
                ParsingWizardHost.Dock = DockStyle.Fill;
                ParsingWizardHost.BringToFront();
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Cancel, false);

                ParsingWizardParsingPage.ParsingGridPopulated += new ImportPanelParsing.ParsingGridPopulatedDelegate(ImportWizard_OnParsingGridPopulated);

                // now have it host the the initial parsing page                 
                ParsingWizardHost.ShowDetailsPanel(ParsingWizardParsingPage);
                ParsingWizardHost.AddSleepingDetailsPanel(ParsingWizardEpIDPage);                

                // and fire off work on that page
                ParsingWizardParsingPage.Init();
                ParsingWizardParsingPage.UserFinishedEditing += new UserFinishedEditingDelegate(ImportWizard_OnFinishedLocalParsing);               
            }
        }