/// <summary> /// Creates an instance of a base plugin class. /// </summary> /// <param name="id">A unique string identifying the plugin</param> /// <param name="version">The version of the plugin, specified in the assembly</param> public Base(string id, Version version) : base(id, version, new Version(0, 3)) { Author = "Simplare"; Website = "http://dev.stoffiplayer.com/wiki/PluginAPI"; myBooleanValue = new Setting { ID = "BooleanValue", Type = typeof(System.Boolean), Value = (Object)true, IsVisible = true }; myStringValue = new Setting { ID = "StringValue", Type = typeof(System.String), Value = (Object)true, PossibleValues = new List<Object>() { "Foo", "Bar" }, IsVisible = true }; Settings.Add(myBooleanValue); Settings.Add(myStringValue); }
/// <summary> /// Creates an instance of the SpectrumLine plugin class. /// </summary> /// <param name="id">A unique string identifying the plugin</param> /// <param name="version">The version of the plugin, specified in the assembly</param> public SpectrumLine(string id, Version version) : base(id, version, new Version(0, 3)) { Author = "Simplare"; Website = "http://dev.stoffiplayer.com/wiki/PluginAPI"; showSecondLine = new Setting { ID = "ShowSecondLine", Type = typeof(System.Boolean), Value = (Object)true, IsVisible = true }; colorFirstLine = new Setting { ID = "ColorFirstLine", Type = typeof(Color), Value = (Object)Color.Red, IsVisible = true }; colorSecondLine = new Setting { ID = "ColorSecondLine", Type = typeof(Color), Value = (Object)Color.DarkBlue, IsVisible = true }; Settings.Add(showSecondLine); Settings.Add(colorFirstLine); Settings.Add(colorSecondLine); foreach (Setting s in Settings) s.PropertyChanged += new PropertyChangedEventHandler(Setting_PropertyChanged); }
/// <summary> /// Creates an instance of the ShakeIt plugin class. /// </summary> /// <param name="id">A unique string identifying the plugin</param> /// <param name="version">The version of the plugin, specified in the assembly</param> public ShakeIt(string id, Version version) : base(id, version, new Version(0, 4)) { Author = "Simplare"; Website = "http://dev.stoffiplayer.com/wiki/PluginAPI"; minimumVolume = new Setting { ID = "MinimumVolume", Type = typeof(System.Double), Value = (Object)0.0, Maximum = (Object)100.0, IsVisible = true }; maximumVolume = new Setting { ID = "MaximumVolume", Type = typeof(System.Double), Value = (Object)100.0, Maximum = (Object)100.0, IsVisible = true }; viscosity = new Setting { ID = "Viscosity", Type = typeof(System.Double), Value = (Object)6.5, Maximum = (Object)10.0, IsVisible = true }; sensitivity = new Setting { ID = "Sensitivity", Type = typeof(System.Double), Value = (Object)5.0, Maximum = (Object)10.0, IsVisible = true }; Settings.Add(minimumVolume); Settings.Add(maximumVolume); Settings.Add(sensitivity); Settings.Add(viscosity); foreach (Setting s in Settings) s.PropertyChanged += new PropertyChangedEventHandler(Setting_PropertyChanged); deviceStatus = new StatusLabel { Label = "KinectStatus", Status = DanceAnalyzer.IsConnected ? "Connected" : "NotConnected" }; StatusLabels.Add(deviceStatus); DanceAnalyzer.PropertyChanged += new PropertyChangedEventHandler(DanceAnalyzer_PropertyChanged); DanceAnalyzer.Connect += new EventHandler(DanceAnalyzer_Connect); DanceAnalyzer.Disconnect += new EventHandler(DanceAnalyzer_Disconnect); DanceAnalyzer.Viscosity = (Double)viscosity.Value; DanceAnalyzer.Sensitivity = (Double)sensitivity.Value; }