12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using Uestc.Auto6.Dso.ComModel;
- using Uestc.Auto6.Dso.Core;
- using Uestc.Auto6.Dso.Core.Decode;
- using Uni_Trend.MSO7000X.Common.Helper;
- namespace Uestc.Auto6.Dso.Protocol.PCIe
- {
- internal class PCIe : DecodeView
- {
- public override IProtocolView ProtocolView => new PCIeSetControl();
- public override ITriggerSerialView TriggerSerialView => new PCIeTriggerSetControl();
- public override SerialProtocolType ProtocolType => SerialProtocolType.PCIe;
- public override void DrawDecodeInfo(Graphics graphics, Rectangle rectangle, IProtocolPrsnt prsnt, Color ForeColor, Font font)
- {
- if (prsnt is PCIeDecodePrsnt decodePrsnt)
- {
- TextRenderer.DrawText(graphics, decodePrsnt.SignalInput.ToString(), font, GetRowRectangle(), ForeColor, TextFormatFlags.Right | TextFormatFlags.VerticalCenter);
- TextRenderer.DrawText(graphics, decodePrsnt.Version switch
- {
- ComModel.ProtocolPCIe.PCIeVersion.PCIeV1_0 => "PCIe 1.0",
- ComModel.ProtocolPCIe.PCIeVersion.PCIeV2_0 => "PCIe 2.0",
- _ => "PCIe 1.0",
- }, font, GetRowRectangle(1), ForeColor, TextFormatFlags.Left | TextFormatFlags.VerticalCenter) ;
- TextRenderer.DrawText(graphics,Uni_Trend.MSO7000X.Common.Helper.SIHelper.ValueChangeToSI(decodePrsnt.Threshold,2,"V"), font, GetRowRectangle(1), ForeColor, TextFormatFlags.Right | TextFormatFlags.VerticalCenter);
- }
- }
- }
- }
|