Skip to content

Commit

Permalink
cevap anahtarı dosyaları üretilcek daha
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasbozdemir committed Mar 20, 2024
1 parent b38af54 commit 66733af
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions quiz-console-app/Services/ExportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public void Export(ExportType exportType)
Console.Write("Kaç kitapçık dışa aktarılacak?: ");
int bookletCount = int.Parse(Console.ReadLine());

_quizService.GenerateBooklets(bookletCount);
_userAnswers = new List<UserAnswerKeyViewModel>();
_answerKeys = QuizService.AnswerKeys;
Booklets = QuizService.Booklets;

Console.WriteLine("Dışa aktarma yöntemi seçin:");
Console.WriteLine("1. Tüm kitapçıkları tek dosyada dışa aktar");
Expand Down Expand Up @@ -63,27 +67,24 @@ public void Export(ExportType exportType)
break;

case 2:
switch (exportType)
{
case ExportType.Json:
ExportEachToJson();
break;
case ExportType.Xml:
ExportEachToXml();
break;
default:
Console.WriteLine("Invalid export type.");
break;
}
break;

default:
Console.WriteLine("Geçersiz giriş. Lütfen 1 veya 2 girin.");
break;
}


Console.WriteLine("Kitapçıklar oluşturuluyor.");
_quizService.GenerateBooklets(bookletCount);

Console.Clear();

Console.WriteLine("Kitapçıklar oluşturuldu.");

_userAnswers = new List<UserAnswerKeyViewModel>();
_answerKeys = QuizService.AnswerKeys;
Booklets = QuizService.Booklets;



}


Expand Down Expand Up @@ -159,7 +160,6 @@ public void ExportEachToXml()
Console.ReadLine();
}


public void ExportToXml(string bookletName)
{

Expand Down

0 comments on commit 66733af

Please sign in to comment.