Пример #1
0
        public ThreadView()
        {
            this.InitializeComponent();

            CurrentPage  = 1;
            appBar.Width = ActualWidth;

            btnPopupPostMessage.IsEnabled = false;
            BtnRating.IsEnabled           = false;
            comment.IsEnabled             = false;

            bookMark         = new BookmarkModelData();
            helper           = new HtmlHelper();
            thread           = new ThreadModel();
            myLogin          = new AccountHelper();
            define           = new DefineEmoticon();
            appSetting       = new AppSettingModel();
            threadController = new ThreadController();

            if (Windows.Foundation.Metadata.ApiInformation.IsPropertyPresent("Windows.UI.Xaml.FrameworkElement", "AllowFocusOnInteraction"))
            {
                fl_Page.AllowFocusOnInteraction     = true;
                tbMessage.AllowFocusOnInteraction   = true;
                jumpTextBox.AllowFocusOnInteraction = true;
                getIdthread.AllowFocusOnInteraction = true;
            }

            _instance = this;
            //this.NavigationCacheMode = NavigationCacheMode.Enabled;
        }
Пример #2
0
 protected override void OnNavigatingFrom(MtNavigatingCancelEventArgs e)
 {
     base.OnNavigatingFrom(e);
     if (e.NavigationMode == NavigationMode.Back)
     {
         //mainGridThread.Children.Remove(myWebview);
         this.NavigationCacheMode = NavigationCacheMode.Disabled;
         helper           = null;
         bookMark         = null;
         thread           = null;
         myLogin          = null;
         define           = null;
         appSetting       = null;
         threadController = null;
         myWebview        = null;
         tbMessage.Text   = Resource.STR_EMPTY;
         if (wbPopup != null)
         {
             wbPopup.Navigate(new Uri("about:blank"));
             wbPopup = null;
         }
         _instance = null;
         GC.Collect();
     }
     else
     {
         if (wbPopup != null)
         {
             wbPopup.Navigate(new Uri("about:blank"));
         }
     }
 }
Пример #3
0
 private void GetListBookmark()
 {
     BmData = new BookmarkModelData();
     lvBookmark.ItemsSource = BmData.GetDataBookmark();
     lvBookmark.IsEnabled   = true;
 }