示例#1
0
文件: Program.cs 项目: gmyrak/books
        static void Main(string[] args)
        {
            Console.WriteLine("Library management system (C) Gmyrak Dmitry\n");

            String dbName     = "books.db";
            String fullDbName = GetFullDbName(dbName);

            if (fullDbName == null)
            {
                Console.WriteLine($"Database file {dbName} not found");
                Environment.Exit(1);
            }
            Console.WriteLine($"Using database file: {fullDbName}\n");

            BooksStorage  bs = new BooksStorage(fullDbName);
            UserInterface ui = new UserInterface(bs);

            ui.MainMenu();

            Console.WriteLine("Bye!");
        }
示例#2
0
文件: Program.cs 项目: gmyrak/books
 public UserInterface(BooksStorage database)
 {
     this.db = database;
 }