public void InitiateReferenceRead(ProjectLayoutReference[] arrayProjectLayoutReferences, bool bExporting) { if (m_zReporterProxy != null) { ReadData(arrayProjectLayoutReferences); } else { var zProgressReporter = CardMakerInstance.ProgressReporterFactory.CreateReporter( "Loading Reference Data", new string[] { ProgressName.REFERENCE_DATA }, ReadData, arrayProjectLayoutReferences ); zProgressReporter.CancelButtonVisible = false; m_zReporterProxy = new ProgressReporterProxy() { ProgressIndex = 0, // known from above ProgressReporter = zProgressReporter, ProxyOwnsReporter = true }; CardMakerInstance.ApplicationForm.InvokeAction(() => zProgressReporter.StartProcessing(CardMakerInstance.ApplicationForm)); } if (!bExporting) { // if a ref reader had an issue handle it (google for example due to auth) m_zErrorReferenceReader?.HandleInvalid(); } }
private void InitiateReferenceRead(ProgressReporterProxy zReporterProxy, ProjectLayoutReference[] arrayProjectLayoutReferences) { if (zReporterProxy != null) { m_zReporterProxy = zReporterProxy; ReadData(arrayProjectLayoutReferences); } else { var zProgressReporter = CardMakerInstance.ProgressReporterFactory.CreateReporter( "Loading Reference Data", new string[] { ProgressName.REFERENCE_DATA }, ReadData, arrayProjectLayoutReferences ); zProgressReporter.CancelButtonVisible = false; m_zReporterProxy = new ProgressReporterProxy() { ProgressIndex = 0, // known from above ProgressReporter = zProgressReporter, ProxyOwnsReporter = true }; CardMakerInstance.ApplicationForm.InvokeAction(() => zProgressReporter.StartProcessing(CardMakerInstance.ApplicationForm)); } }
public void SetAndLoadLayout(ProjectLayout zLayout, bool bExporting, ProgressReporterProxy zReporterProxy) { EmptyReference = false; CardLayout = zLayout; ResetPrintCardIndex(); ProjectLayoutReference[] zReferenceData = null; if (null != CardLayout.Reference) { if (CardLayout.combineReferences) { var listReferences = new List <ProjectLayoutReference>(); ProjectLayoutReference zDefaultReference = null; foreach (var zReference in CardLayout.Reference) { if (zReference.Default) { zDefaultReference = zReference; } else { listReferences.Add(zReference); } } // move the default reference to the front of the set if (null != zDefaultReference) { listReferences.Insert(0, zDefaultReference); } zReferenceData = listReferences.Count == 0 ? null : listReferences.ToArray(); } else { foreach (var zReference in CardLayout.Reference) { if (zReference.Default) { zReferenceData = new ProjectLayoutReference[] { zReference }; break; } } } } InitiateReferenceRead(zReporterProxy, zReferenceData); if (!bExporting) { if (CardMakerInstance.GoogleCredentialsInvalid) { CardMakerInstance.GoogleCredentialsInvalid = false; GoogleAuthManager.Instance.FireGoogleAuthCredentialsErrorEvent( () => LayoutManager.Instance.InitializeActiveLayout()); } } }
public void SetAndLoadLayout(ProjectLayout zLayout, bool bExporting, ProgressReporterProxy zReporterProxy) { EmptyReference = false; CardLayout = zLayout; ResetPrintCardIndex(); ProjectLayoutReference[] zReferenceData = null; if (null != CardLayout.Reference) { if (CardLayout.combineReferences) { var listReferences = new List <ProjectLayoutReference>(); ProjectLayoutReference zDefaultReference = null; foreach (var zReference in CardLayout.Reference) { if (zReference.Default) { zDefaultReference = zReference; } else { listReferences.Add(zReference); } } // move the default reference to the front of the set if (null != zDefaultReference) { listReferences.Insert(0, zDefaultReference); } zReferenceData = listReferences.Count == 0 ? null : listReferences.ToArray(); } else { foreach (var zReference in CardLayout.Reference) { if (zReference.Default) { zReferenceData = new ProjectLayoutReference[] { zReference }; break; } } } } new DeckReader(this, zReporterProxy).InitiateReferenceRead(zReferenceData, bExporting); }
public DeckReader(Deck deck, ProgressReporterProxy reporterProxy) { m_zDeck = deck; m_zReporterProxy = reporterProxy; }
public void SetProgressReporterProxy(ProgressReporterProxy zProgressReporterProxy) { m_zReporterProxy = zProgressReporterProxy; }