diff --git a/Source/ClassLibraryCommon/Properties/AssemblyInfo.cs b/Source/ClassLibraryCommon/Properties/AssemblyInfo.cs index 7d056494d..e50cab400 100644 --- a/Source/ClassLibraryCommon/Properties/AssemblyInfo.cs +++ b/Source/ClassLibraryCommon/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.105.6600")] -[assembly: AssemblyFileVersion("1.0.105.6600")] +[assembly: AssemblyVersion("1.0.107.5606")] +[assembly: AssemblyFileVersion("1.0.107.5606")] diff --git a/Source/DCS-BIOS/DCSBIOSOutput.cs b/Source/DCS-BIOS/DCSBIOSOutput.cs index f28f76d60..bfef182ad 100644 --- a/Source/DCS-BIOS/DCSBIOSOutput.cs +++ b/Source/DCS-BIOS/DCSBIOSOutput.cs @@ -71,6 +71,53 @@ private int Evaluate(uint data) } } */ + + public static DCSBIOSOutput CreateCopy(DCSBIOSOutput dcsbiosOutput) + { + var tmp = new DCSBIOSOutput(); + tmp.DCSBiosOutputType = dcsbiosOutput.DCSBiosOutputType; + tmp.ControlId = dcsbiosOutput.ControlId; + tmp.Address = dcsbiosOutput.Address; + tmp.ControlDescription = dcsbiosOutput.ControlDescription; + tmp.ControlType = dcsbiosOutput.ControlType; + tmp.DCSBiosOutputComparison = dcsbiosOutput.DCSBiosOutputComparison; + tmp.Mask = dcsbiosOutput.Mask; + tmp.MaxLength = dcsbiosOutput.MaxLength; + tmp.MaxValue = dcsbiosOutput.MaxValue; + tmp.Shiftvalue = dcsbiosOutput.Shiftvalue; + if (tmp.DCSBiosOutputType == DCSBiosOutputType.INTEGER_TYPE) + { + tmp.SpecifiedValueInt = dcsbiosOutput.SpecifiedValueInt; + } + if (tmp.DCSBiosOutputType == DCSBiosOutputType.STRING_TYPE) + { + tmp.SpecifiedValueString = dcsbiosOutput.SpecifiedValueString; + } + return tmp; + } + + public void Copy(DCSBIOSOutput dcsbiosOutput) + { + DCSBiosOutputType = dcsbiosOutput.DCSBiosOutputType; + ControlId = dcsbiosOutput.ControlId; + Address = dcsbiosOutput.Address; + ControlDescription = dcsbiosOutput.ControlDescription; + ControlType = dcsbiosOutput.ControlType; + DCSBiosOutputComparison = dcsbiosOutput.DCSBiosOutputComparison; + Mask = dcsbiosOutput.Mask; + MaxLength = dcsbiosOutput.MaxLength; + MaxValue = dcsbiosOutput.MaxValue; + Shiftvalue = dcsbiosOutput.Shiftvalue; + if (DCSBiosOutputType == DCSBiosOutputType.INTEGER_TYPE) + { + SpecifiedValueInt = dcsbiosOutput.SpecifiedValueInt; + } + if (DCSBiosOutputType == DCSBiosOutputType.STRING_TYPE) + { + SpecifiedValueString = dcsbiosOutput.SpecifiedValueString; + } + } + public bool CheckForValueMatchAndChange(object data) { //todo change not processed diff --git a/Source/DCS-BIOS/Properties/AssemblyInfo.cs b/Source/DCS-BIOS/Properties/AssemblyInfo.cs index 552e6441d..eae53bfc1 100644 --- a/Source/DCS-BIOS/Properties/AssemblyInfo.cs +++ b/Source/DCS-BIOS/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.492.6600")] -[assembly: AssemblyFileVersion("2.1.492.6600")] +[assembly: AssemblyVersion("2.1.494.5606")] +[assembly: AssemblyFileVersion("2.1.494.5606")] diff --git a/Source/DCSFlightpanels/LEDConfigsWindow.xaml.cs b/Source/DCSFlightpanels/LEDConfigsWindow.xaml.cs index 65165b966..0a3ecf9fc 100644 --- a/Source/DCSFlightpanels/LEDConfigsWindow.xaml.cs +++ b/Source/DCSFlightpanels/LEDConfigsWindow.xaml.cs @@ -4,6 +4,7 @@ using System.Windows.Controls; using System.Windows.Input; using ClassLibraryCommon; +using DCS_BIOS; using NonVisuals; namespace DCSFlightpanels @@ -124,9 +125,7 @@ private void EditButton_OnClick(object sender, RoutedEventArgs e) var dcsBiosOutputTriggerWindow = new DCSBiosOutputTriggerWindow(_dcsAirframe, "Set hook for color " + dcsOutputAndColorBinding.LEDColor, dcsOutputAndColorBinding.DCSBiosOutputLED); if (dcsBiosOutputTriggerWindow.ShowDialog() == true) { - _colorOutputBindings.Remove(dcsOutputAndColorBinding); - _colorOutputBindings.Add(_callingPanel.CreateDcsOutputAndColorBinding(_saitekPanelLEDPosition, dcsOutputAndColorBinding.LEDColor, dcsBiosOutputTriggerWindow.DCSBiosOutput)); - ShowItems(); + ((DcsOutputAndColorBinding) DataGridValues.SelectedItem).DCSBiosOutputLED.Copy(dcsBiosOutputTriggerWindow.DCSBiosOutput); } ShowItems(); SetFormState(); @@ -213,7 +212,7 @@ private void ContextMenuColors_OnClick(object sender, RoutedEventArgs e) return; } - PanelLEDColor color = PanelLEDColor.DARK; + var color = PanelLEDColor.DARK; var menu = (MenuItem)sender; if (menu.Name.Contains("Dark")) @@ -264,10 +263,11 @@ private void CloneButton_OnClick(object sender, RoutedEventArgs e) { e.Handled = true; } - for (var i = 0; i < DataGridValues.SelectedItems.Count; i++) + foreach (var t in DataGridValues.SelectedItems) { - var binding = (DcsOutputAndColorBinding)DataGridValues.SelectedItems[i]; - _colorOutputBindings.Add(_callingPanel.CreateDcsOutputAndColorBinding(_saitekPanelLEDPosition, binding.LEDColor, binding.DCSBiosOutputLED)); + var binding = (DcsOutputAndColorBinding) t; + var tmp = DCSBIOSOutput.CreateCopy(binding.DCSBiosOutputLED); + _colorOutputBindings.Add(_callingPanel.CreateDcsOutputAndColorBinding(_saitekPanelLEDPosition, binding.LEDColor, tmp)); ShowItems(); } SetFormState(); diff --git a/Source/DCSFlightpanels/Properties/AssemblyInfo.cs b/Source/DCSFlightpanels/Properties/AssemblyInfo.cs index 4d3dbf2a7..c5120c391 100644 --- a/Source/DCSFlightpanels/Properties/AssemblyInfo.cs +++ b/Source/DCSFlightpanels/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.7.9.6600")] -[assembly: AssemblyFileVersion("2.7.9.6600")] +[assembly: AssemblyVersion("2.7.11.5606")] +[assembly: AssemblyFileVersion("2.7.11.5606")] diff --git a/Source/NonVisuals/Properties/AssemblyInfo.cs b/Source/NonVisuals/Properties/AssemblyInfo.cs index 2212994a1..c94cedffb 100644 --- a/Source/NonVisuals/Properties/AssemblyInfo.cs +++ b/Source/NonVisuals/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.878.6600")] -[assembly: AssemblyFileVersion("2.1.878.6600")] +[assembly: AssemblyVersion("2.1.880.5606")] +[assembly: AssemblyFileVersion("2.1.880.5606")]