Ejemplo n.º 1
0
 public PotentialEnemyWrapper()
 {
     m_mapMan = new Dictionary<String, int>();
     m_mapNameToID = new Dictionary<string, string>();
     InitializeComponent();
     this.Loaded += new RoutedEventHandler(Page_Loaded);
     Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
     m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { });
 }
Ejemplo n.º 2
0
 private void RssDetails_Loaded(object sender, RoutedEventArgs e)
 {
     if (m_itemViewModel != null)
     {
         Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
         m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { });
         m_progressIndicatorHelper.PushTaskInUIThread();
         WebBrowser.Navigated += new EventHandler<System.Windows.Navigation.NavigationEventArgs>(WebBrowser_Navigated);
         WebBrowser.NavigateToString(ConvertExtendedASCII(m_itemViewModel.RssSummary));
     }
 }
Ejemplo n.º 3
0
 private void PageLoaded(object sender, RoutedEventArgs e)
 {
     Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
     m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { });
     GetFriendList(m_nCurrentPage);
 }
Ejemplo n.º 4
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
            m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { });

            SearchByKey(m_key);
        }
Ejemplo n.º 5
0
        private void refreshNewsPage()
        {
            Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
            m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, RefreshViewHelper.RefreshViewItems);

            m_progressIndicatorHelper.PushTask("Weibo");
            m_progressIndicatorHelper.PushTask("Rss");
            m_progressIndicatorHelper.PushTask("Renren");
            m_progressIndicatorHelper.PushTask("Douban");

            //App.ViewModel.Items.Clear();
            // 1.Weibo
            refreshModelSinaWeibo();
            // 2.Rss
            refreshModelRssFeed();
            // 3.Renren
            refreshModelRenren();
            // 4:Douban
            refreshModelDouban();

            App.ViewModel.IsChanged = false;
        }
Ejemplo n.º 6
0
        void LabBlessePage_Loaded(object sender, RoutedEventArgs e)
        {
            Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
            m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () =>
            {

                String firstLoad = PreferenceHelper.GetPreference("Global_FirstLoadBlessList");
                if (String.IsNullOrEmpty(firstLoad))
                {
                    Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        PreferenceHelper.SetPreference("Global_FirstLoadBlessList", "WhatEver");

                        MessageBox.Show("发表在心语墙上的内容,写得比较好的会显示在软件启动页上哦~", "^_^", MessageBoxButton.OK);
                    });
                }
            });

            if (blessHelper == null)
                blessHelper = new BlessHelper();

            m_progressIndicatorHelper.PushTask();
            blessHelper.FetchBlessItem(25, false, (list) =>
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    Items.Clear();
                    if (list != null)
                    {
                        int i = 0;
                        foreach (BlessItem item in list)
                        {
                            item.index = i++;
                            Items.Add(item);
                        }
                    }
                    m_progressIndicatorHelper.PopTask();
                });
            });
        }
Ejemplo n.º 7
0
        private void SelectSinaFollower_Loaded(object sender, RoutedEventArgs e)
        {
            Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
            m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { });

            GetFriendList(-1);
        }