1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using FastReport.Design;
- using System;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Forms;
- using System.Windows.Media;
- using System.Windows.Media.Animation;
- using System.Windows.Shapes;
- namespace FastReport
- {
- partial class ReportSettings
- {
- private static Geometry geometry1 = Geometry.Parse(
- "F1M15,8.25C15,9.767,13.788,11,12.298,11L9,11 9,10 12.298,10C13.248,10 14.018,9.217 14.018,8.25 14.018,7.283 13.248,6.5 12.298,6.5L11.438,6.5 11.438,6.062C11.438,4.371 10.092,3 8.43,3 7.141,3 6.051,3.829 5.622,4.987 5.297,4.838 4.94,4.75 4.562,4.75 3.137,4.75 1.982,5.925 1.982,7.375 1.982,8.825 3.137,10 4.562,10L6,10 6,11 4.562,11C2.598,11 1,9.374 1,7.375 1,5.376 2.598,3.75 4.562,3.75 4.752,3.75 4.941,3.766 5.128,3.797 5.859,2.695 7.096,2 8.43,2 10.443,2 12.113,3.526 12.383,5.501 13.834,5.547 15,6.763 15,8.25"
- );
- private static Geometry geometry2 = Geometry.Parse(
- "F1M8,13.293L8,8 7,8 7,13.293 5.854,12.147 5.146,12.854 7.5,15.207 9.854,12.854 9.146,12.147z"
- );
- private object saveControl;
- internal void OnStartLoadingProgress(ReportTab reportTab)
- {
- if (reportTab == null)
- return;
- var control = reportTab.control as ContentControl;
- saveControl = control.Content;
- var rect = new Rectangle() { Width = 150, Height = 150 };
- var brush = new SolidColorBrush(Colors.Gray);
- var drawingGroup = new DrawingGroup();
- drawingGroup.Children.Add(new GeometryDrawing(Brushes.Gray, null, geometry1));
- drawingGroup.Children.Add(new GeometryDrawing(brush, null, geometry2));
- rect.Fill = new DrawingBrush(drawingGroup);
- control.Content = rect;
- brush.BeginAnimation(SolidColorBrush.ColorProperty,
- new ColorAnimation(Colors.Gray, Colors.Gainsboro, TimeSpan.FromSeconds(1)) { AutoReverse = true, RepeatBehavior = RepeatBehavior.Forever });
- }
- internal void OnFinishLoadingProgress(ReportTab reportTab)
- {
- if (reportTab == null)
- return;
- var control = reportTab.control as ContentControl;
- control.Content = saveControl;
- control.AnimateOpacity(0, 1, 200);
- }
- }
- }
|