private void Start() { listManager = FindObjectOfType<FindList>(); findSprites = GameObject.FindGameObjectsWithTag("find"); clickableSprites = GameObject.FindGameObjectsWithTag("clickable"); untaggedSprites = FindObjectsOfType<Image>(); }
/// <summary> /// Render a list of findItems (Works for both Find in Open documents and Find in Files) /// </summary> /// <param name="findItems"></param> public void Render(FindList findItems) { _findText = findItems.Find; _findLength = _findText.Length; TreeFind.BeginUpdate(); TreeFind.Nodes.Clear(); try { FindItem lastItem = null; TreeNode parentNode = null; foreach (FindItem item in findItems.Items) { if (lastItem == null || lastItem.FileName != item.FileName || lastItem.Document != item.Document) { parentNode = new TreeNode(item.Name); TreeFind.Nodes.Add(parentNode); } TreeNode node = new TreeNode(item.Text); node.Tag = item; parentNode.Nodes.Add(node); lastItem = item; } // Expand all results. TreeFind.ExpandAll(); } catch { } TreeFind.EndUpdate(); }
// Use this for initialization private void Start() { listManager = FindObjectOfType<FindList>(); gridObjects = GameObject.FindGameObjectsWithTag("Grid"); GeneratePanels(); DisableInactiveGrids(); }
public static void FindInOpen(string searchText, bool matchWholeWord, bool matchCase, int searchMode) { FindList findList = new FindList(searchText); foreach (FormDocument document in _Documents) { List <FindItem> items = document.FindAll(searchText, matchWholeWord, matchCase, searchMode); if (items != null && items.Count > 0) { findList.Items.AddRange(items); } } _MainForm.FindInFiles(findList); }
public void FindInFiles(FindList findList) { // Make sure there is actually something to display if (findList == null || findList.Items == null || findList.Items.Count == 0) { return; } if (DockingManager.FindInFiles == null || DockingManager.FindInFiles.IsDisposed) { DockingManager.FindInFiles = new FormFindInFiles(); DockingManager.FindInFiles.Show(DockingPanel, DockState.DockBottom); } if (DockingManager.FindInFiles != null) { if (DockingManager.FindInFiles.DockState == DockState.DockBottomAutoHide || DockingManager.FindInFiles.DockState == DockState.DockRightAutoHide || DockingManager.FindInFiles.DockState == DockState.DockLeftAutoHide || DockingManager.FindInFiles.DockState == DockState.DockTopAutoHide) { DockingPanel.ActiveAutoHideContent = DockingManager.FindInFiles; DockingManager.FindInFiles.Focus(); } DockingManager.FindInFiles.Render(findList); } }
// Use this for initialization void Start() { count = FindObjectOfType<FindList>(); }
public static List <FindList> FindReturnList(string ID, string VendorID, string OrderDate1, string OrderDate2, string DepartMentID, string ProductMo, string ProductID) { string strSql = @"Select a.ID,Convert(varchar(10),a.OrderDate,120) as OrderDate,a.VendorID,a.DepartMentID,b.Seq,b.ProductMo,b.ProductID,b.ProductCdesc, Convert(int,b.OrderQty) as OrderQty,b.OrderUnit,b.Price,b.PriceUnit,b.TotalSum FROM pu_BuyHead a,pu_BuyDetails b Where a.ID=b.ID AND a.Ver=b.Ver "; if (string.IsNullOrEmpty(ID) && string.IsNullOrEmpty(OrderDate1) && string.IsNullOrEmpty(OrderDate2) && string.IsNullOrEmpty(VendorID) && string.IsNullOrEmpty(DepartMentID) && string.IsNullOrEmpty(ProductMo) && string.IsNullOrEmpty(ProductID) ) { strSql += " AND 1=0 ";//返加空數據 } else { if (!string.IsNullOrEmpty(ID)) { strSql += " AND a.ID Like '%" + ID + "%'"; } if (!string.IsNullOrEmpty(OrderDate1)) { strSql += " AND a.OrderDate>='" + OrderDate1 + "'"; } if (!string.IsNullOrEmpty(OrderDate2)) { strSql += " AND a.OrderDate<='" + OrderDate2 + "'"; } if (!string.IsNullOrEmpty(VendorID)) { strSql += " AND a.VendorID Like '%" + VendorID + "%'"; } if (!string.IsNullOrEmpty(DepartMentID)) { strSql += " AND a.DepartMentID Like '%" + DepartMentID + "%'"; } strSql += " AND a.state<>'2'"; if (!string.IsNullOrEmpty(ProductMo)) { strSql += " AND b.ProductMo Like '%" + ProductMo + "%'"; } if (!string.IsNullOrEmpty(ProductID)) { strSql += " AND b.ProductID Like '%" + ProductID + "%'"; } } DataTable dt = SQLHelper.ExecuteSqlReturnDataTable(strSql); List <FindList> lstPur = new List <FindList>(); for (int i = 0; i < dt.Rows.Count; i++) { DataRow dr = dt.Rows[i]; FindList mdj = new FindList(); mdj.ID = dr["ID"].ToString(); mdj.OrderDate = dr["OrderDate"].ToString(); mdj.VendorID = dr["VendorID"].ToString(); mdj.Seq = dr["Seq"].ToString(); mdj.ProductMo = dr["ProductMo"].ToString(); mdj.ProductID = dr["ProductID"].ToString(); mdj.ProductCdesc = dr["ProductCdesc"].ToString(); mdj.OrderQty = Convert.ToInt32(dr["OrderQty"].ToString()); mdj.OrderUnit = dr["OrderUnit"].ToString(); mdj.Price = string.IsNullOrEmpty(dr["Price"].ToString()) ? 0 : decimal.Parse(dr["Price"].ToString()); mdj.PriceUnit = dr["PriceUnit"].ToString(); mdj.TotalSum = string.IsNullOrEmpty(dr["TotalSum"].ToString()) ? 0 : decimal.Parse(dr["TotalSum"].ToString()); mdj.DepartMentID = dr["DepartMentID"].ToString(); lstPur.Add(mdj); } return(lstPur); }