You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
576 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Adapter
{
class Client
{
private bool vgaMonitor = true;
public void HowToUse()
{
IAdapter hdmi;
if (vgaMonitor)
hdmi = new HdmiToVgaAdapter();
else
hdmi = new HdmiAdapter();
byte[] data = new byte[] { byte.MinValue, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, byte.MaxValue };
DisplyData(hdmi, data);
}
private void DisplyData(IAdapter adapter, byte[] data)
{
adapter.Disply(data);
}
}
}