Inheritance: System.Windows.Controls.UserControl
Esempio n. 1
0
		/// <summary>
		/// Create all buttons and add its into toolbar. Override this method to create custom buttons
		/// </summary>
		protected override void InitializeButtons()
		{
			var btn = new SearchBar();
			btn.Name = "btnSearchBar";
			btn.CurrentRecordChanged += SearchBar_CurrentRecordChanged;
			btn.NeedSearch += SearchBar_NeedSearch;
			this.Items.Add(btn);
		}
Esempio n. 2
0
		private void OnNeedSearch(SearchBar item, string searchText)
		{
			var tssb = item as SearchBar;
			if (tssb == null)
				return;
			StartSearch(tssb, searchText);
		}
Esempio n. 3
0
		private void StartSearch(SearchBar sb, string searchText)
		{
			StopSearch();
			if (searchText == "")
				return;
			_search.Start(searchText, sb.FindFlags);
			_foundTextTimer.Start();
		}
Esempio n. 4
0
		private void OnCurrentRecordChanged(SearchBar item, int currentRecord)
		{
			ScrollToRecord(currentRecord);
		}