Exemplo n.º 1
0
        private void SetItemNumberText(int index, int arrayCount, string objectName)
        {
            var artworkNumberObjects = GameObjectFinder.FindMultipleObjectsByName(objectName);
            var artworkNumberObject  = artworkNumberObjects[0];

            artworkNumberObject.GetComponent <TMP_Text>().text = (index + 1) + "/" + arrayCount;
        }
Exemplo n.º 2
0
        public void OnInputValueChangedNameField(string customerName)
        {
            var orderEntryObjects = GameObjectFinder.FindMultipleObjectsByName("OrderEntry(Clone)");

            for (int i = 0; i < orderEntryObjects.Length; i++)
            {
                var entryName = orderEntryObjects[i].transform.GetChild(3).GetComponent <TMP_Text>().text;

                orderEntryObjects[i].SetActive(entryName.Contains(customerName));
            }
        }
Exemplo n.º 3
0
        public void OnDeselectDateEnd(string inputDate)
        {
            var orderEntryObjects = GameObjectFinder.FindMultipleObjectsByName("OrderEntry(Clone)");

            if (inputDate != "")
            {
                return;
            }

            for (int i = 0; i < orderEntryObjects.Length; i++)
            {
                orderEntryObjects[i].SetActive(true);
            }
        }
Exemplo n.º 4
0
        public void DateEndField(string inputDate)
        {
            if (inputDate.Length < 10)
            {
                return;
            }

            var orderEntryObjects = GameObjectFinder.FindMultipleObjectsByName("OrderEntry(Clone)");

            for (int i = 0; i < orderEntryObjects.Length; i++)
            {
                var entryDate = orderEntryObjects[i].transform.GetChild(2).GetComponent <TMP_Text>().text;

                orderEntryObjects[i].SetActive(IsValidEntryDateEnd(entryDate, inputDate));
            }
        }
Exemplo n.º 5
0
        public void ReorderByDate()
        {
            var downArrow = GameObjectFinder.FindSingleObjectByName("DateFilter");

            downArrow.transform.rotation = Quaternion.Euler(0, 0, 90);

            var orderEntryObjects = GameObjectFinder.FindMultipleObjectsByName("OrderEntry(Clone)");

            for (int i = 0; i < orderEntryObjects.Length; i++)
            {
                for (int j = i + 1; j < orderEntryObjects.Length; j++)
                {
                    var yearI  = GetYear(orderEntryObjects[i]);
                    var monthI = GetMonth(orderEntryObjects[i]);
                    var dayI   = GetDay(orderEntryObjects[i]);

                    var yearJ  = GetYear(orderEntryObjects[j]);
                    var monthJ = GetMonth(orderEntryObjects[j]);
                    var dayJ   = GetDay(orderEntryObjects[j]);

                    if (yearI < yearJ)
                    {
                        SwapTransformPositions(orderEntryObjects[i], orderEntryObjects[j]);
                    }

                    if (yearI != yearJ)
                    {
                        continue;
                    }

                    if (monthI < monthJ)
                    {
                        SwapTransformPositions(orderEntryObjects[i], orderEntryObjects[j]);
                    }

                    if (monthI != monthJ)
                    {
                        continue;
                    }

                    if (dayI < dayJ)
                    {
                        SwapTransformPositions(orderEntryObjects[i], orderEntryObjects[j]);
                    }
                }
            }
        }
Exemplo n.º 6
0
        private void FilterOrdersByStatus(string status)
        {
            var orderEntryObjects = GameObjectFinder.FindMultipleObjectsByName("OrderEntry(Clone)");

            if (status == "All")
            {
                foreach (var entryObject in orderEntryObjects)
                {
                    entryObject.SetActive(true);
                }
                return;
            }

            for (int i = 0; i < orderEntryObjects.Length; i++)
            {
                orderEntryObjects[i].SetActive(orderEntryObjects[i].GetComponent <OrderEntryUniqueCode>().entryStatus == status);
            }
        }