Я хочу использовать библиотеку openlayers в своем классе "DeviceClass", поэтому я делаю это:
public class DeviceClass : OpenLayers.DeviceCollection.Device
{
}
Теперь я получаю ошибку, что
аргумент не указанэто соответствует требуемому формальному параметру класса c # openlayers
и равно
Подкласс класса устройства
.Может кто-нибудь помочь?
Полный код:
namespace_klasses_met_openlayer
{
public partial class Form1 : Form
{
DeviceClass d = new DeviceClass();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btndevicename_Click(object sender, EventArgs e)
{
d.getname();
}
}
public class DeviceClass : OpenLayers.DeviceCollection.Device
{
// OpenLayers fields
////Encapsulates a DT-open layers deviceand manages and distributes subsystems for the device
private Device device = null;
// Manages DT-Open Layers devices
private DeviceMgr deviceMgr = DeviceMgr.Get();
public void getname()
{
// Get the device names of all devices in the system
// Put into array of stings deviceNames
string[] deviceNames = deviceMgr.GetDeviceNames();
//Add deviceNames to combobox
for (int i = 0; i < deviceNames.Length; ++i)
{
Console.WriteLine(deviceNames[i]);
}
}
}
}