示例#1
0
 private ContentFilter()
 {
     this._blackList = CreateBlacklist(1000);
     this._regex = CreateRegex(this._blackList);
     this._settings = new AwfulSettings();
     this._seed = new Random();
 }
示例#2
0
 private void GestureListener_Flick(object sender, FlickGestureEventArgs e)
 {
     bool valid = !this._context.IsPageLoading;
     if (valid)
     {
         var settings = new AwfulSettings();
         valid = e.Direction == System.Windows.Controls.Orientation.Horizontal;
         valid = valid && Math.Abs(e.HorizontalVelocity) > settings.PageSwipeThreshold;
         bool validLeft = valid && e.HorizontalVelocity < 0;
         bool validRight = valid;
         if (validLeft) { this.GoToNextPage(); }
         else if (validRight) { this.GoToPrevPage(); }
     }
 }