bool IFormatsWizardScenario.Next() { switch (stage) { case 0: if (!importPage.ValidateInput() || !importPage.GenerateGrammar(doc.DocumentElement)) { return(false); } break; case 1: if (savePage.FileNameBasis == "") { savePage.FileNameBasis = identityPage.GetDefaultFileNameBasis(); } break; case 2: break; case 3: host.Finish(); break; } if (stage == 3) { return(false); } ++stage; return(true); }
bool IFormatsWizardScenario.Next() { int nextStage = stage + 1; switch (stage) { case 0: if (!importPage.ValidateInput()) { return(false); } if (!GenerateGrammar()) { return(false); } if (NeedToShowImportLogPage) { importLogPage.UpdateView(importPage.GetSelectedLayout(), importLog); nextStage = 1; } else { nextStage = 2; } break; case 1: if (importLog.HasErrors) { return(false); } break; case 2: if (savePage.FileNameBasis == "") { savePage.FileNameBasis = identityPage.GetDefaultFileNameBasis(); } break; case 3: break; case 4: host.Finish(); break; } if (stage == 4) { return(false); } stage = nextStage; return(true); }
bool IFormatsWizardScenario.Next() { try { System.IO.File.Delete(format.Location); } catch (Exception e) { alerts.ShowPopup("Error", e.Message, AlertFlags.Ok | AlertFlags.WarningIcon); return(false); } host.Finish(); return(false); }
bool IFormatsWizardScenario.Next() { if (stage == 1) { if (savePage.FileNameBasis == "") savePage.FileNameBasis = identityPage.GetDefaultFileNameBasis(); } if (stage == 3) { host.Finish(); return false; } ++stage; return stage < 3; }