Exemplo n.º 1
0
 private void Image_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (!string.IsNullOrEmpty(SearchTextBox.Text))
     {
         if (onRemote)
         {
             SearchTextBox.Text = string.Empty;
             return;
         }
         var searchScreen = new SearchResultScreen();
         searchScreen.SetQuery(SearchTextBox.Text);
         StaticMainWindow.Window.ChangeScreen(searchScreen);
         SearchTextBox.Text = string.Empty;
     }
 }
Exemplo n.º 2
0
 private void SearchTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter && !string.IsNullOrEmpty(SearchTextBox.Text))
     {
         if (onRemote)
         {
             SearchTextBox.Text = string.Empty;
             return;
         }
         var searchScreen = new SearchResultScreen();
         searchScreen.SetQuery(SearchTextBox.Text);
         StaticMainWindow.Window.ChangeScreen(searchScreen);
         SearchTextBox.Text = string.Empty;
     }
     if (e.Key == Key.Escape)
     {
         SearchTextBox.Text = string.Empty;
     }
 }
Exemplo n.º 3
0
 private UserControl GetCurrentScreen()
 {
     switch (ScreenList[CurrentIndex].Type)
     {
         case Screen.ScreenType.StoreScreen:
             var storeScreen = new NewStoreScreen();
             storeScreen.SetInfo(false);
             return storeScreen;
         case Screen.ScreenType.MotionDetail:
             var motionScreen = new MotionDetailScreen();
             var motionID = (ulong)ScreenList[CurrentIndex].Parameter;
             motionScreen.SetInfo(motionID, false);
             return motionScreen;
         case Screen.ScreenType.ArtistDetail:
             var artistScreen = new ArtistDetailScreen();
             var artistID = (ulong)ScreenList[CurrentIndex].Parameter;
             artistScreen.SetInfo(artistID, false);
             return artistScreen;
         case Screen.ScreenType.Search:
             var searchScreen = new SearchResultScreen();
             var query = (string)ScreenList[CurrentIndex].Parameter;
             searchScreen.SetQuery(query, false);
             return searchScreen;
         case Screen.ScreenType.SeeAll:
             var seeAllScreen = new SeeAllScreen();
             var category = (string)ScreenList[CurrentIndex].Parameter;
             seeAllScreen.SetCategory(category, false);
             return seeAllScreen;
         default:
             Debug.Fail(string.Format("GetCurrentScreen error, index: {0}", CurrentIndex));
             return null;
     }
     return null;
 }
Exemplo n.º 4
0
 private void Image_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (!string.IsNullOrEmpty(SearchTextBox.Text))
     {
         if (onRemote)
         {
             SearchTextBox.Text = string.Empty;
             return;
         }
         var searchScreen = new SearchResultScreen();
         searchScreen.SetQuery(SearchTextBox.Text);
         StaticMainWindow.Window.ChangeScreen(searchScreen);
         SearchTextBox.Text = string.Empty;
     }
 }
Exemplo n.º 5
0
 private void SearchTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter && !string.IsNullOrEmpty(SearchTextBox.Text))
     {
         if (onRemote)
         {
             SearchTextBox.Text = string.Empty;
             return;
         }
         var searchScreen = new SearchResultScreen();
         searchScreen.SetQuery(SearchTextBox.Text);
         StaticMainWindow.Window.ChangeScreen(searchScreen);
         SearchTextBox.Text = string.Empty;
     }
     if (e.Key == Key.Escape)
     {
         SearchTextBox.Text = string.Empty;
     }
 }