public DMXDeviceLoadedEventArgs(DMXDevice device) { this.Device = device; }
public void LoadDevices() { foreach (string file in Directory.GetFiles(this.DeviceDefinitionsLocation, "*.flyDev")) { IniFile deviceDefinition = new IniFile(file); foreach (KeyValuePair <string, Dictionary <string, string> > device in deviceDefinition.m_Sections) { DMXDevice dmxDevice = new DMXDevice(); dmxDevice.Name = device.Key; foreach (KeyValuePair <string, string> channel in device.Value) { switch (channel.Key) { case "Name": { dmxDevice.Name = channel.Value; break; } case "R": { dmxDevice.R = Convert.ToInt32(channel.Value); break; } case "G": { dmxDevice.G = Convert.ToInt32(channel.Value); break; } case "B": { dmxDevice.B = Convert.ToInt32(channel.Value); break; } case "Master": { dmxDevice.Master = Convert.ToInt32(channel.Value); break; } case "Strobe": { dmxDevice.Strobe = Convert.ToInt32(channel.Value); break; } case "Sound2Light": { dmxDevice.Sound2Light = Convert.ToInt32(channel.Value); break; } case "Location": { dmxDevice.DeviceLocation = (DMXDevice.Location)Enum.Parse(typeof(DMXDevice.Location), channel.Value, true); break; } } } this.DMXDevices.Add(dmxDevice); if (this.OnDeviceLoaded != null) { this.OnDeviceLoaded(this, new DMXDeviceLoadedEventArgs(dmxDevice)); } } } }
public ColorChangedEventArgs(Color newColor, DMXDevice dev) { this.NewColor = newColor; this.Device = dev; }