// Copyright (c) UESTC. All Rights Reserved // QC // 2022/4/14 namespace Uestc.Auto6.Dso.Core { using System; using System.Collections.Generic; using System.Drawing; using Uestc.Auto6.Dso.ComModel; using Uestc.Auto6.Dso.Core.Tools; public class WidgetPrsnt { private static Int32 _Combo = 0; public static Int32 Combo { get => _Combo; set { if (_Combo != value) { _Combo = value; Hardware.HdCmdFactory.Push(ComModel.HdCmd.Combo); } } } public static Action? SetMousePosHandler { get; set; } public static Action? MouseEventHandler { get; set; } public static Action? KeyboradEventHandler { get; set; } //public static void SetColor(ChannelId id, Color color) //{ // ColorConfig.Default[id.ToString()] = color; // if (DsoModel.Default.TryGetChannel(id, out var cm)) // { // cm.DrawColor = color; // } //} //public static Color GetColor(ChannelId id) //{ // if (DsoModel.Default.TryGetChannel(id, out var cm)) // { // return cm.DrawColor; // } // return ColorConfig.Default[id.ToString()]; //} //public static Int32 ColorLength => ColorConfig.Default.Count; //public static IReadOnlyCollection Colors => ColorConfig.Default.Colors; //public static void ResetColor() //{ // ColorConfig.Default.Reset(); // foreach (var id in ChannelId.GetValues()) // { // if (DsoModel.Default.TryGetChannel(id, out var cm)) // { // cm.DrawColor = ColorConfig.Default[id.ToString()]; // } // } //} } }