Rev 171 | Blame | Compare with Previous | Last modification | View Log | RSS feed
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WindowsInput.Native;
namespace nitdcscore {
public interface IPanel {
int Init();
int Refresh();
int Input();
}
public abstract class Panel : IPanel {
public jsdata data = new jsdata();
protected mcp2221 mcp;
public int id { get; set; }
public String name { get; set; }
public String serialno { get; set; }
public List<Control> controls = new List<Control>();
public List<Led> leds = new List<Led>();
private Boolean enabled;
public Boolean Enabled {
get {
return enabled;
}
set {
this.enabled = value;
}
}
public Panel(mcp2221 mcp) {
this.mcp = mcp;
this.mcp.usbi2c.Settings.GetConnectionStatus();
this.id = this.mcp.usbi2c.Management.GetSelectedDevNum();
this.name = this.mcp.usbi2c.Settings.GetUsbStringDescriptor();
}
public virtual int Init() {
return 1;
}
public abstract int Refresh();
public abstract int Input();
public void addLed(Led led) {
this.leds.Add(led);
}
public void addControl(Control control) {
this.controls.Add(control);
}
}
}