public void CreateList()
 {
     if (windowOpen)
     {
         DispensaryUIPanel dispensaryUIPanel = gameObject.GetComponent <DispensaryUIPanel>();
         if (dispensaryUIPanel != null)
         {
             dispensaryUIPanel.CreateList(searchBar.GetText());
         }
         StoreObjectUIPanel storeObjectPanel = gameObject.GetComponent <StoreObjectUIPanel>();
         if (storeObjectPanel != null)
         {
             storeObjectPanel.CreateStoreObjectsList(searchBar.GetText());
         }
     }
 }
    public void Search()
    {
        DispensaryUIPanel dispensaryPanel = gameObject.GetComponent <DispensaryUIPanel>();

        if (dispensaryPanel != null)
        {
            dispensaryPanel.Search(searchBar.GetText());
        }
        CompanyUIPanel companyPanel = gameObject.GetComponent <CompanyUIPanel>();

        if (companyPanel != null)
        {
        }
        StoreObjectUIPanel storeObjectPanel = gameObject.GetComponent <StoreObjectUIPanel>();

        if (storeObjectPanel != null)
        {
            storeObjectPanel.CreateStoreObjectsList(searchBar.GetText());
        }
    }
    public void OpenWindow()
    {
        if (uiManager == null)
        {
            uiManager = GameObject.Find("UIManager").GetComponent <UIManager_v5>();
        }
        uiManager.CloseAllWindows();
        gameObject.SetActive(true);
        DispensaryUIPanel dispensaryPanel = gameObject.GetComponent <DispensaryUIPanel>();

        if (dispensaryPanel != null)
        {
            dispensaryPanel.OnWindowOpen(0);
        }
        CompanyUIPanel companyPanel = gameObject.GetComponent <CompanyUIPanel>();

        if (companyPanel != null)
        {
            companyPanel.OnWindowOpen(0);
        }
        StoreObjectUIPanel storeObjectPanel = gameObject.GetComponent <StoreObjectUIPanel>();

        if (storeObjectPanel != null)
        {
            storeObjectPanel.OnWindowOpen();
        }
        ComponentUIPanel componentPanel = gameObject.GetComponent <ComponentUIPanel>();

        if (componentPanel != null)
        {
            componentPanel.OnWindowOpen();
        }
        CalendarUIPanel calendarPanel = gameObject.GetComponent <CalendarUIPanel>();

        if (calendarPanel != null)
        {
            calendarPanel.OpenCalendar();
        }
        windowOpen = true;
    }