private void ActivateSearchUi() { if (_searchWindow == null) { _searchWindow = new SearchWindow(_appContext); } if (_searchCountDown == null) { _searchCountDown = new Timer(500) {AutoReset = false}; _searchCountDown.Elapsed += (o, args) => ProcessSearch(); } SearchRosterList.ContactsView.View.Refresh(); DashboardData.SearchContactsVisibility = 0; ActiveContent.Content = _searchWindow; _searchWindow.SetAsMain(this); }
/// <summary> /// Reset the dashboard (normally on disconnect) /// </summary> internal void Reset() { if (!Dispatcher.CheckAccess()) Dispatcher.Invoke(new Action(Reset)); else { ActiveContent.Content = null; _searchWindow = null; } }