UnitTests_BufferWindow.cs 1.8 KB
Newer Older
1
using FLY.Weight.UI.Client.UiModule;
2 3 4 5 6 7 8 9 10 11 12
using System;
using System.Collections.Generic;
using System.ComponentModel;

using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;

namespace FLY.Weight.UI.Client.UnitTests
{
13 14 15 16
    //public class UnitTests_BufferWindow : INotifyPropertyChanged
    //{
    //    public bool IsFirstPage { get; set; }
    //    public bool IsLastPage { get; set; }
17

18 19 20 21 22
    //    public bool IsKeepNewest { get; set; }
    //    public int CurrentPage { get; set; }
    //    public int TotalPages { get; set; }
    //    public event PropertyChangedEventHandler PropertyChanged;
    //}
23 24 25 26 27 28 29
    public class UnitTests_FlowGraphModelView : INotifyPropertyChanged
    {
        /// <summary>
        ///自动按保持最新值,剩余时间
        /// </summary>
        public int AutoKeepNewestTimeRemaining { get; set; } = 10;

30
        public List<FlowGraphVm_Item> Items { get; set; }
31 32 33

        public UnitTests_FlowGraphModelView()
        {
34 35 36 37 38 39
            Items = new List<FlowGraphVm_Item>();
            Items.Add(new FlowGraphVm_Item() { Title = "A", Value=103.1, Visibility = Visibility.Hidden });
            Items.Add(new FlowGraphVm_Item() { Title = "B", Value = 10, Visibility = Visibility.Visible });
            Items.Add(new FlowGraphVm_Item() { Title = "C", Value = 23, Visibility = Visibility.Hidden });
            Items.Add(new FlowGraphVm_Item() { Title = "D", Value = 46.7, Visibility = Visibility.Hidden });
            Items.Add(new FlowGraphVm_Item() { Title = "E", Value = 80, Visibility = Visibility.Hidden });
40
            for(int i=0;i<Items.Count();i++)
41
            {
42 43
                FlowGraphVm_Item s = Items[i];
                s.Fill = WeighterColorDB.GetSelf(i);
44 45 46 47 48
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}