Other/Translator/Controls/StatusBand.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;
namespace Translator.Controls
{
public class StatusBand : Control
{
#region Variables
public enum StatusType
{
Info,
Warning,
Error
}
private Grid _warningGrid;
private Button _supressButton;
#endregion
#region Dependency Properties
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register("Type", typeof(StatusType), typeof(StatusBand),
new FrameworkPropertyMetadata(StatusType.Warning, OnTypePropertyChanged));
public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(StatusBand),
new FrameworkPropertyMetadata("", OnTextPropertyChanged));
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register("Image", typeof(UIElement), typeof(StatusBand),
new FrameworkPropertyMetadata(null, OnImagePropertyChanged));
public static readonly DependencyProperty StartingProperty = DependencyProperty.Register("Starting", typeof(bool), typeof(StatusBand),
new PropertyMetadata(default(bool)));
#endregion
#region Properties
[Bindable(true), Category("Common")]
public StatusType Type
{
get { return (StatusType)GetValue(TypeProperty); }
set { SetValue(TypeProperty, value); }
}
[Bindable(true), Category("Common")]
public string Text
{
get { return (string)GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
[Bindable(true), Category("Common")]
public UIElement Image
{
get { return (UIElement)GetValue(ImageProperty); }
set { SetValue(ImageProperty, value); }
后面还有 123 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
