示例#1
0
 public ConsoleMode(Mall mall)
 {
     Console.WriteLine("welcome to Great Mall eye");
     Console.WriteLine("press help to get commnds");
     Console.WriteLine("warning key sensteive!");
     this.Mall = mall;
     init();
 }
示例#2
0
        static void Main(string[] args)
        {
            string[] names = { "ica", "home2Home", "IKEA", "p2p", "SmookWeedEverDay" };
            string[] address = { "101", "324", "112", "201", "202" };
            string[] types = { "Supermarket", "furniture", "Swedish Meat Boll store", "Internet Hard/Software", "Pharmacy" };
            int[] emp = { 24, 3, 12, 2, 9 };

            Mall m = new Mall();
            for (int i = 0; i < names.Length; i++) {
                m.AddStore(new Store(names[i], address[i], types[i], emp[i]));
            }
            Console.WriteLine("{0,-16} {1, -8} {2, -25} {3}", "Name" , "Address", "Type", "employee");
            foreach (Store s in m.Stores) {
                Console.WriteLine(s);
            }

            m.AddStore(new Store("test", "201", "med", 12));
            Console.ReadLine();
        }
示例#3
0
文件: UI.cs 项目: Luviz/TheGreatMall
        public UI()
        {
            Mall = new Mall();
            // /*DEDUG - give us something to work w/
            string[] names = { "ica", "home2Home", "IKEA", "p2p", "SmookWeedEverDay" };
            string[] address = { "101", "324", "112", "201", "202" };
            string[] types = { "Supermarket", "furniture", "Swedish Meat Boll store", "Internet Hard/Software", "Pharmacy" };
            int[] emp = { 24, 3, 12, 2, 9 };

            for (int i = 0; i < names.Length; i++) {
                Mall.AddStore(new Store(names[i], address[i], types[i], emp[i]));
            }
            //*/

            Console.WriteLine("Wellecome to the Great Mall...");
            Console.WriteLine("plz wait til we are done booting!");
            MainMenu();
            Console.WriteLine();
            Console.Write("Press Enter to shutdown...");
        }