예제 #1
0
        public async void Run()
        {
            int choice = 0;

            do
            {
                IMenu castMenu = new CastMenu();
                choice = castMenu.PrintMenu();
                switch (choice)
                {
                case (int)CastMenuOptions.Insert:
                    //await AddCastAsync();
                    AddCastAsync().Wait();
                    break;

                case (int)CastMenuOptions.Delete:
                    //await DeleteCastAsync();
                    DeleteCastAsync().Wait();
                    break;

                case (int)CastMenuOptions.Print:
                    //await PrintAllAsync();
                    PrintAllAsync().Wait();
                    break;

                case (int)CastMenuOptions.Update:
                    //await UpdateCastAsync();
                    UpdateCastAsync().Wait();
                    break;

                case (int)CastMenuOptions.GetCastWithMovie:
                    //await GetCastByIdWithMovieAsync();
                    GetCastByIdWithMovieAsync().Wait();
                    break;

                case (int)CastMenuOptions.Exit:
                    Console.WriteLine("Thanks for your visit. Please visit the Cast System again !!!!");
                    break;

                default:
                    Console.WriteLine("Invalid Option");
                    break;
                }

                if (choice != (int)CastMenuOptions.Exit)
                {
                    Console.WriteLine("Press Enter to continue.......");
                    Console.ReadLine();
                    Console.Clear();
                }
            } while (choice != (int)CastMenuOptions.Exit);
        }
예제 #2
0
        public void Run()
        {
            int choice = 0;

            do
            {
                IMenu castMenu = new CastMenu();
                choice = castMenu.PrintMenu();
                switch (choice)
                {
                case (int)CastMenuOption.Insert:
                    AddCastAsync().Wait();
                    break;

                case (int)CastMenuOption.Delete:
                    DeleteCastAsync().Wait();
                    break;

                case (int)CastMenuOption.Print:
                    PrintAllAsync().Wait();
                    break;

                case (int)CastMenuOption.Update:
                    UpdateCastAsync().Wait();
                    break;

                case (int)CastMenuOption.GetCastById:
                    PrintCastByIdAsync().Wait();
                    break;

                case (int)CastMenuOption.Exit:
                    Console.WriteLine("Thanks for your visit. Please visit the Cast Menu again !!!!");
                    break;

                default:
                    Console.WriteLine("Invalid Option");
                    break;
                }

                if (choice != (int)CastMenuOption.Exit)
                {
                    //Console.WriteLine("genre " + choice);
                    Console.WriteLine("Press Enter to continue.......");
                    Console.ReadLine();
                    Console.Clear();
                }
            } while (choice != (int)CastMenuOption.Exit);
        }
예제 #3
0
        public void RunAsync()
        {
            int      choice = 0;
            CastMenu m      = new CastMenu();

            do
            {
                choice = m.PrintMenu();

                switch (choice)
                {
                case (int)CastOption.Insert:
                    AddCastAsync().Wait();
                    break;

                case (int)CastOption.Update:
                    UpdateCastAsync().Wait();
                    break;

                case (int)CastOption.Delete:
                    DeleteCastAsync().Wait();
                    break;

                case (int)CastOption.PrintAll:
                    PrintAllAsync().Wait();
                    break;

                case (int)CastOption.PrintById:
                    PrintByIdAsync().Wait();
                    break;

                case (int)CastOption.Exit:
                    Console.WriteLine("Thanks for visit. Please Visit Again!!!!");
                    break;

                default:
                    Console.WriteLine("Invalid Option");
                    break;
                }
                if (choice != (int)CastOption.Exit)
                {
                    Console.WriteLine("Press Enter to continue......");
                    Console.ReadLine();
                    Console.Clear();
                }
            } while (choice != (int)CastOption.Exit);
        }
예제 #4
0
 public static void MenuInit()
 {
     CastMenu = VolatileMenu.AddSubMenu("Cast Manager", "castmenu", "Volatile CastManager");
     CastMenu.AddGroupLabel("Target Manager");
     CastMenu.Add("chosenignores", new CheckBox("Ignore all other champions if Selected Target", false));
     CastMenu.AddGroupLabel("HitChance Settings");
     if (QChance != null)
     {
         CastMenu.Add("q", new Slider("Q", 1, 0, 2)).OnValueChange += OnSliderChange;
     }
     if (WChance != null)
     {
         CastMenu.Add("w", new Slider("W", 1, 0, 2)).OnValueChange += OnSliderChange;
     }
     if (EChance != null)
     {
         CastMenu.Add("e", new Slider("E", 1, 0, 2)).OnValueChange += OnSliderChange;
     }
     if (RChance != null)
     {
         CastMenu.Add("r", new Slider("R", 1, 0, 2)).OnValueChange += OnSliderChange;
     }
     UpdateSliders();
 }
예제 #5
0
 private void CastMenuToggle(bool State)
 {
     CastMenu.SetActive(State);
     CastDisplays.gameObject.SetActive(State);
 }