Exemple #1
0
        public SearchWordIndicator Initialize(RestaurantSearchPage manager, SearchLog input)
        {
            this.manager = manager;
            logTag       = input.tag;
            log.text     = logTag;
            time.text    = input.time.ToString();//TODO 포맷잡아주기

            return(this);
        }
Exemple #2
0
        public void SearchButton()
        {
            foreach (string t in searchText.text.Split(' '))
            {
                if (t.Length == 0)
                {
                    continue;
                }

                SearchLog temp = new SearchLog()
                {
                    tag  = t,
                    time = DateTime.Now.ToString("MM") + "." + DateTime.Now.ToString("dd")
                };

                bool added = false;

                for (int i = 0; i < logs.Count; i++)
                {
                    SearchLog target = logs[i];

                    if (target.tag == temp.tag)
                    {
                        added       = true;
                        target.time = DateTime.Now.ToString("mm") + "." + DateTime.Now.ToString("dd");

                        break;
                    }
                }

                if (!added)
                {
                    logs.Add(temp);
                }
            }

            indicator.text = searchText.text;
            placeHolder.SetActive(searchText.text.Length == 0);
            Save();
            context.RefreshSearch();
            Close();
        }