WeightSystemServiceClientWithColor.cs 896 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
using FLY.Weight2.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Weight2.UI.Client
{
    public class WeightSystemServiceClientWithColor : WeightSystemServiceClient
    {
        public WeightSystemServiceClientWithColor(UInt32 serviceId, string connName) : base(serviceId, connName) {

            //-------------------------------------------------------
            //添加颜色
            this.ResetItemsEvent += WeightSystemServiceClientWithColor_ResetItemsEvent;
            WeightSystemServiceClientWithColor_ResetItemsEvent();
        }

        private void WeightSystemServiceClientWithColor_ResetItemsEvent()
        {
            foreach (FLY.Weight2.Common.WeighterC w in Items)
            {
24
                w.Color = WeighterColorDB.GetSelf(w.Index);
25 26 27 28
            }
        }
    }
}