Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unnecessary qualifier #465

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ControlReference/Windows/LuaWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void LuaWindow_OnLoaded(object sender, RoutedEventArgs e)
}
}

private void LuaWindow_OnKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
private void LuaWindow_OnKeyDown(object sender, KeyEventArgs e)
{

}
Expand Down
4 changes: 2 additions & 2 deletions src/DCS-BIOS/ControlLocator/DCSBIOSControlLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace DCS_BIOS.ControlLocator
using System.Linq;
using System.Text;
using ClassLibraryCommon;
using DCS_BIOS.misc;
using DCS_BIOS.Serialized;
using misc;
using Serialized;
using Newtonsoft.Json;
using NLog;

Expand Down
4 changes: 2 additions & 2 deletions src/DCS-BIOS/Serialized/DCSBIOSInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace DCS_BIOS.Serialized
using System.Collections.Generic;
using System.Linq;
using ClassLibraryCommon;
using DCS_BIOS.ControlLocator;
using DCS_BIOS.misc;
using ControlLocator;
using misc;
using Newtonsoft.Json;
using NLog;

Expand Down
2 changes: 1 addition & 1 deletion src/DCS-BIOS/Serialized/DCSBIOSOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace DCS_BIOS.Serialized
using System.ComponentModel;
using ClassLibraryCommon;
using DCS_BIOS;
using DCS_BIOS.ControlLocator;
using ControlLocator;
using Newtonsoft.Json;

public enum DCSBiosOutputType
Expand Down
4 changes: 2 additions & 2 deletions src/DCS-BIOS/Serialized/DCSBIOSOutputFormula.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace DCS_BIOS.Serialized
using System;
using System.Collections.Generic;
using ClassLibraryCommon;
using DCS_BIOS.ControlLocator;
using DCS_BIOS.misc;
using ControlLocator;
using misc;
using NLog;

/// <summary>
Expand Down
13 changes: 7 additions & 6 deletions src/DCS-BIOS/misc/LuaAssistant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace DCS_BIOS.misc
{
/// <summary>
/// Class for reading lua code from dcs-bios for a certain control. Can also read the signature for the function from Module.lua.
/// </summary>
internal class LuaAssistant
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
Expand Down Expand Up @@ -66,12 +69,10 @@ internal static string GetLuaCommand(string controlId, bool includeSignature)
if (result.Key != controlId) return "";

var stringResult = result.Value;
if (includeSignature)
{
var signature = GetLuaCommandSignature(result.Value);
stringResult = string.IsNullOrEmpty(signature) ? result.Value : signature + "\n" + result.Value;
}
return stringResult;
if (!includeSignature) return stringResult;

var signature = GetLuaCommandSignature(result.Value);
return string.IsNullOrEmpty(signature) ? result.Value : signature + "\n" + result.Value;
}

private static string GetLuaCommandSignature(string luaCommand)
Expand Down
2 changes: 1 addition & 1 deletion src/DCSFlightpanels/ContextMenuPanelTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ContextMenuPanelTextBox : ContextMenu

public ContextMenuPanelTextBox(bool keyboardEmulationOnly)
{
this.SetResourceReference(StyleProperty, typeof(ContextMenu));
SetResourceReference(StyleProperty, typeof(ContextMenu));

_keyboardEmulationOnly = keyboardEmulationOnly;

Expand Down
4 changes: 2 additions & 2 deletions src/DCSFlightpanels/CustomControls/TextBoxBaseInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace DCSFlightpanels.CustomControls
using System.Windows.Media;

using ClassLibraryCommon;
using DCSFlightpanels.Windows;
using Windows;
using MEF;
using System.Linq;
using DCS_BIOS.Serialized;
Expand All @@ -41,7 +41,7 @@ public abstract class TextBoxBaseInput : TextBox

protected TextBoxBaseInput()
{
this.SetResourceReference(StyleProperty, typeof(TextBox));
SetResourceReference(StyleProperty, typeof(TextBox));
PreviewKeyDown += TextBox_PreviewKeyDown;
MouseDoubleClick += TextBoxMouseDoubleClick;
MouseDown += TextBox_OnMouseDown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

using ClassLibraryCommon;

using DCSFlightpanels.Interfaces;
using DCSFlightpanels.PanelUserControls;
using DCSFlightpanels.Properties;
using Interfaces;
using PanelUserControls;
using Properties;
using NonVisuals.EventArgs;
using NonVisuals.HID;
using NonVisuals.Interfaces;
Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static MemoryStream GetMemoryStream(this Bitmap bitmap)
/// <summary>
/// Creates a <see cref="Image"/> from a given <see cref="System.Drawing.Bitmap"/>.
/// </summary>
public static SixLabors.ImageSharp.Image ToImageSharpImage(this System.Drawing.Bitmap bitmap)
public static SixLabors.ImageSharp.Image ToImageSharpImage(this Bitmap bitmap)
{
using var memoryStream = new MemoryStream();
bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Png);
Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Interfaces/ISRSHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace NonVisuals.Interfaces
{
using NonVisuals.Radios.SRS;
using Radios.SRS;

public interface ISRSHandler
{
Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Panels/Saitek/Panels/MultiPanelPZ70.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace NonVisuals.Panels.Saitek.Panels
using NonVisuals;
using Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;

/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions src/NonVisuals/Radios/RadioPanelPZ69A10C.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down Expand Up @@ -4002,9 +4002,9 @@ public static string GetCommandDirectionForVhfDial1(int desiredDialPosition, uin
int shift = desiredDialPosition - (int)actualDialPosition;

if (shift > 0)
return shift <= 6 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= 6 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
else
return shift < -6 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift < -6 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}

/// <summary>
Expand All @@ -4021,9 +4021,9 @@ public static string GetCommandDirectionForVhfDial23(int desiredDialPosition, ui
int shift = desiredDialPosition - (int)actualDialPosition;

if (shift > 0)
return shift <= 5 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= 5 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
else
return shift <= -5 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= -5 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}

private void SaveCockpitFrequencyVhfAm()
Expand Down
16 changes: 8 additions & 8 deletions src/NonVisuals/Radios/RadioPanelPZ69A10CII.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down Expand Up @@ -2439,7 +2439,7 @@ private string GetARC210VhfFrequencyAsString()
1 => "25",
2 => "50",
3 => "75",
_ => throw new System.Exception($"Unexpected _arc210VhfCockpitFreq5DialPos [{_arc210VhfCockpitFreq5DialPos}]")
_ => throw new Exception($"Unexpected _arc210VhfCockpitFreq5DialPos [{_arc210VhfCockpitFreq5DialPos}]")
};

frequencyAsString += freq;
Expand Down Expand Up @@ -4009,7 +4009,7 @@ public static string GetCommandDirectionForARC210VhfDial1(int desiredDialPositio
if (desiredDialPosition < 0 || desiredDialPosition > 3 || actualDialPosition > 3)
throw new Exception($"Unexpected value for GetCommandDirectionForARC210VhfDial1. Desired: {actualDialPosition} Actual: {actualDialPosition}");

return actualDialPosition < desiredDialPosition ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return actualDialPosition < desiredDialPosition ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}

/// <summary>
Expand All @@ -4023,7 +4023,7 @@ public static string GetCommandDirectionForARC210VhfDial23(int desiredDialPositi
if (desiredDialPosition < 0 || desiredDialPosition > 9 || actualDialPosition > 9)
throw new Exception($"Unexpected value for GetCommandDirectionForARC210VhfDial23. Desired: {actualDialPosition} Actual: {actualDialPosition}");

return actualDialPosition < desiredDialPosition ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return actualDialPosition < desiredDialPosition ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}


Expand All @@ -4041,9 +4041,9 @@ public static string GetCommandDirectionForVhfDial1(int desiredDialPosition, uin
int shift = desiredDialPosition - (int)actualDialPosition;

if (shift > 0)
return shift <= 6 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= 6 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
else
return shift < -6 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift < -6 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}

/// <summary>
Expand All @@ -4060,9 +4060,9 @@ public static string GetCommandDirectionForVhfDial23(int desiredDialPosition, ui
int shift = desiredDialPosition - (int)actualDialPosition;

if (shift > 0)
return shift <= 5 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= 5 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
else
return shift <= -5 ? RadioPanelPZ69Base.DCSBIOS_INCREASE_COMMAND : RadioPanelPZ69Base.DCSBIOS_DECREASE_COMMAND;
return shift <= -5 ? DCSBIOS_INCREASE_COMMAND : DCSBIOS_DECREASE_COMMAND;
}


Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69AJS37.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69AV8BNA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69Bf109.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69F14B.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
4 changes: 2 additions & 2 deletions src/NonVisuals/Radios/RadioPanelPZ69F16C.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Radios.RadioControls;
using NonVisuals.Radios.RadioSettings;
using RadioControls;
using RadioSettings;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69F5E.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69F86F.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69JF17.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Radios.RadioControls;
using RadioControls;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69Ka50.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69M2000C.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69Mi24P.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69Mi8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69Mosquito.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69P51D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;
using DCS_BIOS.misc;
Expand Down
2 changes: 1 addition & 1 deletion src/NonVisuals/Radios/RadioPanelPZ69SA342.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NonVisuals.Radios
using Knobs;
using Panels.Saitek;
using HID;
using NonVisuals.Helpers;
using Helpers;
using DCS_BIOS.Serialized;
using DCS_BIOS.ControlLocator;

Expand Down
14 changes: 7 additions & 7 deletions src/NonVisuals/Radios/RadioPanelPZ69SRS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
using DCS_BIOS.EventArgs;

using MEF;
using NonVisuals.Plugin;
using NonVisuals.Radios.Knobs;
using NonVisuals.Radios.SRS;
using NonVisuals.Panels.Saitek;
using NonVisuals.HID;
using NonVisuals.BindingClasses.BIP;
using NonVisuals.Helpers;
using Plugin;
using Knobs;
using SRS;
using Panels.Saitek;
using HID;
using BindingClasses.BIP;
using Helpers;
using DCS_BIOS.Serialized;

public struct SRSRadioSmallFreqStepping
Expand Down
Loading
Loading