Map.Controls/MapControl/Gauge.xaml.cs
(开头部分) 48KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Shapes;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;
namespace DataDisplay.Control.Control
{
[TemplatePart(Name = "LayoutRoot", Type = typeof(Grid))]
[TemplatePart(Name = "Pointer", Type = typeof(Path))]
[TemplatePart(Name = "RangeIndicatorLight", Type = typeof(Ellipse))]
[TemplatePart(Name = "PointerCap", Type = typeof(Ellipse))]
public class Gauge : System.Windows.Controls.Control
{
#region Private variables
//Private variables
private Grid rootGrid;
private Path rangeIndicator;
private Path pointer;
private Ellipse pointerCap;
private Ellipse lightIndicator;
private bool isInitialValueSet = false;
private Double arcradius1;
private Double arcradius2;
private int animatingSpeedFactor = 6;
#endregion
#region Dependency properties
/// <summary>
/// Dependency property to Get/Set the current value
/// </summary>
public static readonly DependencyProperty CurrentValueProperty =
DependencyProperty.Register("CurrentValue", typeof(double), typeof(Gauge),
new PropertyMetadata(Double.MinValue, new PropertyChangedCallback(Gauge.OnCurrentValuePropertyChanged)));
/// <summary>
/// Dependency property to Get/Set the Minimum Value
/// </summary>
public static readonly DependencyProperty MinValueProperty =
DependencyProperty.Register("MinValue", typeof(double), typeof(Gauge), null);
/// <summary>
/// Dependency property to Get/Set the Maximum Value
/// </summary>
public static readonly DependencyProperty MaxValueProperty =
DependencyProperty.Register("MaxValue", typeof(double), typeof(Gauge), null);
/// <summary>
/// Dependency property to Get/Set the Radius of the gauge
/// </summary>
public static readonly DependencyProperty RadiusProperty =
DependencyProperty.Register("Radius", typeof(double), typeof(Gauge), null);
后面还有 1351 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
