Esempio n. 1
0
        private void ImportWizard_OnFinishedEditingEpisodes(UserInputResults inputResults, UserFinishedRequestedAction requestAction)
        {
            switch (requestAction)
            {
                case UserFinishedRequestedAction.Cancel:                   
                    ParsingWizardProgress.DeInit();
                    break;

                case UserFinishedRequestedAction.Next:
                    ParsingWizardHost.RemoveDetailsPanel(ParsingWizardEpIDPage);
                    ParsingWizardHost.ShowDetailsPanel(ParsingWizardProgress);
                    ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, false);
                    break;

                case UserFinishedRequestedAction.ShowMe:
                    // it was requested, tell the progress wizard to show it
                    ParsingWizardHost.RemoveDetailsPanel(ParsingWizardProgress);
                    ParsingWizardHost.ShowDetailsPanel(ParsingWizardEpIDPage);
                    ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
                    ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, true);
                    break;

                default:
                    break;
            }
        }
Esempio n. 2
0
        private void ImportWizard_OnFinishedLocalParsing(UserInputResults values, UserFinishedRequestedAction reqAction)
        {
            ParsingWizardParsingPage.ParsingGridPopulated -= new ImportPanelParsing.ParsingGridPopulatedDelegate(ImportWizard_OnParsingGridPopulated);

            ParsingWizardHost.RemoveDetailsPanel(ParsingWizardParsingPage);
            if (reqAction == UserFinishedRequestedAction.Next)
            {
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, false);

                // show the seriesIdentification Page
                ParsingWizardHost.RemoveDetailsPanel(ParsingWizardParsingPage);
                ParsingWizardHost.ShowDetailsPanel(ParsingWizardSeriesIDPage);
                
                ParsingWizardSeriesIDPage.SeriesGridPopulated += new ImportPanelSeriesID.SeriesGridPopulatedDelegate(ImportWizard_OnSeriesGridPopulated);
                ParsingWizardSeriesIDPage.UserFinishedEditing += new UserFinishedEditingDelegate(ImportWizard_OnFinishedSeriesID);

                ParsingWizardSeriesIDPage.Init(values.ParseResults);                                
            }
            else if (reqAction == UserFinishedRequestedAction.Cancel)
            {
                
            }
        }
Esempio n. 3
0
        private void ImportWizard_OnFinishedSeriesID(UserInputResults inputResults, UserFinishedRequestedAction requestAction)
        {
            ParsingWizardSeriesIDPage.UserFinishedEditing -= new UserFinishedEditingDelegate(ImportWizard_OnFinishedSeriesID);

            ParsingWizardHost.RemoveDetailsPanel(ParsingWizardSeriesIDPage);

            if (requestAction == UserFinishedRequestedAction.Next)
            {
                m_parser = new OnlineParsing(this);

                // and give it to the wizard
                ParsingWizardHost.Init();

                // now show generic progress details (remove seriesIDPage)
                ParsingWizardHost.RemoveDetailsPanel(ParsingWizardSeriesIDPage);                                
                ParsingWizardHost.ShowDetailsPanel(ParsingWizardProgress);
                ParsingWizardProgress.Init();

                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Next, false);

                ParsingWizardHost.ImportFinished += new EventHandler(ImportWizard_OnFinished);          

                // only now do we set up the parser itself and fire it off
                ImportWizardParseParams.m_userInputResult = inputResults;

                // this will be requested by the the parsing engine at the appropriate time
                ImportWizardParseParams.UserEpisodeMatcher = ParsingWizardEpIDPage;
                ImportWizardParseParams.m_files = ParsingWizardParsingPage.allFoundFiles; // else they will be marked as removed

                ParsingWizardEpIDPage.UserFinishedEditing += new UserFinishedEditingDelegate(ImportWizard_OnFinishedEditingEpisodes);

                // finally fire it off
                m_timingStart = DateTime.Now;                
                m_parser.Start(ImportWizardParseParams);
            }
            else if (requestAction == UserFinishedRequestedAction.Prev)
            {
                // unregister events
                ParsingWizardSeriesIDPage.UserFinishedEditing -= new UserFinishedEditingDelegate(ImportWizard_OnFinishedSeriesID);
                ParsingWizardSeriesIDPage.SeriesGridPopulated -= new ImportPanelSeriesID.SeriesGridPopulatedDelegate(ImportWizard_OnSeriesGridPopulated);

                // remove existing panel and show previous one
                ParsingWizardHost.SetButtonState(ImportWizard.WizardButton.Prev, false);
                ParsingWizardHost.ShowDetailsPanel(ParsingWizardParsingPage);
                ParsingWizardHost.RemoveDetailsPanel(ParsingWizardSeriesIDPage);
                ParsingWizardParsingPage.Init();
                ParsingWizardSeriesIDPage.ClearResults();                                
            }
            else if (requestAction == UserFinishedRequestedAction.Cancel)
            {
                
            }
        }
Esempio n. 4
0
 public UserInputResultSeriesActionPair(UserInputResults.SeriesAction RequestedAction, DBOnlineSeries series)
 {
     this.RequestedAction = RequestedAction;
     this.ChosenSeries = series;
 }