// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : SecureDigital.cs // Author(s) : Natalia Portillo // // Component : Aaru device testing. // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2025 Natalia Portillo // ****************************************************************************/ using Aaru.Console; using Aaru.Devices; using Aaru.Tests.Devices.SecureDigital; namespace Aaru.Tests.Devices; static partial class MainClass { public static void SecureDigital(string devPath, Device dev) { while(true) { System.Console.Clear(); AaruConsole.WriteLine(Localization.Device_0, devPath); AaruConsole.WriteLine(Localization.Send_an_SecureDigital_MultiMediaCard_command_to_the_device); AaruConsole.WriteLine(Localization._1_Send_a_SecureDigital_command_to_the_device); AaruConsole.WriteLine(Localization._2_Send_a_MultiMediaCard_command_to_the_device); AaruConsole.WriteLine(Localization.Return_to_command_class_menu); AaruConsole.Write(Localization.Choose); string strDev = System.Console.ReadLine(); if(!int.TryParse(strDev, out int item)) { AaruConsole.WriteLine(Localization.Not_a_number_Press_any_key_to_continue); System.Console.ReadKey(); continue; } switch(item) { case 0: AaruConsole.WriteLine(Localization.Returning_to_command_class_menu); return; case 1: Devices.SecureDigital.SecureDigital.Menu(devPath, dev); continue; case 2: MultiMediaCard.Menu(devPath, dev); continue; default: AaruConsole.WriteLine(Localization.Incorrect_option_Press_any_key_to_continue); System.Console.ReadKey(); continue; } } } }