public LightingConsole( string ip, ConsoleSettings settings, bool disablePacketEvents = false, SK[] sks = null, ConnectionHandler connectionHandler = null, ScreenManager screenManager = null, TastenManager tastenManager = null, Dictionary <MlPal.Flag, List <MlPal> > paletten = null) { Settings = settings; SKMSteckbrief steckbrief = settings.Steckbrief; Stromkreise = sks ?? new SK[Settings.SkSize]; SKSize = Settings.SkSize; _disablePacketEvents = disablePacketEvents; Connection = connectionHandler ?? new ConnectionHandler(ip, steckbrief, Settings.SkmType); Connection.Errored += Connection_Errored; if (!_disablePacketEvents) { Connection.PacketReceived += OnPacketReceived; } Bedienstelle = Settings.Bedienstelle; Logger = Settings.Logger; ScreenManager = new ScreenManager(this); TastenManager = new TastenManager(); Paletten = new Dictionary <MlPal.Flag, List <MlPal> > { { MlPal.Flag.I, new List <MlPal>() }, { MlPal.Flag.F, new List <MlPal>() }, { MlPal.Flag.C, new List <MlPal>() }, { MlPal.Flag.B, new List <MlPal>() }, { MlPal.Flag.SKG, new List <MlPal>() }, { MlPal.Flag.BLK, new List <MlPal>() }, { MlPal.Flag.DYN, new List <MlPal>() }, { MlPal.Flag.CUR_SEL, new List <MlPal>() } }; }
public Taste.LampState GetState(TastenManager manager, string name) => GetState(manager.FindByName(name));