public ucDeviceProperty(HartDevice dev) { InitializeComponent(); hartDevice = dev; propertyGrid1.SelectedObject = hartDevice; devType = ProjectType.Hart; }
public void UpdateDevice(HartDevice dev) { hartDevice = dev; devType = ProjectType.Hart; propertyGrid1.SelectedObject = hartDevice; propertyGrid1.Refresh(); }
public ucDeviceProperty(object dev) { InitializeComponent(); if (dev.GetType() == typeof(HartDevice)) { hartDevice = (HartDevice)dev; propertyGrid1.SelectedObject = hartDevice; devType = ProjectType.Hart; } else if (dev.GetType() == typeof(DPDevice)) { dpDevice = (DPDevice)dev; propertyGrid1.SelectedObject = dpDevice; devType = ProjectType.DP; } }
public void Add(HartDevice dev) { hartDevices.Add(dev); }