DSF.Net/Controllers/Ratio/VertiRatio.xaml.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DSF.Net.Controllers.Ratio
{
    /// <summary>
    /// VertiRatio. 的交互逻辑
    /// </summary>
    public partial class VertiRatio : UserControl
    {
        public VertiRatio()
        {
            InitializeComponent();
            labelUp.MouseLeftButtonDown += Touch;
            labelDown.MouseLeftButtonDown += Touch;
        }

        public event EventHandler ValueChanged;

        private void Touch(object sender, MouseButtonEventArgs e)
        {
            Value = sender.Equals(labelUp) ? VertiRatioStatus.UpSelected : VertiRatioStatus.DownSelected;
            ValueChanged?.Invoke(this, null);
        }

        public string TextUp
        {
            get { return (string)GetValue(TextUpProperty); }
            set { SetValue(TextUpProperty, value); }
        }

        public string TextDown
        {
            get { return (string)GetValue(TextDownProperty); }
            set { SetValue(TextDownProperty, value); }
        }

        public VertiRatioStatus Value
        {
            get { return (VertiRatioStatus)GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }

        public static readonly DependencyProperty TextUpProperty =
            DependencyProperty.Register("TextUp", typeof(string), typeof(VertiRatio), new PropertyMetadata("FINISHED", (s, e) =>
            {
                var c = s as VertiRatio;
后面还有 18 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。