static void Main(string[] args) { //Console.WriteLine("Hello World!"); //int fish; //Console.WriteLine("Enter fish num : "); //fish = Convert.ToInt32(Console.ReadLine()); //MarketPlace mp = new MarketPlace(); //MarketInventory mi = new MarketInventory(); //mp.SaleEvent += mi.SaleRuiAmount; //mp.saleMethod(fish); MarketInventory mi = new MarketInventory(); //FishTank fishTank = new FishTank(); //Thread thread = new Thread(new ThreadStart(fishTank.generatefish)); //thread.Start(); mi.ruifishListMethod(); mi.katlafishListMethod(); mi.IlishfishListMethod(); while (true) { User user = new User(); user.userNeed(); } }
//int count = 0; public void userNeed() { Console.WriteLine("option select : "); int option; option = Convert.ToInt32(Console.ReadLine()); //int count = 0; MarketPlace mp = new MarketPlace(); MarketInventory mi = new MarketInventory(); if (option == 1) { Console.WriteLine("Rui Fish sale amount : "); fish = Convert.ToInt32(Console.ReadLine()); mp.SaleEvent += mi.SaleRuiAmount; mp.saleMethod(fish); } else if (option == 2) { Console.WriteLine("Katla fish sale amount : "); katlaFish = Convert.ToInt32(Console.ReadLine()); mp.SaleEvent += mi.SaleKatlaAmount; mp.saleMethod(katlaFish); } else if (option == 3) { Console.WriteLine("Ilish fish sale amount : "); IlishFish = Convert.ToInt32(Console.ReadLine()); mp.SaleEvent += mi.SaleIlishAmount; mp.saleMethod(IlishFish); } }