Пример #1
0
        static void Main(string[] args)
        {
            DisplayMenu m = new DisplayMenu();

            m.HomeMenu();



            /* Console.WriteLine("What day do you want to see the sales of?")
             *
             * {
             *    Console.Write("Enter a state: ");
             *    string state = Console.ReadLine();
             *
             *    TaxRateOperations taxOps = new TaxRateOperations();
             *    if (taxOps.IsAllowedState(state))
             *    {
             *        Console.WriteLine("That is a valid state");
             *        TaxRate rate = taxOps.GetTaxRateFor(state);
             *
             *        Console.WriteLine("The tax rate for {0} is {1:p}", rate.State, rate.TaxPercent);
             *    }
             *    else
             *    {
             *        Console.WriteLine("That is not a valid state");
             *    }
             *
             *    Console.ReadLine();*/
        }
Пример #2
0
        public void OrderDisplay(Order order)
        {
            Console.WriteLine(@"Order number: {0}
             Customer Name: {1} 
             State: {2}
             Taxrate: {3:c}
             Product Type: {4}
             Material Cost Per Square Foot: {5:c}
             Labor Cost Per Square Foot: {6:c}
             Area: {7}
             Material Cost: {8:c}
             Labor Cost: {9:c}
             Tax: {10:C}
             Total: {11:C}"
                              , order.OrderNumber, order.CustomerName, order.State, order.TaxRate, order.ProductType,
                              order.MaterialCost, order.LaborCostPerSquareFoot, order.Area, order.MaterialCost,
                              order.LaborCost, order.Tax, order.Total);

            Console.WriteLine("Press enter to return to main menu:");
            string we = Console.ReadLine();

            if (string.IsNullOrEmpty(we))
            {
                DisplayMenu m = new DisplayMenu();
                m.MainMenu();
            }
        }
Пример #3
0
    void Start()
    {
        PC        = this.GetComponent <PlayerCharacter>();
        Inventory = this.GetComponent <CharacterInventory>().Inventory;
        CharacterInventory temp = this.GetComponent <CharacterInventory>();

        temp.Inventory.MaxInventorySize = 30;
        Equip = temp.Equipment;
        SetupPC();

        addering[0].AddToInventory(Inventory);
        addering[0].AddToInventory(Inventory);
        addering[0].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);

        Inventory.ItemsInInventory[0].Item.Use(Inventory, 0, PC);
        Menu = new  DisplayMenu(PC, Equip, Inventory);
        Menu.CloseInventory();
    }
Пример #4
0
        static void Main()
        {
            DisplayMenu Display = new DisplayMenu();

            DataBase.Init();

            Display.DisplayMenuOptions();
        }
Пример #5
0
    /// <summary>
    /// Creates a textual menu with data dimensions
    /// </summary>
    /// <param name="dobjs"></param>
    /// <returns></returns>
    GameObject createTextMenu(DisplayMenu dm, DataObject dobjs)
    {
        GameObject menu = new GameObject();

        dm.createTextMenu(menu, Color.black, Color.red);
        menu.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
        return(menu);
    }
Пример #6
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        DisplayMenu m = GetComponentInChildren <DisplayMenu>();

        if (m)
        {
            m.ToggleDisplay();
        }
    }
Пример #7
0
        private void ChooseCustomer_Click(object sender, RoutedEventArgs e) //This starts the order creation after customer is selected in the listbox
        {
            DisplayMenu dm = new DisplayMenu(mvm);

            if (dm.ShowDialog() == true)
            {
                MessageBox.Show("You have successfully created an order");
            }
        }
Пример #8
0
        //Double click on a costumer to open a new order for the selected costumer //Laur
        private void CustomerList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DisplayMenu dm = new DisplayMenu(mvm);

            if (dm.ShowDialog() == true)
            {
                MessageBox.Show("You have successfully created an order");
            }
        }
    void Start()
    // Prepares state
    {
        count       = 0;
        displayMenu = GameObject.Find("LeftController").GetComponent <DisplayMenu>();
        itemManager = GameObject.Find("Managers").GetComponent <ItemManager>();

        mainCamera = GameObject.FindGameObjectsWithTag("MainCamera")[0];
    }
Пример #10
0
 public Menu(DataManager dataManager)
 {
     DataManager = dataManager;
     DataManager.LoadData();
     InputMenu   = new InputMenu(DataManager);
     DisplayMenu = new DisplayMenu(DataManager);
     SearchMenu  = new SearchMenu(DataManager);
     ReportMenu  = new ReportMenu(DataManager);
 }
Пример #11
0
 public void CloseAll()
 {
     for (int i = 0; i < transform.childCount; ++i)
     {
         DisplayMenu menu = transform.GetChild(i).GetComponent <DisplayMenu>();
         if (menu != null)
         {
             menu.HideMenu();
         }
     }
 }
Пример #12
0
 private void Update()
 {
     if (Input.GetKeyUp(KeyCode.I) && Menu.Displayed)
     {
         Menu.CloseInventory();
     }
     if (Input.GetKeyUp(KeyCode.I) && !Menu.Displayed)
     {
         Menu = new DisplayMenu(PC, Equip, Inventory);
     }
 }
    void Start()
    // Prepares state
    {
        count       = 0;
        displayMenu = GameObject.Find("LeftController").GetComponent <DisplayMenu>();
        itemManager = GameObject.Find("Managers").GetComponent <ItemManager>();

        mainCamera = GameObject.FindGameObjectsWithTag("MainCamera")[0];
        GameObject.Find("RightController").GetComponent <VRTK_ControllerEvents>().AliasGrabOff +=
            new ControllerInteractionEventHandler(DoRemoveObject);
    }
Пример #14
0
    static void Main(string[] args)
    {
        DisplayMenu thisdm = new DisplayMenu();
        ProcessMenu thispm = new ProcessMenu();

        thisdm.displayMenu();
        int menuChoice = thispm.GetChoice();

        thispm.processMenu(menuChoice);
        Console.Read();
    }
Пример #15
0
 public void ToggleOnly(DisplayMenu toggleMenu)
 {
     for (int i = 0; i < transform.childCount; ++i)
     {
         DisplayMenu menu = transform.GetChild(i).GetComponent <DisplayMenu>();
         if (menu != null && toggleMenu != menu)
         {
             menu.HideMenu();
         }
     }
     toggleMenu.Action();
 }
Пример #16
0
    public void Start()
    {
        if (Serializer.IsDeserializing)
        {
            return;
        }
        if (Serializer.IsLoading)
        {
            return;
        }
        if (instance == null)
        {
            instance = this;
        }
        islandLerp        = 0f;
        airportBought     = false;
        trainBought       = false;
        airport           = GameObject.Find("Airport");
        train             = GameObject.Find("Train");
        popupManager      = GameObject.Find("Managers").GetComponent <PopupManager>();
        airportManager    = GameObject.Find("Managers").GetComponent <AirportManager>();
        trainManager      = GameObject.Find("Managers").GetComponent <TrainManager>();
        displayMenu       = GameObject.Find("LeftController").GetComponent <DisplayMenu>();
        firstIsland       = GameObject.Find("Island");
        secondIsland      = GameObject.Find("SecondIsland");
        setPosition       = new Vector3(1.9f, 0f, -58.8f);
        populationManager = GameObject.Find("Managers").GetComponent <PopulationManager>();
        AddIsland();
        levelReq = new Dictionary <int, int>();
        levelReq.Add(1, 10);
        levelReq.Add(2, 25);
        levelReq.Add(3, 50);
        levelReq.Add(4, 100);
        levelReq.Add(5, 175);
        levelReq.Add(6, 225);
        levelReq.Add(7, 300);
        levelReq.Add(8, 500);
        levelReq.Add(9, 750);
        levelReq.Add(10, 1000);
        levelReq.Add(11, 1500);
        levelReq.Add(12, 2000);
        levelReq.Add(13, 3000);
        levelReq.Add(14, 5000);
        levelReq.Add(15, 7500);
        levelReq.Add(16, 100000);



        Autelia.Coroutines.CoroutineController.StartCoroutine(this, "SlowUpdate");
    }
Пример #17
0
        static void Main(string[] args)
        {
            var options = new Options();

            if (!options.Headless)
            {
                //string path = System.IO.Directory.GetCurrentDirectory();
                var  menu = new DisplayMenu();
                bool done = false;

                while (!done)
                {
                    done = menu.run();
                }
            }
        }
Пример #18
0
        public void DrawMenu()
        {
            int choice;

            Console.Clear();
            Console.WriteLine("1. Nhap du lieu.");
            Console.WriteLine("2. Hien thi du lieu.");
            Console.WriteLine("3. Tim kiem du lieu.");
            Console.WriteLine("4. Bao cao.");
            Console.Write("Nhap vao lua chon cua ban : ");
            try
            {
                choice = Convert.ToInt32(Console.ReadLine());
            }
            catch (Exception e)
            {
                DrawMenu();
                throw;
            }
            switch (choice)
            {
            case 1:
                InputMenu.ShowInputMenu();
                DrawMenu();
                break;

            case 2:
                DisplayMenu.ShowDisplayMenu();
                break;

            case 3:
                SearchMenu.ShowSearchMenu();
                break;

            case 4:
                ReportMenu.ShowReportMenu();
                break;

            default:
                Console.WriteLine("Nhap sai, vui long nhap lai: ");
                DrawMenu();
                break;
            }
        }
Пример #19
0
 // Start is called before the first frame update
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
     Resume();
     //itemEntries = inventoryUI.transform.GetChild(1).GetChild(0).gameObject;
     //scrollbar = inventoryUI.transform.GetChild(3).gameObject;
     //Debug.Log(scrollbar.name);
     //CreateItemEntries();
     //ClearDescriptionBox();
     cursorIndex = 0;
     //ResetScrollbar();
     timeSinceInput = 0;
     playerBody     = GameObject.Find("Body");
 }
Пример #20
0
 public DisplayMenu GetDisplayMenuFromReader(IDataReader reader)
 {
     try
     {
         DisplayMenu displayMenu = new DisplayMenu
             (
                  DataAccessObject.IsNULL<int>(reader["MenuID"]),
                  DataAccessObject.IsNULL<int>(reader["ParentMenuID"]),
                  DataAccessObject.IsNULL<string>(reader["MenuTitle"]),
                  DataAccessObject.IsNULL<string>(reader["PageTitle"]),
                  DataAccessObject.IsNULL<string>(reader["PageURL"]),
                  DataAccessObject.IsNULL<int>(reader["ModuleID"])
             );
         //if (displayMenu.PageURL == null || displayMenu.PageURL == "")
         //    displayMenu.PageURL = "javascript:void(0);";
         return displayMenu;
     }
     catch (Exception ex)
     {
         return null;
     }
 }
Пример #21
0
    protected virtual void Update()
    {
        MovementController.cancel = true;

        bool exitInput            = MSChartEditorInput.GetInputDown(MSChartEditorInputActions.CloseMenu) && !editor.uiServices.popupBlockerEnabled;
        bool clickedOutSideWindow = Input.GetMouseButtonDown(0) && !RectTransformUtility.RectangleContainsScreenPoint(mouseArea, editor.uiServices.GetUIMousePosition());

        if (clickedOutSideWindow)
        {
            var         mouseMonitor         = editor.services.mouseMonitorSystem;
            var         uiUnderMouse         = mouseMonitor.GetUIRaycastableUnderPointer();
            DisplayMenu menu                 = uiUnderMouse ? uiUnderMouse.GetComponentInParent <DisplayMenu>() : null;
            bool        clickingObjectInMenu = menu && menu == this;

            clickedOutSideWindow &= !clickingObjectInMenu;
        }

        if (exitInput || clickedOutSideWindow || editor.errorManager.HasErrorToDisplay())
        {
            Disable();
        }
    }
Пример #22
0
        /**
         * Entry point for the program
         */
        public static void Main()
        {
            DisplayMenu displayMenu = new DisplayMenu();

            displayMenu.GarageMenuOption();
        }
Пример #23
0
 public void EnableMenu(DisplayMenu menu)
 {
     menu.gameObject.SetActive(true);
 }