Пример #1
0
        static Flight[] EditStruct(Flight[] Plane)
        {
            bool temp;

            Console.WriteLine();
            Console.ForegroundColor = System.ConsoleColor.Yellow;
            Console.Write("Input number flight: ");
            Console.ForegroundColor = System.ConsoleColor.White;
            for (int i = 0; i < Plane.Length; i++)
            {
                Console.Write(Plane[i].NumberFlight + " ; ");
            }
            Console.WriteLine();
            string numbFlight = Console.ReadLine();

            for (int i = 0; i < Plane.Length; i++)
            {
                NFlight j = Plane[i].NumberFlight;
                if ((j).ToString() == numbFlight)
                {
                    Console.ForegroundColor = System.ConsoleColor.Yellow;
                    Console.Write("Input new city:");
                    Console.ForegroundColor = System.ConsoleColor.White;
                    Console.WriteLine();
                    Plane[i].City = Console.ReadLine();
                    Console.WriteLine();

                    Console.ForegroundColor = System.ConsoleColor.Yellow;
                    Console.Write("Input new Air Line : ");
                    Console.ForegroundColor = System.ConsoleColor.White;

                    foreach (var value in Enum.GetValues(typeof(AirLane))) // List of AirLane
                    {
                        Console.Write((AirLane)value + " ;");
                    }

                    AirLane airlane = Plane[i].AirLine;
                    temp             = Enum.TryParse(Console.ReadLine(), out airlane);
                    Plane[i].AirLine = airlane;

                    Console.ForegroundColor = System.ConsoleColor.Yellow;
                    Console.Write("Input new terminal : ");
                    Console.ForegroundColor = System.ConsoleColor.White;

                    foreach (var value in Enum.GetValues(typeof(TerminalE))) // List of Terminal
                    {
                        Console.Write((TerminalE)value + " ;");
                    }
                    Console.WriteLine();
                    TerminalE terminal = Plane[i].Terminal;
                    temp = Enum.TryParse(Console.ReadLine(), out terminal);
                    Plane[i].Terminal = terminal;
                }
            }
            return(Plane);
        }
Пример #2
0
        private void button17_Click(object sender, EventArgs e)
        {
            this.rsPoint();
            this.timer1.Stop();
            this.timer2.Stop();
            this.timer3.Stop();
            this.timer4.Stop();

            this.panel2.Refresh();
            this.play = 1;
            hinh4     = new AirLane();
            hinh4.Draw(g);
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();
            g     = this.panel2.CreateGraphics();
            hinh1 = new Hinh1(this.g);
            hinh2 = new Universe(this.g);
            hinh3 = new Car3d();
            hinh4 = new AirLane();

            this.chedo = 0;
            this.hinh  = 0;
            this.play  = 0;
            this.color = Color.Black;

            this.p1 = new Point(-1, -1);
            this.p2 = new Point(-1, -1);
            this.p3 = new Point(-1, -1);
        }