• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Net;
5 using System.Windows;
6 using System.Windows.Controls;
7 using System.Windows.Navigation;
8 using Microsoft.Phone.Controls;
9 using Microsoft.Phone.Shell;
10 using CodecUTApp.Resources;
11 
12 using Codec_UT_RTComponent;
13 
14 namespace CodecUTApp {
15 public partial class MainPage : PhoneApplicationPage {
16   // Constructor
17   bool bFlag;
18   CodecUTTest cCodecUTHandler;
MainPage()19   public MainPage() {
20     InitializeComponent();
21     cCodecUTHandler = new CodecUTTest();
22     // Sample code to localize the ApplicationBar
23     //BuildLocalizedApplicationBar();
24   }
25 
Button_Click(object sender, RoutedEventArgs e)26   private void Button_Click (object sender, RoutedEventArgs e) {
27     int iRetVal = 0;
28     UTInfo.Text = "Running UT test cases! Please wait for 10~30 minutes ....";
29     iRetVal = cCodecUTHandler.TestAllCases();
30     if (0 == iRetVal) {
31       UTInfo.Text = "Passed! UT cases on windows phone have been completed!";
32     } else {
33       UTInfo.Text = "Failed! UT cases on windows phone have been completed!";
34     }
35   }
36 
37   // Sample code for building a localized ApplicationBar
38   //private void BuildLocalizedApplicationBar()
39   //{
40   //    // Set the page's ApplicationBar to a new instance of ApplicationBar.
41   //    ApplicationBar = new ApplicationBar();
42 
43   //    // Create a new button and set the text value to the localized string from AppResources.
44   //    ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
45   //    appBarButton.Text = AppResources.AppBarButtonText;
46   //    ApplicationBar.Buttons.Add(appBarButton);
47 
48   //    // Create a new menu item with the localized string from AppResources.
49   //    ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
50   //    ApplicationBar.MenuItems.Add(appBarMenuItem);
51   //}
52 }
53 }