private void LoseSearchAreaFocusRectMouseUp(object sender, MouseButtonEventArgs e)
 {
     Panel.SetZIndex(MainWindowOverlayRectangleForSearch, -1);
     SearchTextbox.Text = "Search..";
     Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() => { BroadcastingList.ItemsSource = broadcastingPeersList; BroadcastingList.Items.Refresh(); }));
     Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) delegate { SearchTextbox.SelectAll(); });
 }
Beispiel #2
0
 public static void TypeAndSearch(string searchText)
 {
     SearchTextbox.Clear();
     SearchTextbox.SendKeys(searchText);
     SearchButton.Click();
     CurrentDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
 }
Beispiel #3
0
        // יש הבדל בין החיפוש הזה לקודם
        //נשים לב שהחיפוש התבצע לפי איי דיי אבל בתוספת השניה
        // החיפוש היה לפי האשטאג ולכן החלפנו את החיפוש לפי
        //CssSelector

        public ResultPage NavigateToResultPage()
        {
            // ניצור מתודה שמקבלת את האלמנטים מהקלאס ועושה עליהם פעולות
            SearchTextbox.SendKeys("Selenium c# by bakkappa n");
            SearchButton.Click();
            Thread.Sleep(3000);
            return(new ResultPage(driver)); // ברגע שעוברים בין דפים יש לדאוג שהדרייבר מאותחל נכון ולכן נחזיר אותו לפי המקום הנוכחי
        }
Beispiel #4
0
        public string Searching(string searchdata)
        {
            SearchTextbox.Click();
            SearchTextbox.SendKeys(searchdata);
            SearchButton.Click();
            string AfterSearchTitle = webdriver.Title;

            return(AfterSearchTitle);
        }
Beispiel #5
0
 public MapPage SearchLocation()
 {
     SearchTextbox.SendKeys("Los ");
     Thread.Sleep(1000);
     SearchTextbox.SendKeys(Keys.Down + Keys.Enter);
     Thread.Sleep(5000);
     driver.SwitchTo().Window(driver.WindowHandles[1]);
     return(new MapPage(driver));
 }
Beispiel #6
0
        private async void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            if (SpreekwoordenPivot.SelectedItem != SeachPivot)
            {
                SpreekwoordenPivot.SelectedItem = SeachPivot;
                await Task.Delay(150);

                SearchTextbox.Focus(FocusState.Programmatic);
            }
            else
            {
                if (SearchTextbox.Text.Length > 0)
                {
                    await Search();
                }
                else
                {
                    await Task.Delay(50);

                    SearchTextbox.Focus(FocusState.Programmatic);
                }
            }
        }
Beispiel #7
0
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                listbox1.ItemsSource = null;

                if (SearchButton.IsChecked == true)
                {
                    listbox1.Items.Clear();
                    SearchButton.Content = "Search Off";


                    IEnumerable <Product> foundObjects = ComplateProductsList.Where((myObject) => myObject.ProductName.Equals(SearchTextbox.Text, StringComparison.OrdinalIgnoreCase));


                    //v = ComplateProductsList.FindAll(y => y.ProductName == SearchTextbox.Text);


                    //var result = ComplateProductsList.Where(x => x.ProductName == SearchTextbox.Text);
                    listbox1.ItemsSource = foundObjects;
                }


                else
                {
                    listbox1.ItemsSource = null;
                    SearchButton.Content = "Search On";

                    listbox1.ItemsSource = ComplateProductsList;

                    SearchTextbox.Clear();
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #8
0
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     LoadingControl.SetLoadingStatus(false);
     SearchTextbox.Focus(Windows.UI.Xaml.FocusState.Pointer);
 }
        private void SearchTextboxKeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key.ToString() == "Escape")
            {
                SearchTextbox.Text = "Search..";
                Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() => { BroadcastingList.ItemsSource = broadcastingPeersList; BroadcastingList.Items.Refresh(); }));
                Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) delegate { SearchTextbox.SelectAll(); });
                return;
            }

            List <PeerDataContainer> _clientsMatchingSearchText = new List <PeerDataContainer>();

            foreach (PeerDataContainer _peer in broadcastingPeersList)
            {
                if (_peer.nick.ToLower().Contains(SearchTextbox.Text.ToLower()))
                {
                    _clientsMatchingSearchText.Add(_peer);
                }
            }

            Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() => { BroadcastingList.ItemsSource = _clientsMatchingSearchText; BroadcastingList.Items.Refresh(); }));
        }
 private void SearchAreaGotFocus(object sender, RoutedEventArgs e)
 {
     Panel.SetZIndex(MainWindowOverlayRectangleForSearch, 35);
     Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) delegate { SearchTextbox.SelectAll(); });
 }