Exemplo n.º 1
0
 private int RaiseOffsetChangeWithAdditionalVelocityRequested(
     float additionalVelocity, float?inertiaDecayRate)
 {
     LogMessage("ScrollBarController: RaiseOffsetChangeWithAdditionalVelocityRequested for Orientation=" + Orientation + " with additionalVelocity=" + additionalVelocity + ", inertiaDecayRate=" + inertiaDecayRate);
     if (OffsetChangeWithAdditionalVelocityRequested != null)
     {
         ScrollControllerOffsetChangeWithAdditionalVelocityRequestedEventArgs e =
             new ScrollControllerOffsetChangeWithAdditionalVelocityRequestedEventArgs(
                 additionalVelocity,
                 inertiaDecayRate);
         OffsetChangeWithAdditionalVelocityRequested(this, e);
         if (e.ViewChangeId != -1 && !lstOffsetChangeWithAdditionalVelocityIds.Contains(e.ViewChangeId))
         {
             operationsCount++;
             lstOffsetChangeWithAdditionalVelocityIds.Add(e.ViewChangeId);
         }
         return(e.ViewChangeId);
     }
     return(-1);
 }
Exemplo n.º 2
0
 private void OnOffsetChangeWithAdditionalVelocityRequested(IScrollController sender, ScrollControllerOffsetChangeWithAdditionalVelocityRequestedEventArgs e)
 {
     if (sender == horizontalScrollController)
     {
         LogMessage("CanvasScrollControllerConsumer: OnOffsetChangeWithAdditionalVelocityRequested for HorizontalScrollController");
     }
     else if (sender == verticalScrollController)
     {
         LogMessage("CanvasScrollControllerConsumer: OnOffsetChangeWithAdditionalVelocityRequested for VerticalScrollController");
     }
     else
     {
         LogMessage("CanvasScrollControllerConsumer: OnOffsetChangeWithAdditionalVelocityRequested for unknown sender");
     }
 }
Exemplo n.º 3
0
 private void IScrollController_OffsetChangeWithAdditionalVelocityRequested(IScrollController sender, ScrollControllerOffsetChangeWithAdditionalVelocityRequestedEventArgs args)
 {
     try
     {
         AppendAsyncEventMessage("OffsetChangeWithAdditionalVelocityRequested ViewChangeId=" + args.ViewChangeId);
     }
     catch (Exception ex)
     {
         txtExceptionReport.Text = ex.ToString();
         lstScrollBar2Events.Items.Add(ex.ToString());
     }
 }