diff --git a/GlobalMessages.cs b/GlobalMessages.cs index a08b278..7635150 100644 --- a/GlobalMessages.cs +++ b/GlobalMessages.cs @@ -2,378 +2,378 @@ namespace ViPER4WindowsBin { - internal class GlobalMessages - { - public static string LANGUAGE_VERSION_STR = ""; - public static string LANGUAGE_TRANSLATOR_STR = ""; - public static string OK = "OKay"; - public static string CANCEL = "Cancel"; - public static string ENABLE = "Enable"; - public static string LANGUAGE_CHANGE_NOTICE = "The UI language changed, you need to restart the program."; - public static string MENU_LANGUAGE = "Language"; - public static string MENU_SETTING = "Setting"; - public static string MENU_HELP = "Help"; - public static string LATENCY_SETTING = "Latency Setting"; - public static string CURRENT_LATENCY = "Current Latency"; - public static string DESIRED_LATENCY = "Desired Latency"; - public static string LOW_LATENCY_NOTE = "Lower latency will increase CPU load."; - public static string CHANNEL_PAN = "Channel Pan"; - public static string LEFT = "Left"; - public static string RIGHT = "Right"; - public static string BALANCE = "Balance"; - public static string VIRTUALIZATION = "Virtualization"; - public static string AUDIO_SYSTEM_CONFIG = "Audio system config"; - public static string AUDIO_SYSTEM_MONO = "Mono"; - public static string AUDIO_SYSTEM_STEREO = "2.0 System"; - public static string AUDIO_SYSTEM_HEADSET = "Headset"; - public static string AUDIO_SYSTEM_REARSTEREO = "Rear 2.0"; - public static string AUDIO_SYSTEM_QUAD = "4.0 System"; - public static string AUDIO_SYSTEM_X5P1 = "5.1 System"; - public static string AUDIO_SYSTEM_X6P1 = "6.1 System"; - public static string AUDIO_SYSTEM_X7P1 = "7.1 System"; - public static string AUDIO_SYSTEM_X8P1 = "8.1 System"; - public static string VIRT_APPLIED = "Apply virtualization"; - public static string VIRT_PREPOST_PROCESS = "Pre/Post Process"; - public static string VIRT_RESET = "Reset config"; - public static string VIRT_SPEAKER = "Speaker"; - public static string VIRT_SPEAKER_ANGLE = "Angle"; - public static string VIRT_SPEAKER_FRONTLEFT = "Front Left"; - public static string VIRT_SPEAKER_FRONTRIGHT = "Front Right"; - public static string VIRT_SPEAKER_FRONTCENTER = "Front Center"; - public static string VIRT_SPEAKER_LFE = "LFE (Subwoofer)"; - public static string VIRT_SPEAKER_BACKLEFT = "Back Left"; - public static string VIRT_SPEAKER_BACKRIGHT = "Back Right"; - public static string VIRT_SPEAKER_BACKCENTER = "Back Center"; - public static string VIRT_SPEAKER_SIDELEFT = "Side Left"; - public static string VIRT_SPEAKER_SIDERIGHT = "Side Right"; - public static string VIRT_ENVIRONMENT = "Virtual Environment"; - public static string VIRT_ENVIR_SMALLROOM = "Small Room"; - public static string VIRT_ENVIR_BATHROOM = "Bath Room"; - public static string VIRT_ENVIR_LIVINGROOM = "Living Room"; - public static string VIRT_ENVIR_STONEROOM = "Stone Room"; - public static string VIRT_ENVIR_AUDITORIUM = "Auditorium"; - public static string VIRT_ENVIR_CONCERTHALL = "Concert Hall"; - public static string VIRT_ENVIR_HALLWAY = "Hallway"; - public static string RESET_EFFECT = "Reset Effects"; - public static string SETTINGS = "Settings"; - public static string CLOSE_TO_TRAY = "Minimize app to tray when close"; - public static string TRAY_MENU_SETTING = "Tray menu setting"; - public static string TRAY_MENU_PRESETNAME = "Name"; - public static string TRAY_MENU_PRESETMODE = "Mode"; - public static string TRAY_MENU_PRESETFILE = "Preset"; - public static string ADD_NEW_ITEM = "Add new item"; - public static string REMOVE_ITEM = "Remove item"; - public static string REMOVE_ITEM_QUESTION = "Do you really want to remove this item ?"; - public static string MENU_TIPS_NAME = "Name:"; - public static string MENU_TIPS_MODE = "Mode:"; - public static string SELECT_PRESET_FILE = "Select preset file"; - public static string UNNAMED = "Unnamed"; - public static string SWITCH_OFF_EFFECT = "Switch off effect"; - public static string SWITCH_ON_EFFECT = "Switch on effect"; - public static string EXIT_APPLICTION = "Exit"; - public static string ENABLE_APO_COEXIST = "Enable APO coexists"; - public static string ENABLE_APO_COEXIST_WRN_LINE1 = "When APO coexists enabled, you can use all audio effects at the same time."; - public static string ENABLE_APO_COEXIST_WRN_LINE2 = "But maybe this is unstable, please turn off this function if you got any audio problem."; - public static string ENABLE_APO_COEXIST_RESTART = "You must restart your computer before the new setting will take effect."; - public static string CHECK_UPDATE = "Check for update"; - public static string CHECK = "Check"; - public static string VERSION_FROM_INTERNET = "Version from internet"; - public static string COPY_DOWNLOAD_LINK = "Copy download link"; - public static string ABOUT = "About"; - public static string CONTROL_PANEL_VERSION = "Control Panel Version"; - public static string DRIVER_VERSION = "V4W Driver Version"; - public static string CODE_NAME = "V4W Codename"; - public static string LANGUAGE_VERSION = "Language Translate Version"; - public static string LANGUAGE_TRANSLATOR = "Language Translator"; - public static string COPYRIGHT = "Copyright (C) 2013, vipercn.com. All rights reserved."; - public static string SUPPORT_FORUM = "Forum http://forum.vipersaudio.com"; - public static string MASTER_POWER = "Power"; - public static string MUSIC_MODE = "Music Mode"; - public static string MOVIE_MODE = "Movie Mode"; - public static string FREESTYLE_MODE = "Freestyle"; - public static string PRESET = "Preset"; - public static string LOAD_PRESET = "Load preset"; - public static string SAVE_PRESET = "Save preset"; - public static string ERROR = "Error"; - public static string INFORMATION = "Information"; - public static string CANT_LOAD_IRS = "Can't load impulse response, maybe selected wrong file."; - public static string DRIVER_NOT_CONFIG = "The driver not configured, please run \"Configure\" first."; - public static string CANT_SAVE_PRESET = "Can't save effect preset."; - public static string CANT_LOAD_PRESET = "Can't load effect preset."; - public static string TECHNICAL_INFO = "Technical info:"; - public static string PRE_VOLUME = "Pre-Volume"; - public static string POST_VOLUME = "Post-Volume"; - public static string CONVOLVER = "Convolver"; - public static string CONV_IR_GAIN = "IRS Power"; - public static string OPEN_CONV_IRS = "Open Impulse Response Sample"; - public static string SURROUND = "Surround"; - public static string THREE_D_SURROUND = "3D Surround"; - public static string SURROUND_3D = "Space Size"; - public static string SURROUND_IMAGE = "Image Size"; - public static string VHE_SURROUND = "ViPER Headphone Engine"; - public static string VHE_SMALLEST_ROOM = "Smallest Room"; - public static string VHE_SMALL_ROOM = "Small Room"; - public static string VHE_MID_ROOM = "Mid Size Room"; - public static string VHE_LARGE_ROOM = "Large Room"; - public static string VHE_LARGEST_ROOM = "Largest Room"; - public static string BASS = "ViPER XBass"; - public static string BASS_SPKSIZE = "Speaker Size"; - public static string BASS_GAIN = "Bass Level"; - public static string NATURAL_BASS = "Natural Bass"; - public static string PURE_BASS = "Pure Bass"; - public static string CLARITY = "ViPER XClarity"; - public static string NATURAL_CLARITY = "Natural"; - public static string OZONE_CLARITY = "OZone+"; - public static string XHIFI_CLARITY = "X-HiFi"; - public static string CURE = "Cure Tech +"; - public static string SLIGHT_CURE = "Slight"; - public static string MODERATE_CURE = "Moderate"; - public static string EXTREME_CURE = "Extreme"; - public static string TUBE = "Tube Simulator"; - public static string SMART_VOLUME = "ViPER Smart Volume"; - public static string SMART_VOLUME_CONTROL_STRENGTH = "Control Strength"; - public static string SMART_VOLUME_MAXLEVEL = "Max Gain"; - public static string SMART_VOLUME_LEVEL = "Desired Volume"; - public static string EQUALIZER_ADJUST = "Equalizer"; - public static string COMPRESSOR_ADJUST = "Compressor"; - public static string REVERB = "Reverberation"; - public static string REVERB_PRESET = "Reverberation Preset"; - public static string REVERB_PRESET_LIVINGROOM = "Living Room"; - public static string REVERB_PRESET_BATHROOM = "Bath Room"; - public static string REVERB_PRESET_BATHROOM_BATHING = "Bath Room (Bathing)"; - public static string REVERB_PRESET_BEDROOM = "Bed Room"; - public static string REVERB_PRESET_THEATER = "Theater"; - public static string REVERB_PRESET_AUDITORIUM = "Auditorium"; - public static string REVERB_PRESET_UNDERGROUND_PLAZA = "Underground Plaza"; - public static string REVERB_PRESET_UNDERGROUND_PARKING = "Underground Parking"; - public static string REVERB_PRESET_SCENE_SHOW = "Scene Show"; - public static string REVERB_SIZE = "Room Size"; - public static string REVERB_DAMPING = "Damping"; - public static string REVERB_DENSITY = "Density"; - public static string REVERB_BANDWIDTH = "Bandwidth"; - public static string REVERB_DECAY = "Decay"; - public static string REVERB_PREDELAY = "Pre-delay"; - public static string REVERB_EARLYMIX = "Early Mix"; - public static string REVERB_MIX = "Wet Mix"; - public static string EQUALIZER = "Equalizer"; - public static string EQUALIZER_REALTIME_ADJUST = "Realtime adjusting (more CPU usage)"; - public static string EQUALIZER_PRESET = "Equalizer Preset"; - public static string EQUALIZER_PRESET_FLAT = "Flat (Reset)"; - public static string EQUALIZER_PRESET_SUPERBASS = "Super Bass"; - public static string EQUALIZER_PRESET_SOFTBASS = "Soft Bass"; - public static string EQUALIZER_PRESET_ROCK = "Rock Music"; - public static string EQUALIZER_PRESET_RANDB = "R&B Music"; - public static string EQUALIZER_PRESET_CLASSIC = "Classic Music"; - public static string EQUALIZER_PRESET_POP = "POP Music"; - public static string EQUALIZER_PRESET_JAZZ = "Jazz Music"; - public static string EQUALIZER_PRESET_BLUES = "Blues Style"; - public static string EQUALIZER_PRESET_ELECTRONIC = "Electronic"; - public static string EQUALIZER_PRESET_VOCAL = "Vocal Enhance"; - public static string COMPRESSOR = "Compressor"; - public static string COMPRESSOR_THRESHOLD = "Threshold"; - public static string COMPRESSOR_KNEEWIDTH = "Knee Width"; - public static string COMPRESSOR_AUTOKNEE = "Auto Knee Control"; - public static string COMPRESSOR_RATIO = "Ratio"; - public static string COMPRESSOR_ATTACK = "Attack Time"; - public static string COMPRESSOR_AUTOATTACK = "Auto Attack Control"; - public static string COMPRESSOR_RELEASE = "Release Time"; - public static string COMPRESSOR_AUTORELEASE = "Auto Release Control"; - public static string COMPRESSOR_MAKEUPGAIN = "Make-Up Gain"; - public static string COMPRESSOR_AUTOGAIN = "Auto Gain Control"; - public static string COMPRESSOR_MISC = "Misc"; - public static string COMPRESSOR_NOCLIP = "Prevent Clipping"; - public static string COMPRESSOR_KNEEMULT = "Knee Mult"; - public static string COMPRESSOR_MAXATTACK = "Max Attack Time"; - public static string COMPRESSOR_MAXRELEASE = "Max Release Time"; - public static string COMPRESSOR_CRESTTIME = "Crest Time"; - public static string COMPRESSOR_ADAPTTIME = "Adapt Time"; - - public static void LoadMessages(string szLanguageFile) + internal class GlobalMessages { - ConfigFile configFile = new ConfigFile(szLanguageFile); - GlobalMessages.LANGUAGE_VERSION_STR = configFile.ReadConfig("$LANGUAGE_VERSION_STR"); - GlobalMessages.LANGUAGE_TRANSLATOR_STR = configFile.ReadConfig("$LANGUAGE_TRANSLATOR_STR"); - GlobalMessages.OK = configFile.ReadConfig("$OK"); - GlobalMessages.CANCEL = configFile.ReadConfig("$CANCEL"); - GlobalMessages.ENABLE = configFile.ReadConfig("$ENABLE"); - GlobalMessages.LANGUAGE_CHANGE_NOTICE = configFile.ReadConfig("$LANGUAGE_CHANGE_NOTICE"); - GlobalMessages.MENU_LANGUAGE = configFile.ReadConfig("$MENU_LANGUAGE"); - GlobalMessages.MENU_SETTING = configFile.ReadConfig("$MENU_SETTING"); - GlobalMessages.MENU_HELP = configFile.ReadConfig("$MENU_HELP"); - GlobalMessages.LATENCY_SETTING = configFile.ReadConfig("$LATENCY_SETTING"); - GlobalMessages.CURRENT_LATENCY = configFile.ReadConfig("$CURRENT_LATENCY"); - GlobalMessages.DESIRED_LATENCY = configFile.ReadConfig("$DESIRED_LATENCY"); - GlobalMessages.LOW_LATENCY_NOTE = configFile.ReadConfig("$LOW_LATENCY_NOTE"); - GlobalMessages.CHANNEL_PAN = configFile.ReadConfig("$CHANNEL_PAN"); - GlobalMessages.LEFT = configFile.ReadConfig("$LEFT"); - GlobalMessages.RIGHT = configFile.ReadConfig("$RIGHT"); - GlobalMessages.BALANCE = configFile.ReadConfig("$BALANCE"); - GlobalMessages.VIRTUALIZATION = configFile.ReadConfig("$VIRTUALIZATION"); - GlobalMessages.AUDIO_SYSTEM_CONFIG = configFile.ReadConfig("$AUDIO_SYSTEM_CONFIG"); - GlobalMessages.AUDIO_SYSTEM_MONO = configFile.ReadConfig("$AUDIO_SYSTEM_MONO"); - GlobalMessages.AUDIO_SYSTEM_STEREO = configFile.ReadConfig("$AUDIO_SYSTEM_STEREO"); - GlobalMessages.AUDIO_SYSTEM_HEADSET = configFile.ReadConfig("$AUDIO_SYSTEM_HEADSET"); - GlobalMessages.AUDIO_SYSTEM_REARSTEREO = configFile.ReadConfig("$AUDIO_SYSTEM_REARSTEREO"); - GlobalMessages.AUDIO_SYSTEM_QUAD = configFile.ReadConfig("$AUDIO_SYSTEM_QUAD"); - GlobalMessages.AUDIO_SYSTEM_X5P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X5P1"); - GlobalMessages.AUDIO_SYSTEM_X6P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X6P1"); - GlobalMessages.AUDIO_SYSTEM_X7P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X7P1"); - GlobalMessages.AUDIO_SYSTEM_X8P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X8P1"); - GlobalMessages.VIRT_APPLIED = configFile.ReadConfig("$VIRT_APPLIED"); - GlobalMessages.VIRT_PREPOST_PROCESS = configFile.ReadConfig("$VIRT_PREPOST_PROCESS"); - GlobalMessages.VIRT_RESET = configFile.ReadConfig("$VIRT_RESET"); - GlobalMessages.VIRT_SPEAKER = configFile.ReadConfig("$VIRT_SPEAKER"); - GlobalMessages.VIRT_SPEAKER_ANGLE = configFile.ReadConfig("$VIRT_SPEAKER_ANGLE"); - GlobalMessages.VIRT_SPEAKER_FRONTLEFT = configFile.ReadConfig("$VIRT_SPEAKER_FRONTLEFT"); - GlobalMessages.VIRT_SPEAKER_FRONTRIGHT = configFile.ReadConfig("$VIRT_SPEAKER_FRONTRIGHT"); - GlobalMessages.VIRT_SPEAKER_FRONTCENTER = configFile.ReadConfig("$VIRT_SPEAKER_FRONTCENTER"); - GlobalMessages.VIRT_SPEAKER_LFE = configFile.ReadConfig("$VIRT_SPEAKER_LFE"); - GlobalMessages.VIRT_SPEAKER_BACKLEFT = configFile.ReadConfig("$VIRT_SPEAKER_BACKLEFT"); - GlobalMessages.VIRT_SPEAKER_BACKRIGHT = configFile.ReadConfig("$VIRT_SPEAKER_BACKRIGHT"); - GlobalMessages.VIRT_SPEAKER_BACKCENTER = configFile.ReadConfig("$VIRT_SPEAKER_BACKCENTER"); - GlobalMessages.VIRT_SPEAKER_SIDELEFT = configFile.ReadConfig("$VIRT_SPEAKER_SIDELEFT"); - GlobalMessages.VIRT_SPEAKER_SIDERIGHT = configFile.ReadConfig("$VIRT_SPEAKER_SIDERIGHT"); - GlobalMessages.VIRT_ENVIRONMENT = configFile.ReadConfig("$VIRT_ENVIRONMENT"); - GlobalMessages.VIRT_ENVIR_SMALLROOM = configFile.ReadConfig("$VIRT_ENVIR_SMALLROOM"); - GlobalMessages.VIRT_ENVIR_BATHROOM = configFile.ReadConfig("$VIRT_ENVIR_BATHROOM"); - GlobalMessages.VIRT_ENVIR_LIVINGROOM = configFile.ReadConfig("$VIRT_ENVIR_LIVINGROOM"); - GlobalMessages.VIRT_ENVIR_STONEROOM = configFile.ReadConfig("$VIRT_ENVIR_STONEROOM"); - GlobalMessages.VIRT_ENVIR_AUDITORIUM = configFile.ReadConfig("$VIRT_ENVIR_AUDITORIUM"); - GlobalMessages.VIRT_ENVIR_CONCERTHALL = configFile.ReadConfig("$VIRT_ENVIR_CONCERTHALL"); - GlobalMessages.VIRT_ENVIR_HALLWAY = configFile.ReadConfig("$VIRT_ENVIR_HALLWAY"); - GlobalMessages.RESET_EFFECT = configFile.ReadConfig("$RESET_EFFECT"); - GlobalMessages.SETTINGS = configFile.ReadConfig("$SETTINGS"); - GlobalMessages.CLOSE_TO_TRAY = configFile.ReadConfig("$CLOSE_TO_TRAY"); - GlobalMessages.TRAY_MENU_SETTING = configFile.ReadConfig("$TRAY_MENU_SETTING"); - GlobalMessages.TRAY_MENU_PRESETNAME = configFile.ReadConfig("$TRAY_MENU_PRESETNAME"); - GlobalMessages.TRAY_MENU_PRESETMODE = configFile.ReadConfig("$TRAY_MENU_PRESETMODE"); - GlobalMessages.TRAY_MENU_PRESETFILE = configFile.ReadConfig("$TRAY_MENU_PRESETFILE"); - GlobalMessages.ADD_NEW_ITEM = configFile.ReadConfig("$ADD_NEW_ITEM"); - GlobalMessages.REMOVE_ITEM = configFile.ReadConfig("$REMOVE_ITEM"); - GlobalMessages.REMOVE_ITEM_QUESTION = configFile.ReadConfig("$REMOVE_ITEM_QUESTION"); - GlobalMessages.MENU_TIPS_NAME = configFile.ReadConfig("$MENU_TIPS_NAME"); - GlobalMessages.MENU_TIPS_MODE = configFile.ReadConfig("$MENU_TIPS_MODE"); - GlobalMessages.SELECT_PRESET_FILE = configFile.ReadConfig("$SELECT_PRESET_FILE"); - GlobalMessages.UNNAMED = configFile.ReadConfig("$UNNAMED"); - GlobalMessages.SWITCH_OFF_EFFECT = configFile.ReadConfig("$SWITCH_OFF_EFFECT"); - GlobalMessages.SWITCH_ON_EFFECT = configFile.ReadConfig("$SWITCH_ON_EFFECT"); - GlobalMessages.EXIT_APPLICTION = configFile.ReadConfig("$EXIT_APPLICTION"); - GlobalMessages.ENABLE_APO_COEXIST = configFile.ReadConfig("$ENABLE_APO_COEXIST"); - GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE1 = configFile.ReadConfig("$ENABLE_APO_COEXIST_WRN_LINE1"); - GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE2 = configFile.ReadConfig("$ENABLE_APO_COEXIST_WRN_LINE2"); - GlobalMessages.ENABLE_APO_COEXIST_RESTART = configFile.ReadConfig("$ENABLE_APO_COEXIST_RESTART"); - GlobalMessages.CHECK_UPDATE = configFile.ReadConfig("$CHECK_UPDATE"); - GlobalMessages.CHECK = configFile.ReadConfig("$CHECK"); - GlobalMessages.VERSION_FROM_INTERNET = configFile.ReadConfig("$VERSION_FROM_INTERNET"); - GlobalMessages.COPY_DOWNLOAD_LINK = configFile.ReadConfig("$COPY_DOWNLOAD_LINK"); - GlobalMessages.ABOUT = configFile.ReadConfig("$ABOUT"); - GlobalMessages.CONTROL_PANEL_VERSION = configFile.ReadConfig("$CONTROL_PANEL_VERSION"); - GlobalMessages.DRIVER_VERSION = configFile.ReadConfig("$DRIVER_VERSION"); - GlobalMessages.CODE_NAME = configFile.ReadConfig("$CODE_NAME"); - GlobalMessages.LANGUAGE_VERSION = configFile.ReadConfig("$LANGUAGE_VERSION"); - GlobalMessages.LANGUAGE_TRANSLATOR = configFile.ReadConfig("$LANGUAGE_TRANSLATOR"); - GlobalMessages.COPYRIGHT = configFile.ReadConfig("$COPYRIGHT"); - GlobalMessages.SUPPORT_FORUM = configFile.ReadConfig("$SUPPORT_FORUM"); - GlobalMessages.MASTER_POWER = configFile.ReadConfig("$MASTER_POWER"); - GlobalMessages.MUSIC_MODE = configFile.ReadConfig("$MUSIC_MODE"); - GlobalMessages.MOVIE_MODE = configFile.ReadConfig("$MOVIE_MODE"); - GlobalMessages.FREESTYLE_MODE = configFile.ReadConfig("$FREESTYLE_MODE"); - GlobalMessages.PRESET = configFile.ReadConfig("$PRESET"); - GlobalMessages.LOAD_PRESET = configFile.ReadConfig("$LOAD_PRESET"); - GlobalMessages.SAVE_PRESET = configFile.ReadConfig("$SAVE_PRESET"); - GlobalMessages.ERROR = configFile.ReadConfig("$ERROR"); - GlobalMessages.INFORMATION = configFile.ReadConfig("$INFORMATION"); - GlobalMessages.CANT_LOAD_IRS = configFile.ReadConfig("$CANT_LOAD_IRS"); - GlobalMessages.DRIVER_NOT_CONFIG = configFile.ReadConfig("$DRIVER_NOT_CONFIG"); - GlobalMessages.CANT_SAVE_PRESET = configFile.ReadConfig("$CANT_SAVE_PRESET"); - GlobalMessages.CANT_LOAD_PRESET = configFile.ReadConfig("$CANT_LOAD_PRESET"); - GlobalMessages.TECHNICAL_INFO = configFile.ReadConfig("$TECHNICAL_INFO"); - GlobalMessages.PRE_VOLUME = configFile.ReadConfig("$PRE_VOLUME"); - GlobalMessages.POST_VOLUME = configFile.ReadConfig("$POST_VOLUME"); - GlobalMessages.CONVOLVER = configFile.ReadConfig("$CONVOLVER"); - GlobalMessages.CONV_IR_GAIN = configFile.ReadConfig("$CONV_IR_GAIN"); - GlobalMessages.OPEN_CONV_IRS = configFile.ReadConfig("$OPEN_CONV_IRS"); - GlobalMessages.SURROUND = configFile.ReadConfig("$SURROUND"); - GlobalMessages.THREE_D_SURROUND = configFile.ReadConfig("$THREE_D_SURROUND"); - GlobalMessages.SURROUND_3D = configFile.ReadConfig("$SURROUND_3D"); - GlobalMessages.SURROUND_IMAGE = configFile.ReadConfig("$SURROUND_IMAGE"); - GlobalMessages.VHE_SURROUND = configFile.ReadConfig("$VHE_SURROUND"); - GlobalMessages.VHE_SMALLEST_ROOM = configFile.ReadConfig("$VHE_SMALLEST_ROOM"); - GlobalMessages.VHE_SMALL_ROOM = configFile.ReadConfig("$VHE_SMALL_ROOM"); - GlobalMessages.VHE_MID_ROOM = configFile.ReadConfig("$VHE_MID_ROOM"); - GlobalMessages.VHE_LARGE_ROOM = configFile.ReadConfig("$VHE_LARGE_ROOM"); - GlobalMessages.VHE_LARGEST_ROOM = configFile.ReadConfig("$VHE_LARGEST_ROOM"); - GlobalMessages.BASS = configFile.ReadConfig("$BASS"); - GlobalMessages.BASS_SPKSIZE = configFile.ReadConfig("$BASS_SPKSIZE"); - GlobalMessages.BASS_GAIN = configFile.ReadConfig("$BASS_GAIN"); - GlobalMessages.NATURAL_BASS = configFile.ReadConfig("$NATURAL_BASS"); - GlobalMessages.PURE_BASS = configFile.ReadConfig("$PURE_BASS"); - GlobalMessages.CLARITY = configFile.ReadConfig("$CLARITY"); - GlobalMessages.NATURAL_CLARITY = configFile.ReadConfig("$NATURAL_CLARITY"); - GlobalMessages.OZONE_CLARITY = configFile.ReadConfig("$OZONE_CLARITY"); - GlobalMessages.XHIFI_CLARITY = configFile.ReadConfig("$XHIFI_CLARITY"); - GlobalMessages.CURE = configFile.ReadConfig("$CURE"); - GlobalMessages.SLIGHT_CURE = configFile.ReadConfig("$SLIGHT_CURE"); - GlobalMessages.MODERATE_CURE = configFile.ReadConfig("$MODERATE_CURE"); - GlobalMessages.EXTREME_CURE = configFile.ReadConfig("$EXTREME_CURE"); - GlobalMessages.TUBE = configFile.ReadConfig("$TUBE"); - GlobalMessages.SMART_VOLUME = configFile.ReadConfig("$SMART_VOLUME"); - GlobalMessages.SMART_VOLUME_CONTROL_STRENGTH = configFile.ReadConfig("$SMART_VOLUME_CONTROL_STRENGTH"); - GlobalMessages.SMART_VOLUME_MAXLEVEL = configFile.ReadConfig("$SMART_VOLUME_MAXLEVEL"); - GlobalMessages.SMART_VOLUME_LEVEL = configFile.ReadConfig("$SMART_VOLUME_LEVEL"); - GlobalMessages.EQUALIZER_ADJUST = configFile.ReadConfig("$EQUALIZER_ADJUST"); - GlobalMessages.COMPRESSOR_ADJUST = configFile.ReadConfig("$COMPRESSOR_ADJUST"); - GlobalMessages.REVERB = configFile.ReadConfig("$REVERB"); - GlobalMessages.REVERB_PRESET = configFile.ReadConfig("$REVERB_PRESET"); - GlobalMessages.REVERB_PRESET_LIVINGROOM = configFile.ReadConfig("$REVERB_PRESET_LIVINGROOM"); - GlobalMessages.REVERB_PRESET_BATHROOM = configFile.ReadConfig("$REVERB_PRESET_BATHROOM"); - GlobalMessages.REVERB_PRESET_BATHROOM_BATHING = configFile.ReadConfig("$REVERB_PRESET_BATHROOM_BATHING"); - GlobalMessages.REVERB_PRESET_BEDROOM = configFile.ReadConfig("$REVERB_PRESET_BEDROOM"); - GlobalMessages.REVERB_PRESET_THEATER = configFile.ReadConfig("$REVERB_PRESET_THEATER"); - GlobalMessages.REVERB_PRESET_AUDITORIUM = configFile.ReadConfig("$REVERB_PRESET_AUDITORIUM"); - GlobalMessages.REVERB_PRESET_UNDERGROUND_PLAZA = configFile.ReadConfig("$REVERB_PRESET_UNDERGROUND_PLAZA"); - GlobalMessages.REVERB_PRESET_UNDERGROUND_PARKING = configFile.ReadConfig("$REVERB_PRESET_UNDERGROUND_PARKING"); - GlobalMessages.REVERB_PRESET_SCENE_SHOW = configFile.ReadConfig("$REVERB_PRESET_SCENE_SHOW"); - GlobalMessages.REVERB_SIZE = configFile.ReadConfig("$REVERB_SIZE"); - GlobalMessages.REVERB_DAMPING = configFile.ReadConfig("$REVERB_DAMPING"); - GlobalMessages.REVERB_DENSITY = configFile.ReadConfig("$REVERB_DENSITY"); - GlobalMessages.REVERB_BANDWIDTH = configFile.ReadConfig("$REVERB_BANDWIDTH"); - GlobalMessages.REVERB_DECAY = configFile.ReadConfig("$REVERB_DECAY"); - GlobalMessages.REVERB_PREDELAY = configFile.ReadConfig("$REVERB_PREDELAY"); - GlobalMessages.REVERB_EARLYMIX = configFile.ReadConfig("$REVERB_EARLYMIX"); - GlobalMessages.REVERB_MIX = configFile.ReadConfig("$REVERB_MIX"); - GlobalMessages.EQUALIZER = configFile.ReadConfig("$EQUALIZER"); - GlobalMessages.EQUALIZER_REALTIME_ADJUST = configFile.ReadConfig("$EQUALIZER_REALTIME_ADJUST"); - GlobalMessages.EQUALIZER_PRESET = configFile.ReadConfig("$EQUALIZER_PRESET"); - GlobalMessages.EQUALIZER_PRESET_FLAT = configFile.ReadConfig("$EQUALIZER_PRESET_FLAT"); - GlobalMessages.EQUALIZER_PRESET_SUPERBASS = configFile.ReadConfig("$EQUALIZER_PRESET_SUPERBASS"); - GlobalMessages.EQUALIZER_PRESET_SOFTBASS = configFile.ReadConfig("$EQUALIZER_PRESET_SOFTBASS"); - GlobalMessages.EQUALIZER_PRESET_ROCK = configFile.ReadConfig("$EQUALIZER_PRESET_ROCK"); - GlobalMessages.EQUALIZER_PRESET_RANDB = configFile.ReadConfig("$EQUALIZER_PRESET_RANDB"); - GlobalMessages.EQUALIZER_PRESET_CLASSIC = configFile.ReadConfig("$EQUALIZER_PRESET_CLASSIC"); - GlobalMessages.EQUALIZER_PRESET_POP = configFile.ReadConfig("$EQUALIZER_PRESET_POP"); - GlobalMessages.EQUALIZER_PRESET_JAZZ = configFile.ReadConfig("$EQUALIZER_PRESET_JAZZ"); - GlobalMessages.EQUALIZER_PRESET_BLUES = configFile.ReadConfig("$EQUALIZER_PRESET_BLUES"); - GlobalMessages.EQUALIZER_PRESET_ELECTRONIC = configFile.ReadConfig("$EQUALIZER_PRESET_ELECTRONIC"); - GlobalMessages.EQUALIZER_PRESET_VOCAL = configFile.ReadConfig("$EQUALIZER_PRESET_VOCAL"); - GlobalMessages.COMPRESSOR = configFile.ReadConfig("$COMPRESSOR"); - GlobalMessages.COMPRESSOR_THRESHOLD = configFile.ReadConfig("$COMPRESSOR_THRESHOLD"); - GlobalMessages.COMPRESSOR_KNEEWIDTH = configFile.ReadConfig("$COMPRESSOR_KNEEWIDTH"); - GlobalMessages.COMPRESSOR_AUTOKNEE = configFile.ReadConfig("$COMPRESSOR_AUTOKNEE"); - GlobalMessages.COMPRESSOR_RATIO = configFile.ReadConfig("$COMPRESSOR_RATIO"); - GlobalMessages.COMPRESSOR_ATTACK = configFile.ReadConfig("$COMPRESSOR_ATTACK"); - GlobalMessages.COMPRESSOR_AUTOATTACK = configFile.ReadConfig("$COMPRESSOR_AUTOATTACK"); - GlobalMessages.COMPRESSOR_RELEASE = configFile.ReadConfig("$COMPRESSOR_RELEASE"); - GlobalMessages.COMPRESSOR_AUTORELEASE = configFile.ReadConfig("$COMPRESSOR_AUTORELEASE"); - GlobalMessages.COMPRESSOR_MAKEUPGAIN = configFile.ReadConfig("$COMPRESSOR_MAKEUPGAIN"); - GlobalMessages.COMPRESSOR_AUTOGAIN = configFile.ReadConfig("$COMPRESSOR_AUTOGAIN"); - GlobalMessages.COMPRESSOR_MISC = configFile.ReadConfig("$COMPRESSOR_MISC"); - GlobalMessages.COMPRESSOR_NOCLIP = configFile.ReadConfig("$COMPRESSOR_NOCLIP"); - GlobalMessages.COMPRESSOR_KNEEMULT = configFile.ReadConfig("$COMPRESSOR_KNEEMULT"); - GlobalMessages.COMPRESSOR_MAXATTACK = configFile.ReadConfig("$COMPRESSOR_MAXATTACK"); - GlobalMessages.COMPRESSOR_MAXRELEASE = configFile.ReadConfig("$COMPRESSOR_MAXRELEASE"); - GlobalMessages.COMPRESSOR_CRESTTIME = configFile.ReadConfig("$COMPRESSOR_CRESTTIME"); - GlobalMessages.COMPRESSOR_ADAPTTIME = configFile.ReadConfig("$COMPRESSOR_ADAPTTIME"); + public static string LANGUAGE_VERSION_STR = ""; + public static string LANGUAGE_TRANSLATOR_STR = ""; + public static string OK = "OKay"; + public static string CANCEL = "Cancel"; + public static string ENABLE = "Enable"; + public static string LANGUAGE_CHANGE_NOTICE = "The UI language changed, you need to restart the program."; + public static string MENU_LANGUAGE = "Language"; + public static string MENU_SETTING = "Setting"; + public static string MENU_HELP = "Help"; + public static string LATENCY_SETTING = "Latency Setting"; + public static string CURRENT_LATENCY = "Current Latency"; + public static string DESIRED_LATENCY = "Desired Latency"; + public static string LOW_LATENCY_NOTE = "Lower latency will increase CPU load."; + public static string CHANNEL_PAN = "Channel Pan"; + public static string LEFT = "Left"; + public static string RIGHT = "Right"; + public static string BALANCE = "Balance"; + public static string VIRTUALIZATION = "Virtualization"; + public static string AUDIO_SYSTEM_CONFIG = "Audio system config"; + public static string AUDIO_SYSTEM_MONO = "Mono"; + public static string AUDIO_SYSTEM_STEREO = "2.0 System"; + public static string AUDIO_SYSTEM_HEADSET = "Headset"; + public static string AUDIO_SYSTEM_REARSTEREO = "Rear 2.0"; + public static string AUDIO_SYSTEM_QUAD = "4.0 System"; + public static string AUDIO_SYSTEM_X5P1 = "5.1 System"; + public static string AUDIO_SYSTEM_X6P1 = "6.1 System"; + public static string AUDIO_SYSTEM_X7P1 = "7.1 System"; + public static string AUDIO_SYSTEM_X8P1 = "8.1 System"; + public static string VIRT_APPLIED = "Apply virtualization"; + public static string VIRT_PREPOST_PROCESS = "Pre/Post Process"; + public static string VIRT_RESET = "Reset config"; + public static string VIRT_SPEAKER = "Speaker"; + public static string VIRT_SPEAKER_ANGLE = "Angle"; + public static string VIRT_SPEAKER_FRONTLEFT = "Front Left"; + public static string VIRT_SPEAKER_FRONTRIGHT = "Front Right"; + public static string VIRT_SPEAKER_FRONTCENTER = "Front Center"; + public static string VIRT_SPEAKER_LFE = "LFE (Subwoofer)"; + public static string VIRT_SPEAKER_BACKLEFT = "Back Left"; + public static string VIRT_SPEAKER_BACKRIGHT = "Back Right"; + public static string VIRT_SPEAKER_BACKCENTER = "Back Center"; + public static string VIRT_SPEAKER_SIDELEFT = "Side Left"; + public static string VIRT_SPEAKER_SIDERIGHT = "Side Right"; + public static string VIRT_ENVIRONMENT = "Virtual Environment"; + public static string VIRT_ENVIR_SMALLROOM = "Small Room"; + public static string VIRT_ENVIR_BATHROOM = "Bath Room"; + public static string VIRT_ENVIR_LIVINGROOM = "Living Room"; + public static string VIRT_ENVIR_STONEROOM = "Stone Room"; + public static string VIRT_ENVIR_AUDITORIUM = "Auditorium"; + public static string VIRT_ENVIR_CONCERTHALL = "Concert Hall"; + public static string VIRT_ENVIR_HALLWAY = "Hallway"; + public static string RESET_EFFECT = "Reset Effects"; + public static string SETTINGS = "Settings"; + public static string CLOSE_TO_TRAY = "Minimize app to tray when close"; + public static string TRAY_MENU_SETTING = "Tray menu setting"; + public static string TRAY_MENU_PRESETNAME = "Name"; + public static string TRAY_MENU_PRESETMODE = "Mode"; + public static string TRAY_MENU_PRESETFILE = "Preset"; + public static string ADD_NEW_ITEM = "Add new item"; + public static string REMOVE_ITEM = "Remove item"; + public static string REMOVE_ITEM_QUESTION = "Do you really want to remove this item ?"; + public static string MENU_TIPS_NAME = "Name:"; + public static string MENU_TIPS_MODE = "Mode:"; + public static string SELECT_PRESET_FILE = "Select preset file"; + public static string UNNAMED = "Unnamed"; + public static string SWITCH_OFF_EFFECT = "Switch off effect"; + public static string SWITCH_ON_EFFECT = "Switch on effect"; + public static string EXIT_APPLICTION = "Exit"; + public static string ENABLE_APO_COEXIST = "Enable APO coexists"; + public static string ENABLE_APO_COEXIST_WRN_LINE1 = "When APO coexists enabled, you can use all audio effects at the same time."; + public static string ENABLE_APO_COEXIST_WRN_LINE2 = "But maybe this is unstable, please turn off this function if you got any audio problem."; + public static string ENABLE_APO_COEXIST_RESTART = "You must restart your computer before the new setting will take effect."; + public static string CHECK_UPDATE = "Check for update"; + public static string CHECK = "Check"; + public static string VERSION_FROM_INTERNET = "Version from internet"; + public static string COPY_DOWNLOAD_LINK = "Copy download link"; + public static string ABOUT = "About"; + public static string CONTROL_PANEL_VERSION = "Control Panel Version"; + public static string DRIVER_VERSION = "V4W Driver Version"; + public static string CODE_NAME = "V4W Codename"; + public static string LANGUAGE_VERSION = "Language Translate Version"; + public static string LANGUAGE_TRANSLATOR = "Language Translator"; + public static string COPYRIGHT = "Copyright (C) 2013, vipercn.com. All rights reserved."; + public static string SUPPORT_FORUM = "Forum http://forum.vipersaudio.com"; + public static string MASTER_POWER = "Power"; + public static string MUSIC_MODE = "Music Mode"; + public static string MOVIE_MODE = "Movie Mode"; + public static string FREESTYLE_MODE = "Freestyle"; + public static string PRESET = "Preset"; + public static string LOAD_PRESET = "Load preset"; + public static string SAVE_PRESET = "Save preset"; + public static string ERROR = "Error"; + public static string INFORMATION = "Information"; + public static string CANT_LOAD_IRS = "Can't load impulse response, maybe selected wrong file."; + public static string DRIVER_NOT_CONFIG = "The driver not configured, please run \"Configure\" first."; + public static string CANT_SAVE_PRESET = "Can't save effect preset."; + public static string CANT_LOAD_PRESET = "Can't load effect preset."; + public static string TECHNICAL_INFO = "Technical info:"; + public static string PRE_VOLUME = "Pre-Volume"; + public static string POST_VOLUME = "Post-Volume"; + public static string CONVOLVER = "Convolver"; + public static string CONV_IR_GAIN = "IRS Power"; + public static string OPEN_CONV_IRS = "Open Impulse Response Sample"; + public static string SURROUND = "Surround"; + public static string THREE_D_SURROUND = "3D Surround"; + public static string SURROUND_3D = "Space Size"; + public static string SURROUND_IMAGE = "Image Size"; + public static string VHE_SURROUND = "ViPER Headphone Engine"; + public static string VHE_SMALLEST_ROOM = "Smallest Room"; + public static string VHE_SMALL_ROOM = "Small Room"; + public static string VHE_MID_ROOM = "Mid Size Room"; + public static string VHE_LARGE_ROOM = "Large Room"; + public static string VHE_LARGEST_ROOM = "Largest Room"; + public static string BASS = "ViPER XBass"; + public static string BASS_SPKSIZE = "Speaker Size"; + public static string BASS_GAIN = "Bass Level"; + public static string NATURAL_BASS = "Natural Bass"; + public static string PURE_BASS = "Pure Bass"; + public static string CLARITY = "ViPER XClarity"; + public static string NATURAL_CLARITY = "Natural"; + public static string OZONE_CLARITY = "OZone+"; + public static string XHIFI_CLARITY = "X-HiFi"; + public static string CURE = "Cure Tech +"; + public static string SLIGHT_CURE = "Slight"; + public static string MODERATE_CURE = "Moderate"; + public static string EXTREME_CURE = "Extreme"; + public static string TUBE = "Tube Simulator"; + public static string SMART_VOLUME = "ViPER Smart Volume"; + public static string SMART_VOLUME_CONTROL_STRENGTH = "Control Strength"; + public static string SMART_VOLUME_MAXLEVEL = "Max Gain"; + public static string SMART_VOLUME_LEVEL = "Desired Volume"; + public static string EQUALIZER_ADJUST = "Equalizer"; + public static string COMPRESSOR_ADJUST = "Compressor"; + public static string REVERB = "Reverberation"; + public static string REVERB_PRESET = "Reverberation Preset"; + public static string REVERB_PRESET_LIVINGROOM = "Living Room"; + public static string REVERB_PRESET_BATHROOM = "Bath Room"; + public static string REVERB_PRESET_BATHROOM_BATHING = "Bath Room (Bathing)"; + public static string REVERB_PRESET_BEDROOM = "Bed Room"; + public static string REVERB_PRESET_THEATER = "Theater"; + public static string REVERB_PRESET_AUDITORIUM = "Auditorium"; + public static string REVERB_PRESET_UNDERGROUND_PLAZA = "Underground Plaza"; + public static string REVERB_PRESET_UNDERGROUND_PARKING = "Underground Parking"; + public static string REVERB_PRESET_SCENE_SHOW = "Scene Show"; + public static string REVERB_SIZE = "Room Size"; + public static string REVERB_DAMPING = "Damping"; + public static string REVERB_DENSITY = "Density"; + public static string REVERB_BANDWIDTH = "Bandwidth"; + public static string REVERB_DECAY = "Decay"; + public static string REVERB_PREDELAY = "Pre-delay"; + public static string REVERB_EARLYMIX = "Early Mix"; + public static string REVERB_MIX = "Wet Mix"; + public static string EQUALIZER = "Equalizer"; + public static string EQUALIZER_REALTIME_ADJUST = "Realtime adjusting (more CPU usage)"; + public static string EQUALIZER_PRESET = "Equalizer Preset"; + public static string EQUALIZER_PRESET_FLAT = "Flat (Reset)"; + public static string EQUALIZER_PRESET_SUPERBASS = "Super Bass"; + public static string EQUALIZER_PRESET_SOFTBASS = "Soft Bass"; + public static string EQUALIZER_PRESET_ROCK = "Rock Music"; + public static string EQUALIZER_PRESET_RANDB = "R&B Music"; + public static string EQUALIZER_PRESET_CLASSIC = "Classic Music"; + public static string EQUALIZER_PRESET_POP = "POP Music"; + public static string EQUALIZER_PRESET_JAZZ = "Jazz Music"; + public static string EQUALIZER_PRESET_BLUES = "Blues Style"; + public static string EQUALIZER_PRESET_ELECTRONIC = "Electronic"; + public static string EQUALIZER_PRESET_VOCAL = "Vocal Enhance"; + public static string COMPRESSOR = "Compressor"; + public static string COMPRESSOR_THRESHOLD = "Threshold"; + public static string COMPRESSOR_KNEEWIDTH = "Knee Width"; + public static string COMPRESSOR_AUTOKNEE = "Auto Knee Control"; + public static string COMPRESSOR_RATIO = "Ratio"; + public static string COMPRESSOR_ATTACK = "Attack Time"; + public static string COMPRESSOR_AUTOATTACK = "Auto Attack Control"; + public static string COMPRESSOR_RELEASE = "Release Time"; + public static string COMPRESSOR_AUTORELEASE = "Auto Release Control"; + public static string COMPRESSOR_MAKEUPGAIN = "Make-Up Gain"; + public static string COMPRESSOR_AUTOGAIN = "Auto Gain Control"; + public static string COMPRESSOR_MISC = "Misc"; + public static string COMPRESSOR_NOCLIP = "Prevent Clipping"; + public static string COMPRESSOR_KNEEMULT = "Knee Mult"; + public static string COMPRESSOR_MAXATTACK = "Max Attack Time"; + public static string COMPRESSOR_MAXRELEASE = "Max Release Time"; + public static string COMPRESSOR_CRESTTIME = "Crest Time"; + public static string COMPRESSOR_ADAPTTIME = "Adapt Time"; + + public static void LoadMessages(string szLanguageFile) + { + ConfigFile configFile = new ConfigFile(szLanguageFile); + LANGUAGE_VERSION_STR = configFile.ReadConfig("$LANGUAGE_VERSION_STR"); + LANGUAGE_TRANSLATOR_STR = configFile.ReadConfig("$LANGUAGE_TRANSLATOR_STR"); + OK = configFile.ReadConfig("$OK"); + CANCEL = configFile.ReadConfig("$CANCEL"); + ENABLE = configFile.ReadConfig("$ENABLE"); + LANGUAGE_CHANGE_NOTICE = configFile.ReadConfig("$LANGUAGE_CHANGE_NOTICE"); + MENU_LANGUAGE = configFile.ReadConfig("$MENU_LANGUAGE"); + MENU_SETTING = configFile.ReadConfig("$MENU_SETTING"); + MENU_HELP = configFile.ReadConfig("$MENU_HELP"); + LATENCY_SETTING = configFile.ReadConfig("$LATENCY_SETTING"); + CURRENT_LATENCY = configFile.ReadConfig("$CURRENT_LATENCY"); + DESIRED_LATENCY = configFile.ReadConfig("$DESIRED_LATENCY"); + LOW_LATENCY_NOTE = configFile.ReadConfig("$LOW_LATENCY_NOTE"); + CHANNEL_PAN = configFile.ReadConfig("$CHANNEL_PAN"); + LEFT = configFile.ReadConfig("$LEFT"); + RIGHT = configFile.ReadConfig("$RIGHT"); + BALANCE = configFile.ReadConfig("$BALANCE"); + VIRTUALIZATION = configFile.ReadConfig("$VIRTUALIZATION"); + AUDIO_SYSTEM_CONFIG = configFile.ReadConfig("$AUDIO_SYSTEM_CONFIG"); + AUDIO_SYSTEM_MONO = configFile.ReadConfig("$AUDIO_SYSTEM_MONO"); + AUDIO_SYSTEM_STEREO = configFile.ReadConfig("$AUDIO_SYSTEM_STEREO"); + AUDIO_SYSTEM_HEADSET = configFile.ReadConfig("$AUDIO_SYSTEM_HEADSET"); + AUDIO_SYSTEM_REARSTEREO = configFile.ReadConfig("$AUDIO_SYSTEM_REARSTEREO"); + AUDIO_SYSTEM_QUAD = configFile.ReadConfig("$AUDIO_SYSTEM_QUAD"); + AUDIO_SYSTEM_X5P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X5P1"); + AUDIO_SYSTEM_X6P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X6P1"); + AUDIO_SYSTEM_X7P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X7P1"); + AUDIO_SYSTEM_X8P1 = configFile.ReadConfig("$AUDIO_SYSTEM_X8P1"); + VIRT_APPLIED = configFile.ReadConfig("$VIRT_APPLIED"); + VIRT_PREPOST_PROCESS = configFile.ReadConfig("$VIRT_PREPOST_PROCESS"); + VIRT_RESET = configFile.ReadConfig("$VIRT_RESET"); + VIRT_SPEAKER = configFile.ReadConfig("$VIRT_SPEAKER"); + VIRT_SPEAKER_ANGLE = configFile.ReadConfig("$VIRT_SPEAKER_ANGLE"); + VIRT_SPEAKER_FRONTLEFT = configFile.ReadConfig("$VIRT_SPEAKER_FRONTLEFT"); + VIRT_SPEAKER_FRONTRIGHT = configFile.ReadConfig("$VIRT_SPEAKER_FRONTRIGHT"); + VIRT_SPEAKER_FRONTCENTER = configFile.ReadConfig("$VIRT_SPEAKER_FRONTCENTER"); + VIRT_SPEAKER_LFE = configFile.ReadConfig("$VIRT_SPEAKER_LFE"); + VIRT_SPEAKER_BACKLEFT = configFile.ReadConfig("$VIRT_SPEAKER_BACKLEFT"); + VIRT_SPEAKER_BACKRIGHT = configFile.ReadConfig("$VIRT_SPEAKER_BACKRIGHT"); + VIRT_SPEAKER_BACKCENTER = configFile.ReadConfig("$VIRT_SPEAKER_BACKCENTER"); + VIRT_SPEAKER_SIDELEFT = configFile.ReadConfig("$VIRT_SPEAKER_SIDELEFT"); + VIRT_SPEAKER_SIDERIGHT = configFile.ReadConfig("$VIRT_SPEAKER_SIDERIGHT"); + VIRT_ENVIRONMENT = configFile.ReadConfig("$VIRT_ENVIRONMENT"); + VIRT_ENVIR_SMALLROOM = configFile.ReadConfig("$VIRT_ENVIR_SMALLROOM"); + VIRT_ENVIR_BATHROOM = configFile.ReadConfig("$VIRT_ENVIR_BATHROOM"); + VIRT_ENVIR_LIVINGROOM = configFile.ReadConfig("$VIRT_ENVIR_LIVINGROOM"); + VIRT_ENVIR_STONEROOM = configFile.ReadConfig("$VIRT_ENVIR_STONEROOM"); + VIRT_ENVIR_AUDITORIUM = configFile.ReadConfig("$VIRT_ENVIR_AUDITORIUM"); + VIRT_ENVIR_CONCERTHALL = configFile.ReadConfig("$VIRT_ENVIR_CONCERTHALL"); + VIRT_ENVIR_HALLWAY = configFile.ReadConfig("$VIRT_ENVIR_HALLWAY"); + RESET_EFFECT = configFile.ReadConfig("$RESET_EFFECT"); + SETTINGS = configFile.ReadConfig("$SETTINGS"); + CLOSE_TO_TRAY = configFile.ReadConfig("$CLOSE_TO_TRAY"); + TRAY_MENU_SETTING = configFile.ReadConfig("$TRAY_MENU_SETTING"); + TRAY_MENU_PRESETNAME = configFile.ReadConfig("$TRAY_MENU_PRESETNAME"); + TRAY_MENU_PRESETMODE = configFile.ReadConfig("$TRAY_MENU_PRESETMODE"); + TRAY_MENU_PRESETFILE = configFile.ReadConfig("$TRAY_MENU_PRESETFILE"); + ADD_NEW_ITEM = configFile.ReadConfig("$ADD_NEW_ITEM"); + REMOVE_ITEM = configFile.ReadConfig("$REMOVE_ITEM"); + REMOVE_ITEM_QUESTION = configFile.ReadConfig("$REMOVE_ITEM_QUESTION"); + MENU_TIPS_NAME = configFile.ReadConfig("$MENU_TIPS_NAME"); + MENU_TIPS_MODE = configFile.ReadConfig("$MENU_TIPS_MODE"); + SELECT_PRESET_FILE = configFile.ReadConfig("$SELECT_PRESET_FILE"); + UNNAMED = configFile.ReadConfig("$UNNAMED"); + SWITCH_OFF_EFFECT = configFile.ReadConfig("$SWITCH_OFF_EFFECT"); + SWITCH_ON_EFFECT = configFile.ReadConfig("$SWITCH_ON_EFFECT"); + EXIT_APPLICTION = configFile.ReadConfig("$EXIT_APPLICTION"); + ENABLE_APO_COEXIST = configFile.ReadConfig("$ENABLE_APO_COEXIST"); + ENABLE_APO_COEXIST_WRN_LINE1 = configFile.ReadConfig("$ENABLE_APO_COEXIST_WRN_LINE1"); + ENABLE_APO_COEXIST_WRN_LINE2 = configFile.ReadConfig("$ENABLE_APO_COEXIST_WRN_LINE2"); + ENABLE_APO_COEXIST_RESTART = configFile.ReadConfig("$ENABLE_APO_COEXIST_RESTART"); + CHECK_UPDATE = configFile.ReadConfig("$CHECK_UPDATE"); + CHECK = configFile.ReadConfig("$CHECK"); + VERSION_FROM_INTERNET = configFile.ReadConfig("$VERSION_FROM_INTERNET"); + COPY_DOWNLOAD_LINK = configFile.ReadConfig("$COPY_DOWNLOAD_LINK"); + ABOUT = configFile.ReadConfig("$ABOUT"); + CONTROL_PANEL_VERSION = configFile.ReadConfig("$CONTROL_PANEL_VERSION"); + DRIVER_VERSION = configFile.ReadConfig("$DRIVER_VERSION"); + CODE_NAME = configFile.ReadConfig("$CODE_NAME"); + LANGUAGE_VERSION = configFile.ReadConfig("$LANGUAGE_VERSION"); + LANGUAGE_TRANSLATOR = configFile.ReadConfig("$LANGUAGE_TRANSLATOR"); + COPYRIGHT = configFile.ReadConfig("$COPYRIGHT"); + SUPPORT_FORUM = configFile.ReadConfig("$SUPPORT_FORUM"); + MASTER_POWER = configFile.ReadConfig("$MASTER_POWER"); + MUSIC_MODE = configFile.ReadConfig("$MUSIC_MODE"); + MOVIE_MODE = configFile.ReadConfig("$MOVIE_MODE"); + FREESTYLE_MODE = configFile.ReadConfig("$FREESTYLE_MODE"); + PRESET = configFile.ReadConfig("$PRESET"); + LOAD_PRESET = configFile.ReadConfig("$LOAD_PRESET"); + SAVE_PRESET = configFile.ReadConfig("$SAVE_PRESET"); + ERROR = configFile.ReadConfig("$ERROR"); + INFORMATION = configFile.ReadConfig("$INFORMATION"); + CANT_LOAD_IRS = configFile.ReadConfig("$CANT_LOAD_IRS"); + DRIVER_NOT_CONFIG = configFile.ReadConfig("$DRIVER_NOT_CONFIG"); + CANT_SAVE_PRESET = configFile.ReadConfig("$CANT_SAVE_PRESET"); + CANT_LOAD_PRESET = configFile.ReadConfig("$CANT_LOAD_PRESET"); + TECHNICAL_INFO = configFile.ReadConfig("$TECHNICAL_INFO"); + PRE_VOLUME = configFile.ReadConfig("$PRE_VOLUME"); + POST_VOLUME = configFile.ReadConfig("$POST_VOLUME"); + CONVOLVER = configFile.ReadConfig("$CONVOLVER"); + CONV_IR_GAIN = configFile.ReadConfig("$CONV_IR_GAIN"); + OPEN_CONV_IRS = configFile.ReadConfig("$OPEN_CONV_IRS"); + SURROUND = configFile.ReadConfig("$SURROUND"); + THREE_D_SURROUND = configFile.ReadConfig("$THREE_D_SURROUND"); + SURROUND_3D = configFile.ReadConfig("$SURROUND_3D"); + SURROUND_IMAGE = configFile.ReadConfig("$SURROUND_IMAGE"); + VHE_SURROUND = configFile.ReadConfig("$VHE_SURROUND"); + VHE_SMALLEST_ROOM = configFile.ReadConfig("$VHE_SMALLEST_ROOM"); + VHE_SMALL_ROOM = configFile.ReadConfig("$VHE_SMALL_ROOM"); + VHE_MID_ROOM = configFile.ReadConfig("$VHE_MID_ROOM"); + VHE_LARGE_ROOM = configFile.ReadConfig("$VHE_LARGE_ROOM"); + VHE_LARGEST_ROOM = configFile.ReadConfig("$VHE_LARGEST_ROOM"); + BASS = configFile.ReadConfig("$BASS"); + BASS_SPKSIZE = configFile.ReadConfig("$BASS_SPKSIZE"); + BASS_GAIN = configFile.ReadConfig("$BASS_GAIN"); + NATURAL_BASS = configFile.ReadConfig("$NATURAL_BASS"); + PURE_BASS = configFile.ReadConfig("$PURE_BASS"); + CLARITY = configFile.ReadConfig("$CLARITY"); + NATURAL_CLARITY = configFile.ReadConfig("$NATURAL_CLARITY"); + OZONE_CLARITY = configFile.ReadConfig("$OZONE_CLARITY"); + XHIFI_CLARITY = configFile.ReadConfig("$XHIFI_CLARITY"); + CURE = configFile.ReadConfig("$CURE"); + SLIGHT_CURE = configFile.ReadConfig("$SLIGHT_CURE"); + MODERATE_CURE = configFile.ReadConfig("$MODERATE_CURE"); + EXTREME_CURE = configFile.ReadConfig("$EXTREME_CURE"); + TUBE = configFile.ReadConfig("$TUBE"); + SMART_VOLUME = configFile.ReadConfig("$SMART_VOLUME"); + SMART_VOLUME_CONTROL_STRENGTH = configFile.ReadConfig("$SMART_VOLUME_CONTROL_STRENGTH"); + SMART_VOLUME_MAXLEVEL = configFile.ReadConfig("$SMART_VOLUME_MAXLEVEL"); + SMART_VOLUME_LEVEL = configFile.ReadConfig("$SMART_VOLUME_LEVEL"); + EQUALIZER_ADJUST = configFile.ReadConfig("$EQUALIZER_ADJUST"); + COMPRESSOR_ADJUST = configFile.ReadConfig("$COMPRESSOR_ADJUST"); + REVERB = configFile.ReadConfig("$REVERB"); + REVERB_PRESET = configFile.ReadConfig("$REVERB_PRESET"); + REVERB_PRESET_LIVINGROOM = configFile.ReadConfig("$REVERB_PRESET_LIVINGROOM"); + REVERB_PRESET_BATHROOM = configFile.ReadConfig("$REVERB_PRESET_BATHROOM"); + REVERB_PRESET_BATHROOM_BATHING = configFile.ReadConfig("$REVERB_PRESET_BATHROOM_BATHING"); + REVERB_PRESET_BEDROOM = configFile.ReadConfig("$REVERB_PRESET_BEDROOM"); + REVERB_PRESET_THEATER = configFile.ReadConfig("$REVERB_PRESET_THEATER"); + REVERB_PRESET_AUDITORIUM = configFile.ReadConfig("$REVERB_PRESET_AUDITORIUM"); + REVERB_PRESET_UNDERGROUND_PLAZA = configFile.ReadConfig("$REVERB_PRESET_UNDERGROUND_PLAZA"); + REVERB_PRESET_UNDERGROUND_PARKING = configFile.ReadConfig("$REVERB_PRESET_UNDERGROUND_PARKING"); + REVERB_PRESET_SCENE_SHOW = configFile.ReadConfig("$REVERB_PRESET_SCENE_SHOW"); + REVERB_SIZE = configFile.ReadConfig("$REVERB_SIZE"); + REVERB_DAMPING = configFile.ReadConfig("$REVERB_DAMPING"); + REVERB_DENSITY = configFile.ReadConfig("$REVERB_DENSITY"); + REVERB_BANDWIDTH = configFile.ReadConfig("$REVERB_BANDWIDTH"); + REVERB_DECAY = configFile.ReadConfig("$REVERB_DECAY"); + REVERB_PREDELAY = configFile.ReadConfig("$REVERB_PREDELAY"); + REVERB_EARLYMIX = configFile.ReadConfig("$REVERB_EARLYMIX"); + REVERB_MIX = configFile.ReadConfig("$REVERB_MIX"); + EQUALIZER = configFile.ReadConfig("$EQUALIZER"); + EQUALIZER_REALTIME_ADJUST = configFile.ReadConfig("$EQUALIZER_REALTIME_ADJUST"); + EQUALIZER_PRESET = configFile.ReadConfig("$EQUALIZER_PRESET"); + EQUALIZER_PRESET_FLAT = configFile.ReadConfig("$EQUALIZER_PRESET_FLAT"); + EQUALIZER_PRESET_SUPERBASS = configFile.ReadConfig("$EQUALIZER_PRESET_SUPERBASS"); + EQUALIZER_PRESET_SOFTBASS = configFile.ReadConfig("$EQUALIZER_PRESET_SOFTBASS"); + EQUALIZER_PRESET_ROCK = configFile.ReadConfig("$EQUALIZER_PRESET_ROCK"); + EQUALIZER_PRESET_RANDB = configFile.ReadConfig("$EQUALIZER_PRESET_RANDB"); + EQUALIZER_PRESET_CLASSIC = configFile.ReadConfig("$EQUALIZER_PRESET_CLASSIC"); + EQUALIZER_PRESET_POP = configFile.ReadConfig("$EQUALIZER_PRESET_POP"); + EQUALIZER_PRESET_JAZZ = configFile.ReadConfig("$EQUALIZER_PRESET_JAZZ"); + EQUALIZER_PRESET_BLUES = configFile.ReadConfig("$EQUALIZER_PRESET_BLUES"); + EQUALIZER_PRESET_ELECTRONIC = configFile.ReadConfig("$EQUALIZER_PRESET_ELECTRONIC"); + EQUALIZER_PRESET_VOCAL = configFile.ReadConfig("$EQUALIZER_PRESET_VOCAL"); + COMPRESSOR = configFile.ReadConfig("$COMPRESSOR"); + COMPRESSOR_THRESHOLD = configFile.ReadConfig("$COMPRESSOR_THRESHOLD"); + COMPRESSOR_KNEEWIDTH = configFile.ReadConfig("$COMPRESSOR_KNEEWIDTH"); + COMPRESSOR_AUTOKNEE = configFile.ReadConfig("$COMPRESSOR_AUTOKNEE"); + COMPRESSOR_RATIO = configFile.ReadConfig("$COMPRESSOR_RATIO"); + COMPRESSOR_ATTACK = configFile.ReadConfig("$COMPRESSOR_ATTACK"); + COMPRESSOR_AUTOATTACK = configFile.ReadConfig("$COMPRESSOR_AUTOATTACK"); + COMPRESSOR_RELEASE = configFile.ReadConfig("$COMPRESSOR_RELEASE"); + COMPRESSOR_AUTORELEASE = configFile.ReadConfig("$COMPRESSOR_AUTORELEASE"); + COMPRESSOR_MAKEUPGAIN = configFile.ReadConfig("$COMPRESSOR_MAKEUPGAIN"); + COMPRESSOR_AUTOGAIN = configFile.ReadConfig("$COMPRESSOR_AUTOGAIN"); + COMPRESSOR_MISC = configFile.ReadConfig("$COMPRESSOR_MISC"); + COMPRESSOR_NOCLIP = configFile.ReadConfig("$COMPRESSOR_NOCLIP"); + COMPRESSOR_KNEEMULT = configFile.ReadConfig("$COMPRESSOR_KNEEMULT"); + COMPRESSOR_MAXATTACK = configFile.ReadConfig("$COMPRESSOR_MAXATTACK"); + COMPRESSOR_MAXRELEASE = configFile.ReadConfig("$COMPRESSOR_MAXRELEASE"); + COMPRESSOR_CRESTTIME = configFile.ReadConfig("$COMPRESSOR_CRESTTIME"); + COMPRESSOR_ADAPTTIME = configFile.ReadConfig("$COMPRESSOR_ADAPTTIME"); + } } - } } diff --git a/Program.cs b/Program.cs index 10dca38..361d55c 100644 --- a/Program.cs +++ b/Program.cs @@ -6,86 +6,86 @@ namespace ViPER4WindowsBin { - internal static class Program - { - [STAThread] - private static void Main(string[] szArgs) + internal static class Program { - if (Program.RunningInstance() != null) - return; - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - string szLanguagePath = ""; - string szLanguageFile = ""; - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; - if (!baseDirectory.EndsWith("\\")) - baseDirectory += "\\"; - string szFolder = baseDirectory + "Language\\"; - string str1 = new ConfigFile(baseDirectory + "Config.ini").ReadConfig("$LANGUAGE_NAME"); - if (str1 == "") - str1 = "English"; - string[] strArray = new FolderExplorer().ListFiles(szFolder); - string str2 = ""; - foreach (string szConfigPath in strArray) - { - if (new ConfigFile(szConfigPath).ReadConfig("$LANGUAGE_NAME").Trim() == str1) + [STAThread] + private static void Main(string[] szArgs) { - str2 = szConfigPath; - break; + if (RunningInstance() != null) + return; + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + string szLanguagePath = ""; + string szLanguageFile = ""; + string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if (!baseDirectory.EndsWith("\\")) + baseDirectory += "\\"; + string szFolder = baseDirectory + "Language\\"; + string str1 = new ConfigFile(baseDirectory + "Config.ini").ReadConfig("$LANGUAGE_NAME"); + if (str1 == "") + str1 = "English"; + string[] strArray = new FolderExplorer().ListFiles(szFolder); + string str2 = ""; + foreach (string szConfigPath in strArray) + { + if (new ConfigFile(szConfigPath).ReadConfig("$LANGUAGE_NAME").Trim() == str1) + { + str2 = szConfigPath; + break; + } + } + if (str2 != "") + { + szLanguagePath = szFolder; + szLanguageFile = str2; + } + else if (str1 == "English") + { + _ = (int)MessageBox.Show("Can not load default language (English), use built-in language.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + } + else + { + string str3 = "English"; + foreach (string szConfigPath in strArray) + { + if (new ConfigFile(szConfigPath).ReadConfig("$LANGUAGE_NAME").Trim() == str3) + { + str2 = szConfigPath; + break; + } + } + if (str2 != "") + { + szLanguagePath = szFolder; + szLanguageFile = str2; + } + else + { + _ = (int)MessageBox.Show("Can not load default language (English), use built-in language.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + } + } + if (szLanguagePath != "" && szLanguageFile != "") + GlobalMessages.LoadMessages(szLanguageFile); + if (!RegHelper.CheckConfigRegister()) + { + _ = (int)MessageBox.Show(GlobalMessages.DRIVER_NOT_CONFIG, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + else + { + FrmMain.SetLanguage(szLanguagePath, szLanguageFile); + Application.Run(new FrmMain(szArgs)); + } } - } - if (str2 != "") - { - szLanguagePath = szFolder; - szLanguageFile = str2; - } - else if (str1 == "English") - { - int num1 = (int) MessageBox.Show("Can not load default language (English), use built-in language.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); - } - else - { - string str3 = "English"; - foreach (string szConfigPath in strArray) - { - if (new ConfigFile(szConfigPath).ReadConfig("$LANGUAGE_NAME").Trim() == str3) - { - str2 = szConfigPath; - break; - } - } - if (str2 != "") - { - szLanguagePath = szFolder; - szLanguageFile = str2; - } - else + + private static Process RunningInstance() { - int num2 = (int) MessageBox.Show("Can not load default language (English), use built-in language.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + Process currentProcess = Process.GetCurrentProcess(); + foreach (Process process in Process.GetProcessesByName(currentProcess.ProcessName)) + { + if (process.Id != currentProcess.Id && Assembly.GetExecutingAssembly().Location.Replace("/", "\\") == currentProcess.MainModule.FileName) + return process; + } + return null; } - } - if (szLanguagePath != "" && szLanguageFile != "") - GlobalMessages.LoadMessages(szLanguageFile); - if (!RegHelper.CheckConfigRegister()) - { - int num3 = (int) MessageBox.Show(GlobalMessages.DRIVER_NOT_CONFIG, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); - } - else - { - frmMain.SetLanguage(szLanguagePath, szLanguageFile); - Application.Run((Form) new frmMain(szArgs)); - } - } - - private static Process RunningInstance() - { - Process currentProcess = Process.GetCurrentProcess(); - foreach (Process process in Process.GetProcessesByName(currentProcess.ProcessName)) - { - if (process.Id != currentProcess.Id && Assembly.GetExecutingAssembly().Location.Replace("/", "\\") == currentProcess.MainModule.FileName) - return process; - } - return (Process) null; } - } } diff --git a/RegHelper.cs b/RegHelper.cs index faf8a2c..c63cef2 100644 --- a/RegHelper.cs +++ b/RegHelper.cs @@ -3,162 +3,161 @@ namespace ViPER4WindowsBin { - internal class RegHelper - { - private const string m_szAppRegisterPath = "SOFTWARE\\ViPER4Windows"; - private const string m_szKeyConfigPath = "ConfigPath"; - private const string m_szKeyConfigFile = "ConfigFile"; - - [DllImport("Utils.dll", CharSet = CharSet.Unicode)] - private static extern int QueryRegistryStringValue( - string pszBrunch, - string pszKey, - IntPtr pszValueBuffer, - int nBufferSize); + internal class RegHelper + { + [DllImport("Utils.dll", CharSet = CharSet.Unicode)] + private static extern int QueryRegistryStringValue( + string pszBrunch, + string pszKey, + IntPtr pszValueBuffer, + int nBufferSize); - [DllImport("Utils.dll", CharSet = CharSet.Unicode)] - private static extern int QueryRegistryDWORDValue( - string pszBrunch, - string pszKey, - IntPtr puiValue); + [DllImport("Utils.dll", CharSet = CharSet.Unicode)] + private static extern int QueryRegistryDWORDValue( + string pszBrunch, + string pszKey, + IntPtr puiValue); - [DllImport("Utils.dll", CharSet = CharSet.Unicode)] - private static extern int WriteRegistryDWORDValue( - string pszBrunch, - string pszKey, - uint uiValue); + [DllImport("Utils.dll", CharSet = CharSet.Unicode)] + private static extern int WriteRegistryDWORDValue( + string pszBrunch, + string pszKey, + uint uiValue); - public static bool CheckConfigRegister() - { - int nBufferSize = 260; - char[] destination1 = new char[nBufferSize * 2]; - char[] destination2 = new char[nBufferSize * 2]; - IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); - int num2 = RegHelper.QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigPath", num1, nBufferSize); - Marshal.Copy(num1, destination1, 0, nBufferSize * 2); - int num3 = RegHelper.QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigFile", num1, nBufferSize); - Marshal.Copy(num1, destination2, 0, nBufferSize * 2); - Marshal.FreeHGlobal(num1); - if (num2 == 0 || num3 == 0) - return false; - string str1 = new string(destination1); - string str2 = new string(destination2); - if (string.IsNullOrEmpty(str1) || string.IsNullOrEmpty(str2)) - return false; - char[] charArray1 = str1.ToCharArray(); - int length1 = -1; - for (int index = 0; index < charArray1.Length; ++index) - { - if (charArray1[index] == char.MinValue) + public static bool CheckConfigRegister() { - length1 = index; - break; + int nBufferSize = 260; + char[] destination1 = new char[nBufferSize * 2]; + char[] destination2 = new char[nBufferSize * 2]; + IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); + int num2 = QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigPath", num1, nBufferSize); + Marshal.Copy(num1, destination1, 0, nBufferSize * 2); + int num3 = QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigFile", num1, nBufferSize); + Marshal.Copy(num1, destination2, 0, nBufferSize * 2); + Marshal.FreeHGlobal(num1); + if (num2 == 0 || num3 == 0) + return false; + string str1 = new string(destination1); + string str2 = new string(destination2); + if (string.IsNullOrEmpty(str1) || string.IsNullOrEmpty(str2)) + return false; + char[] charArray1 = str1.ToCharArray(); + int length1 = -1; + for (int index = 0; index < charArray1.Length; ++index) + { + if (charArray1[index] == char.MinValue) + { + length1 = index; + break; + } + } + if (length1 == -1) + return false; + char[] destinationArray1 = new char[length1]; + Array.Copy(charArray1, destinationArray1, length1); + string str3 = new string(destinationArray1); + char[] charArray2 = str2.ToCharArray(); + int length2 = -1; + for (int index = 0; index < charArray2.Length; ++index) + { + if (charArray2[index] == char.MinValue) + { + length2 = index; + break; + } + } + if (length2 == -1) + return false; + char[] destinationArray2 = new char[length2]; + Array.Copy(charArray2, destinationArray2, length2); + string str4 = new string(destinationArray2); + return !string.IsNullOrEmpty(str3) && !string.IsNullOrEmpty(str4); } - } - if (length1 == -1) - return false; - char[] destinationArray1 = new char[length1]; - Array.Copy((Array) charArray1, (Array) destinationArray1, length1); - string str3 = new string(destinationArray1); - char[] charArray2 = str2.ToCharArray(); - int length2 = -1; - for (int index = 0; index < charArray2.Length; ++index) - { - if (charArray2[index] == char.MinValue) + + public static string GetConfigPath() { - length2 = index; - break; + int nBufferSize = 260; + char[] destination = new char[nBufferSize * 2]; + IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); + int num2 = QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigPath", num1, nBufferSize); + Marshal.Copy(num1, destination, 0, nBufferSize * 2); + Marshal.FreeHGlobal(num1); + if (num2 == 0) + return ""; + string str1 = new string(destination); + if (string.IsNullOrEmpty(str1)) + return ""; + char[] charArray = str1.ToCharArray(); + int length = -1; + for (int index = 0; index < charArray.Length; ++index) + { + if (charArray[index] == char.MinValue) + { + length = index; + break; + } + } + if (length == -1) + return ""; + char[] destinationArray = new char[length]; + Array.Copy(charArray, destinationArray, length); + string str2 = new string(destinationArray); + return string.IsNullOrEmpty(str2) ? "" : str2; } - } - if (length2 == -1) - return false; - char[] destinationArray2 = new char[length2]; - Array.Copy((Array) charArray2, (Array) destinationArray2, length2); - string str4 = new string(destinationArray2); - return !string.IsNullOrEmpty(str3) && !string.IsNullOrEmpty(str4); - } - public static string GetConfigPath() - { - int nBufferSize = 260; - char[] destination = new char[nBufferSize * 2]; - IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); - int num2 = RegHelper.QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigPath", num1, nBufferSize); - Marshal.Copy(num1, destination, 0, nBufferSize * 2); - Marshal.FreeHGlobal(num1); - if (num2 == 0) - return ""; - string str1 = new string(destination); - if (string.IsNullOrEmpty(str1)) - return ""; - char[] charArray = str1.ToCharArray(); - int length = -1; - for (int index = 0; index < charArray.Length; ++index) - { - if (charArray[index] == char.MinValue) + public static string GetConfigFile() { - length = index; - break; + int nBufferSize = 260; + char[] destination = new char[nBufferSize * 2]; + IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); + int num2 = QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigFile", num1, nBufferSize); + Marshal.Copy(num1, destination, 0, nBufferSize * 2); + Marshal.FreeHGlobal(num1); + if (num2 == 0) + return ""; + string str1 = new string(destination); + if (string.IsNullOrEmpty(str1)) + return ""; + char[] charArray = str1.ToCharArray(); + int length = -1; + for (int index = 0; index < charArray.Length; ++index) + { + if (charArray[index] == char.MinValue) + { + length = index; + break; + } + } + if (length == -1) + return ""; + char[] destinationArray = new char[length]; + Array.Copy(charArray, destinationArray, length); + string str2 = new string(destinationArray); + return string.IsNullOrEmpty(str2) ? "" : str2; } - } - if (length == -1) - return ""; - char[] destinationArray = new char[length]; - Array.Copy((Array) charArray, (Array) destinationArray, length); - string str2 = new string(destinationArray); - return string.IsNullOrEmpty(str2) ? "" : str2; - } - public static string GetConfigFile() - { - int nBufferSize = 260; - char[] destination = new char[nBufferSize * 2]; - IntPtr num1 = Marshal.AllocHGlobal(nBufferSize * 2); - int num2 = RegHelper.QueryRegistryStringValue("SOFTWARE\\ViPER4Windows", "ConfigFile", num1, nBufferSize); - Marshal.Copy(num1, destination, 0, nBufferSize * 2); - Marshal.FreeHGlobal(num1); - if (num2 == 0) - return ""; - string str1 = new string(destination); - if (string.IsNullOrEmpty(str1)) - return ""; - char[] charArray = str1.ToCharArray(); - int length = -1; - for (int index = 0; index < charArray.Length; ++index) - { - if (charArray[index] == char.MinValue) + public static string GetConfig() { - length = index; - break; + return GetConfigPath() + "\\" + GetConfigFile(); } - } - if (length == -1) - return ""; - char[] destinationArray = new char[length]; - Array.Copy((Array) charArray, (Array) destinationArray, length); - string str2 = new string(destinationArray); - return string.IsNullOrEmpty(str2) ? "" : str2; - } - public static string GetConfig() => RegHelper.GetConfigPath() + "\\" + RegHelper.GetConfigFile(); - - public static uint QueryDWORD(string szKeyName, uint uiDefault) - { - byte[] destination = new byte[Marshal.SizeOf(typeof (uint))]; - IntPtr num1 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (uint))); - int num2 = RegHelper.QueryRegistryDWORDValue("SOFTWARE\\ViPER4Windows", szKeyName, num1); - Marshal.Copy(num1, destination, 0, Marshal.SizeOf(typeof (uint))); - Marshal.FreeHGlobal(num1); - uint num3 = BitConverter.ToUInt32(destination, 0); - if (num2 == 0) - num3 = uiDefault; - return num3; - } + public static uint QueryDWORD(string szKeyName, uint uiDefault) + { + byte[] destination = new byte[Marshal.SizeOf(typeof(uint))]; + IntPtr num1 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint))); + int num2 = QueryRegistryDWORDValue("SOFTWARE\\ViPER4Windows", szKeyName, num1); + Marshal.Copy(num1, destination, 0, Marshal.SizeOf(typeof(uint))); + Marshal.FreeHGlobal(num1); + uint num3 = BitConverter.ToUInt32(destination, 0); + if (num2 == 0) + num3 = uiDefault; + return num3; + } - public static bool WriteDWORD(string szKeyName, uint uiValue) - { - uint uiValue1 = uiValue; - return RegHelper.WriteRegistryDWORDValue("SOFTWARE\\ViPER4Windows", szKeyName, uiValue1) != 0; + public static bool WriteDWORD(string szKeyName, uint uiValue) + { + uint uiValue1 = uiValue; + return WriteRegistryDWORDValue("SOFTWARE\\ViPER4Windows", szKeyName, uiValue1) != 0; + } } - } } diff --git a/TrayMenuPreset.cs b/TrayMenuPreset.cs index 9048552..183ff6b 100644 --- a/TrayMenuPreset.cs +++ b/TrayMenuPreset.cs @@ -3,84 +3,96 @@ namespace ViPER4WindowsBin { - public class TrayMenuPreset - { - private string m_szPresetName = ""; - private int m_nPresetMode; - private string m_szPresetFile = ""; - - public string PresetName + public class TrayMenuPreset { - get => this.m_szPresetName; - set => this.m_szPresetName = value; - } + private string m_szPresetName = ""; + private int m_nPresetMode; + private string m_szPresetFile = ""; - public int PresetMode - { - get => this.m_nPresetMode; - set => this.m_nPresetMode = value; - } + public string PresetName + { + get => m_szPresetName; + set => m_szPresetName = value; + } - public string PresetFile - { - get => this.m_szPresetFile; - set => this.m_szPresetFile = value; - } + public int PresetMode + { + get => m_nPresetMode; + set => m_nPresetMode = value; + } - public string PresetFileShort - { - get - { - if (string.IsNullOrEmpty(this.m_szPresetFile)) - return ""; - int num = this.m_szPresetFile.LastIndexOf("\\"); - return num <= 0 ? "" : this.m_szPresetFile.Substring(num + 1, this.m_szPresetFile.Length - num - 1); - } - } + public string PresetFile + { + get => m_szPresetFile; + set => m_szPresetFile = value; + } - public TrayMenuPreset(string szName, int nMode, string szFile) - { - this.m_szPresetName = szName; - this.m_nPresetMode = nMode; - this.m_szPresetFile = szFile; - } + public string PresetFileShort + { + get + { + if (string.IsNullOrEmpty(m_szPresetFile)) + return ""; + int num = m_szPresetFile.LastIndexOf("\\"); + return num <= 0 ? "" : m_szPresetFile.Substring(num + 1, m_szPresetFile.Length - num - 1); + } + } - public bool Valid() => this.m_nPresetMode == 0 || this.m_nPresetMode == 1 || this.m_nPresetMode == 2; + public TrayMenuPreset(string szName, int nMode, string szFile) + { + m_szPresetName = szName; + m_nPresetMode = nMode; + m_szPresetFile = szFile; + } - public bool PresetLoadable() => !string.IsNullOrEmpty(this.m_szPresetFile) && File.Exists(this.m_szPresetFile); + public bool Valid() + { + return m_nPresetMode == 0 || m_nPresetMode == 1 || m_nPresetMode == 2; + } - public TrayMenuPreset Clone() => new TrayMenuPreset(this.m_szPresetName, this.m_nPresetMode, this.m_szPresetFile); + public bool PresetLoadable() + { + return !string.IsNullOrEmpty(m_szPresetFile) && File.Exists(m_szPresetFile); + } - public override bool Equals(object obj) - { - if (obj == null || obj.GetType() != typeof (TrayMenuPreset)) - return false; - TrayMenuPreset trayMenuPreset = obj as TrayMenuPreset; - return trayMenuPreset.PresetName == this.m_szPresetName && trayMenuPreset.PresetMode == this.m_nPresetMode && trayMenuPreset.PresetFile == this.m_szPresetFile; - } + public TrayMenuPreset Clone() + { + return new TrayMenuPreset(m_szPresetName, m_nPresetMode, m_szPresetFile); + } - public override int GetHashCode() - { - if (!this.Valid()) - return 0; - int num = 0; - byte[] bytes1 = Encoding.Default.GetBytes(this.m_szPresetFile); - byte[] bytes2 = Encoding.Default.GetBytes(this.m_szPresetName); - if (bytes1 != null) - { - for (int index = 0; index < bytes1.Length; ++index) - num += (int) bytes1[index]; - num <<= this.m_nPresetMode; - } - if (bytes2 != null) - { - for (int index = 0; index < bytes2.Length; ++index) - num += (int) bytes2[index]; - num >>= this.m_nPresetMode; - } - return (num + this.m_nPresetMode) * (this.m_nPresetMode + 1); - } + public override bool Equals(object obj) + { + if (obj == null || obj.GetType() != typeof(TrayMenuPreset)) + return false; + TrayMenuPreset trayMenuPreset = obj as TrayMenuPreset; + return trayMenuPreset.PresetName == m_szPresetName && trayMenuPreset.PresetMode == m_nPresetMode && trayMenuPreset.PresetFile == m_szPresetFile; + } - public override string ToString() => this.m_szPresetName; - } + public override int GetHashCode() + { + if (!Valid()) + return 0; + int num = 0; + byte[] bytes1 = Encoding.Default.GetBytes(m_szPresetFile); + byte[] bytes2 = Encoding.Default.GetBytes(m_szPresetName); + if (bytes1 != null) + { + for (int index = 0; index < bytes1.Length; ++index) + num += bytes1[index]; + num <<= m_nPresetMode; + } + if (bytes2 != null) + { + for (int index = 0; index < bytes2.Length; ++index) + num += bytes2[index]; + num >>= m_nPresetMode; + } + return (num + m_nPresetMode) * (m_nPresetMode + 1); + } + + public override string ToString() + { + return m_szPresetName; + } + } } diff --git a/UIControls/ButtonBox.cs b/UIControls/ButtonBox.cs index 560756b..373c8e5 100644 --- a/UIControls/ButtonBox.cs +++ b/UIControls/ButtonBox.cs @@ -9,269 +9,278 @@ namespace ViPER4WindowsBin.UIControls { - public class ButtonBox : UserControl - { - private IContainer components; - private Dictionary m_dictItems = new Dictionary(); - private Mutex m_dictMutex = new Mutex(); - private int m_nCurrentSelected = -1; - - protected override void Dispose(bool disposing) + public class ButtonBox : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private readonly Dictionary m_dictItems = new Dictionary(); + private readonly Mutex m_dictMutex = new Mutex(); + private int m_nCurrentSelected = -1; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = nameof (ButtonBox); - this.Size = new Size(131, 45); - this.MouseUp += new MouseEventHandler(this.ButtonBox_MouseUp); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private event ButtonBox.ItemSelectDelegate ItemSelected; + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = nameof(ButtonBox); + Size = new Size(131, 45); + MouseUp += new MouseEventHandler(ButtonBox_MouseUp); + ResumeLayout(false); + } - public event ButtonBox.ItemSelectDelegate ItemSelectedNotify - { - add => this.ItemSelected += value; - remove => this.ItemSelected -= value; - } + private event ItemSelectDelegate ItemSelected; - public ButtonBox() - { - this.InitializeComponent(); - this.m_nCurrentSelected = -1; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.FromKnownColor(KnownColor.Control); - } + public event ItemSelectDelegate ItemSelectedNotify + { + add => ItemSelected += value; + remove => ItemSelected -= value; + } - public void AddItem(ButtonBox.Item itButtonBoxItem) - { - if (itButtonBoxItem == null) - return; - this.m_dictMutex.WaitOne(); - this.m_dictItems.Add(this.m_dictItems.Count, itButtonBoxItem.Clone()); - this.m_dictMutex.ReleaseMutex(); - this.Invalidate(); - } + public ButtonBox() + { + InitializeComponent(); + m_nCurrentSelected = -1; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.FromKnownColor(KnownColor.Control); + } - public void AddItem(List lstItem) - { - if (lstItem == null) - return; - this.m_dictMutex.WaitOne(); - foreach (ButtonBox.Item obj in lstItem) - { - if (obj != null) - this.m_dictItems.Add(this.m_dictItems.Count, obj.Clone()); - } - this.m_dictMutex.ReleaseMutex(); - this.Invalidate(); - } + public void AddItem(Item itButtonBoxItem) + { + if (itButtonBoxItem == null) + return; + m_dictMutex.WaitOne(); + m_dictItems.Add(m_dictItems.Count, itButtonBoxItem.Clone()); + m_dictMutex.ReleaseMutex(); + Invalidate(); + } - public void AddItem(ButtonBox.Item[] aryItem) - { - if (aryItem == null) - return; - this.m_dictMutex.WaitOne(); - foreach (ButtonBox.Item obj in aryItem) - { - if (obj != null) - this.m_dictItems.Add(this.m_dictItems.Count, obj.Clone()); - } - this.m_dictMutex.ReleaseMutex(); - this.Invalidate(); - } + public void AddItem(List lstItem) + { + if (lstItem == null) + return; + m_dictMutex.WaitOne(); + foreach (Item obj in lstItem) + { + if (obj != null) + m_dictItems.Add(m_dictItems.Count, obj.Clone()); + } + m_dictMutex.ReleaseMutex(); + Invalidate(); + } - public void ClearItem() - { - ButtonBox.Item itPrevItem = (ButtonBox.Item) null; - this.m_dictMutex.WaitOne(); - if (this.m_dictItems.ContainsKey(this.m_nCurrentSelected)) - itPrevItem = this.m_dictItems[this.m_nCurrentSelected].Clone(); - this.m_dictItems.Clear(); - this.m_dictMutex.ReleaseMutex(); - this.m_nCurrentSelected = -1; - this.Invalidate(); - if (this.ItemSelected == null) - return; - this.ItemSelected(itPrevItem, (ButtonBox.Item) null, this); - } + public void AddItem(Item[] aryItem) + { + if (aryItem == null) + return; + m_dictMutex.WaitOne(); + foreach (Item obj in aryItem) + { + if (obj != null) + m_dictItems.Add(m_dictItems.Count, obj.Clone()); + } + m_dictMutex.ReleaseMutex(); + Invalidate(); + } - public ButtonBox.Item GetItem(int nIndex) - { - ButtonBox.Item obj = (ButtonBox.Item) null; - this.m_dictMutex.WaitOne(); - if (this.m_dictItems.ContainsKey(nIndex)) - obj = this.m_dictItems[nIndex].Clone(); - this.m_dictMutex.ReleaseMutex(); - return obj; - } + public void ClearItem() + { + Item itPrevItem = null; + m_dictMutex.WaitOne(); + if (m_dictItems.ContainsKey(m_nCurrentSelected)) + itPrevItem = m_dictItems[m_nCurrentSelected].Clone(); + m_dictItems.Clear(); + m_dictMutex.ReleaseMutex(); + m_nCurrentSelected = -1; + Invalidate(); + if (ItemSelected == null) + return; + ItemSelected(itPrevItem, null, this); + } - public void SelectItem(int nIndex) - { - ButtonBox.Item itPrevItem = (ButtonBox.Item) null; - ButtonBox.Item itCurrItem = (ButtonBox.Item) null; - this.m_dictMutex.WaitOne(); - if (this.m_dictItems.ContainsKey(this.m_nCurrentSelected)) - itPrevItem = this.m_dictItems[this.m_nCurrentSelected].Clone(); - if (this.m_dictItems.ContainsKey(nIndex)) - { - itCurrItem = this.m_dictItems[nIndex].Clone(); - this.m_nCurrentSelected = nIndex; - } - else - this.m_nCurrentSelected = -1; - this.m_dictMutex.ReleaseMutex(); - this.Invalidate(); - if (this.ItemSelected == null) - return; - this.ItemSelected(itPrevItem, itCurrItem, this); - } + public Item GetItem(int nIndex) + { + Item obj = null; + m_dictMutex.WaitOne(); + if (m_dictItems.ContainsKey(nIndex)) + obj = m_dictItems[nIndex].Clone(); + m_dictMutex.ReleaseMutex(); + return obj; + } + + public void SelectItem(int nIndex) + { + Item itPrevItem = null; + Item itCurrItem = null; + m_dictMutex.WaitOne(); + if (m_dictItems.ContainsKey(m_nCurrentSelected)) + itPrevItem = m_dictItems[m_nCurrentSelected].Clone(); + if (m_dictItems.ContainsKey(nIndex)) + { + itCurrItem = m_dictItems[nIndex].Clone(); + m_nCurrentSelected = nIndex; + } + else + m_nCurrentSelected = -1; + m_dictMutex.ReleaseMutex(); + Invalidate(); + if (ItemSelected == null) + return; + ItemSelected(itPrevItem, itCurrItem, this); + } - public void UpdateControl() => this.Invalidate(); + public void UpdateControl() + { + Invalidate(); + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - graphics.Clear(this.BackColor); - if (this.m_dictItems.Count <= 0) - { - graphics.DrawRectangle(new Pen(Color.Gray, 4f), this.ClientRectangle); - } - else - { - this.m_dictMutex.WaitOne(); - int height = this.Height / this.m_dictItems.Count; - for (int key = 0; key < this.m_dictItems.Count; ++key) + protected override void OnPaint(PaintEventArgs e) { - if (this.m_nCurrentSelected != key) - { - graphics.DrawRectangle(new Pen(Color.Gray, 2f), 0.0f, (float) (height * key) + 1f, (float) this.Width, (float) height); - Font font = this.Font; - graphics.DrawString(this.m_dictItems[key].Title, font, Brushes.Black, new RectangleF() + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + graphics.Clear(BackColor); + if (m_dictItems.Count <= 0) { - X = 20f, - Y = (float) (height * key) + 5f, - Width = (float) this.Width - 25f, - Height = (float) height - 4f - }, new StringFormat() + graphics.DrawRectangle(new Pen(Color.Gray, 4f), ClientRectangle); + } + else { - Alignment = StringAlignment.Near, - LineAlignment = StringAlignment.Center, - Trimming = StringTrimming.EllipsisCharacter, - FormatFlags = StringFormatFlags.NoWrap - }); - } + m_dictMutex.WaitOne(); + int height = Height / m_dictItems.Count; + for (int key = 0; key < m_dictItems.Count; ++key) + { + if (m_nCurrentSelected != key) + { + graphics.DrawRectangle(new Pen(Color.Gray, 2f), 0.0f, height * key + 1f, Width, height); + Font font = Font; + graphics.DrawString(m_dictItems[key].Title, font, Brushes.Black, new RectangleF() + { + X = 20f, + Y = height * key + 5f, + Width = Width - 25f, + Height = height - 4f + }, new StringFormat() + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Center, + Trimming = StringTrimming.EllipsisCharacter, + FormatFlags = StringFormatFlags.NoWrap + }); + } + } + if (m_dictItems.ContainsKey(m_nCurrentSelected)) + { + int nCurrentSelected = m_nCurrentSelected; + graphics.DrawRectangle(new Pen(Color.SteelBlue, 2f), 0.0f, height * nCurrentSelected + 1f, Width, height); + PointF pt1_1 = new PointF(6f, (float)(height * nCurrentSelected + height / 2.0 - 6.0)); + PointF pt1_2 = new PointF(6f, (float)(height * nCurrentSelected + height / 2.0 + 6.0)); + PointF pt2 = new PointF(15f, height * nCurrentSelected + height / 2f); + graphics.DrawLine(new Pen(Color.Black, 2f), pt1_1, pt2); + graphics.DrawLine(new Pen(Color.Black, 2f), pt1_2, pt2); + Font font = Font; + graphics.DrawString(m_dictItems[nCurrentSelected].Title, font, Brushes.Black, new RectangleF() + { + X = 20f, + Y = height * nCurrentSelected + 5f, + Width = Width - 25f, + Height = height - 4f + }, new StringFormat() + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Center, + Trimming = StringTrimming.EllipsisCharacter, + FormatFlags = StringFormatFlags.NoWrap + }); + } + m_dictMutex.ReleaseMutex(); + } } - if (this.m_dictItems.ContainsKey(this.m_nCurrentSelected)) + + private void ButtonBox_MouseUp(object sender, MouseEventArgs e) { - int nCurrentSelected = this.m_nCurrentSelected; - graphics.DrawRectangle(new Pen(Color.SteelBlue, 2f), 0.0f, (float) (height * nCurrentSelected) + 1f, (float) this.Width, (float) height); - PointF pt1_1 = new PointF(6f, (float) ((double) (height * nCurrentSelected) + (double) height / 2.0 - 6.0)); - PointF pt1_2 = new PointF(6f, (float) ((double) (height * nCurrentSelected) + (double) height / 2.0 + 6.0)); - PointF pt2 = new PointF(15f, (float) (height * nCurrentSelected) + (float) height / 2f); - graphics.DrawLine(new Pen(Color.Black, 2f), pt1_1, pt2); - graphics.DrawLine(new Pen(Color.Black, 2f), pt1_2, pt2); - Font font = this.Font; - graphics.DrawString(this.m_dictItems[nCurrentSelected].Title, font, Brushes.Black, new RectangleF() - { - X = 20f, - Y = (float) (height * nCurrentSelected) + 5f, - Width = (float) this.Width - 25f, - Height = (float) height - 4f - }, new StringFormat() - { - Alignment = StringAlignment.Near, - LineAlignment = StringAlignment.Center, - Trimming = StringTrimming.EllipsisCharacter, - FormatFlags = StringFormatFlags.NoWrap - }); + if (m_dictItems.Count <= 0) + return; + Item itPrevItem = null; + m_dictMutex.WaitOne(); + float num = Height / (float)m_dictItems.Count; + if (m_dictItems.ContainsKey(m_nCurrentSelected)) + itPrevItem = m_dictItems[m_nCurrentSelected].Clone(); + m_dictMutex.ReleaseMutex(); + int key = (int)Math.Truncate(e.Y / (double)num); + if (key < 0 || key >= m_dictItems.Count) + return; + m_dictMutex.WaitOne(); + if (m_dictItems.ContainsKey(key)) + { + Item itCurrItem = m_dictItems[key].Clone(); + m_nCurrentSelected = key; + Invalidate(); + m_dictMutex.ReleaseMutex(); + if (ItemSelected == null) + return; + ItemSelected(itPrevItem, itCurrItem, this); + } + else + m_dictMutex.ReleaseMutex(); } - this.m_dictMutex.ReleaseMutex(); - } - } - private void ButtonBox_MouseUp(object sender, MouseEventArgs e) - { - if (this.m_dictItems.Count <= 0) - return; - ButtonBox.Item itPrevItem = (ButtonBox.Item) null; - this.m_dictMutex.WaitOne(); - float num = (float) this.Height / (float) this.m_dictItems.Count; - if (this.m_dictItems.ContainsKey(this.m_nCurrentSelected)) - itPrevItem = this.m_dictItems[this.m_nCurrentSelected].Clone(); - this.m_dictMutex.ReleaseMutex(); - int key = (int) Math.Truncate((double) e.Y / (double) num); - if (key < 0 || key >= this.m_dictItems.Count) - return; - this.m_dictMutex.WaitOne(); - if (this.m_dictItems.ContainsKey(key)) - { - ButtonBox.Item itCurrItem = this.m_dictItems[key].Clone(); - this.m_nCurrentSelected = key; - this.Invalidate(); - this.m_dictMutex.ReleaseMutex(); - if (this.ItemSelected == null) - return; - this.ItemSelected(itPrevItem, itCurrItem, this); - } - else - this.m_dictMutex.ReleaseMutex(); - } + public class Item + { + private object m_objUserData; + private string m_szTitle = ""; - public class Item - { - private object m_objUserData; - private string m_szTitle = ""; + public object Tag + { + get => m_objUserData; + set => m_objUserData = value; + } - public object Tag - { - get => this.m_objUserData; - set => this.m_objUserData = value; - } + public string Title + { + get => m_szTitle; + set => m_szTitle = value; + } - public string Title - { - get => this.m_szTitle; - set => this.m_szTitle = value; - } + public Item() + { + } - public Item() - { - } + public Item(string szText) => m_szTitle = szText; - public Item(string szText) => this.m_szTitle = szText; + public Item(string szText, object objTag) + { + m_szTitle = szText; + m_objUserData = objTag; + } - public Item(string szText, object objTag) - { - this.m_szTitle = szText; - this.m_objUserData = objTag; - } + public bool IsEqual(Item itItem) + { + return itItem.Tag == m_objUserData && itItem.Title == m_szTitle; + } - public bool IsEqual(ButtonBox.Item itItem) => itItem.Tag == this.m_objUserData && itItem.Title == this.m_szTitle; + public Item Clone() + { + return new Item(m_szTitle, m_objUserData); + } + } - public ButtonBox.Item Clone() => new ButtonBox.Item(this.m_szTitle, this.m_objUserData); + public delegate void ItemSelectDelegate( + Item itPrevItem, + Item itCurrItem, + ButtonBox objSender); } - - public delegate void ItemSelectDelegate( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender); - } } diff --git a/UIControls/EQShape.cs b/UIControls/EQShape.cs index 2a0d4ed..ae42a66 100644 --- a/UIControls/EQShape.cs +++ b/UIControls/EQShape.cs @@ -7,126 +7,126 @@ namespace ViPER4WindowsBin.UIControls { - public class EQShape : UserControl - { - private IContainer components; - private Color m_clBackColor = Color.White; - private Color m_clForeColor = Color.Black; - private float[] m_fEQBands = new float[18]; - private float[] m_fEQResponse = new float[256]; - - protected override void Dispose(bool disposing) + public class EQShape : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private Color m_clBackColor = Color.White; + private Color m_clForeColor = Color.Black; + private readonly float[] m_fEQBands = new float[18]; + private readonly float[] m_fEQResponse = new float[256]; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = "EQShapre"; - this.Size = new Size(274, 129); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public EQShape() - { - this.InitializeComponent(); - for (int index = 0; index < this.m_fEQBands.Length; ++index) - this.m_fEQBands[index] = 1f; - this.ZeroArray(); - float[] fArray = RuntimeUtils.EqualizerUtils.EstimateEqualizerResponse(this.m_fEQBands); - if (fArray != null) - this.ScaleArray(fArray); - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - } + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = "EQShapre"; + Size = new Size(274, 129); + ResumeLayout(false); + } - public Color ShapeBackColor - { - get => this.m_clBackColor; - set - { - this.m_clBackColor = value; - this.Invalidate(); - } - } + public EQShape() + { + InitializeComponent(); + for (int index = 0; index < m_fEQBands.Length; ++index) + m_fEQBands[index] = 1f; + ZeroArray(); + float[] fArray = RuntimeUtils.EqualizerUtils.EstimateEqualizerResponse(m_fEQBands); + if (fArray != null) + ScaleArray(fArray); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + } - public Color ShapeForeColor - { - get => this.m_clForeColor; - set - { - this.m_clForeColor = value; - this.Invalidate(); - } - } + public Color ShapeBackColor + { + get => m_clBackColor; + set + { + m_clBackColor = value; + Invalidate(); + } + } - public void SetEqualizerBands(float[] rEQBands) - { - if (rEQBands == null || rEQBands.Length != 18) - return; - Array.Copy((Array) rEQBands, (Array) this.m_fEQBands, this.m_fEQBands.Length); - this.ZeroArray(); - float[] fArray = RuntimeUtils.EqualizerUtils.EstimateEqualizerResponse(this.m_fEQBands); - if (fArray != null) - this.ScaleArray(fArray); - this.Invalidate(); - } + public Color ShapeForeColor + { + get => m_clForeColor; + set + { + m_clForeColor = value; + Invalidate(); + } + } - private void ZeroArray() - { - for (int index = 0; index < this.m_fEQResponse.Length; ++index) - this.m_fEQResponse[index] = 0.0f; - } + public void SetEqualizerBands(float[] rEQBands) + { + if (rEQBands == null || rEQBands.Length != 18) + return; + Array.Copy(rEQBands, m_fEQBands, m_fEQBands.Length); + ZeroArray(); + float[] fArray = RuntimeUtils.EqualizerUtils.EstimateEqualizerResponse(m_fEQBands); + if (fArray != null) + ScaleArray(fArray); + Invalidate(); + } - private void ScaleArray(float[] fArray) - { - int num = fArray.Length / (this.m_fEQResponse.Length + 1); - int index1 = 0; - for (int index2 = 0; index1 < fArray.Length && index2 < this.m_fEQResponse.Length; ++index2) - { - this.m_fEQResponse[index2] = fArray[index1]; - index1 += num; - } - } + private void ZeroArray() + { + for (int index = 0; index < m_fEQResponse.Length; ++index) + m_fEQResponse[index] = 0.0f; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(this.m_clBackColor); - graphics.DrawRectangle(new Pen(Color.Gray, 1f), this.ClientRectangle); - double num1 = ((double) this.Width - 2.0) / (double) (this.m_fEQResponse.Length + 1); - float num2 = (float) ((double) this.m_fEQResponse[0] * (double) (this.Height - 2) + 1.0); - if ((double) num2 < 2.0) - num2 = 2f; - if ((double) num2 > (double) this.Height - 2.0) - num2 = (float) this.Height - 2f; - PointF pt1 = new PointF(2f, (float) this.Height - num2); - for (int index = 1; index < this.m_fEQResponse.Length; ++index) - { - float x = (float) index * (float) num1 + 2f; - if ((double) x > (double) this.Width - 1.0) - break; - float num3 = (float) ((double) this.m_fEQResponse[index] * (double) (this.Height - 2) + 1.0); - if ((double) num3 < 2.0) - num3 = 2f; - if ((double) num3 > (double) this.Height - 2.0) - num3 = (float) this.Height - 2f; - float y = (float) this.Height - num3; - graphics.DrawLine(new Pen(this.m_clForeColor, 1f), pt1, new PointF(x, y)); - pt1.X = x; - pt1.Y = y; - } + private void ScaleArray(float[] fArray) + { + int num = fArray.Length / (m_fEQResponse.Length + 1); + int index1 = 0; + for (int index2 = 0; index1 < fArray.Length && index2 < m_fEQResponse.Length; ++index2) + { + m_fEQResponse[index2] = fArray[index1]; + index1 += num; + } + } + + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(m_clBackColor); + graphics.DrawRectangle(new Pen(Color.Gray, 1f), ClientRectangle); + double num1 = (Width - 2.0) / (m_fEQResponse.Length + 1); + float num2 = (float)(m_fEQResponse[0] * (double)(Height - 2) + 1.0); + if ((double)num2 < 2.0) + num2 = 2f; + if ((double)num2 > Height - 2.0) + num2 = Height - 2f; + PointF pt1 = new PointF(2f, Height - num2); + for (int index = 1; index < m_fEQResponse.Length; ++index) + { + float x = index * (float)num1 + 2f; + if ((double)x > Width - 1.0) + break; + float num3 = (float)(m_fEQResponse[index] * (double)(Height - 2) + 1.0); + if ((double)num3 < 2.0) + num3 = 2f; + if ((double)num3 > Height - 2.0) + num3 = Height - 2f; + float y = Height - num3; + graphics.DrawLine(new Pen(m_clForeColor, 1f), pt1, new PointF(x, y)); + pt1.X = x; + pt1.Y = y; + } + } } - } } diff --git a/UIControls/HSlider.cs b/UIControls/HSlider.cs index 903c755..b4a43bf 100644 --- a/UIControls/HSlider.cs +++ b/UIControls/HSlider.cs @@ -6,149 +6,144 @@ namespace ViPER4WindowsBin.UIControls { - public class HSlider : UserControl - { - private const uint m_nRangeMin = 0; - private const uint m_nRangeMax = 100; - private bool m_bMouseDown; - private uint m_nPosition; - private uint m_nMoveDelta = 1; - private IContainer components; + public class HSlider : UserControl + { + private const uint m_nRangeMin = 0; + private const uint m_nRangeMax = 100; + private bool m_bMouseDown; + private uint m_nPosition; + private uint m_nMoveDelta = 1; + private readonly IContainer components; - private event HSlider.PositionChangeEventDelegate PositionChanged; + private event PositionChangeEventDelegate PositionChanged; - public event HSlider.PositionChangeEventDelegate PositionChangeNotify - { - add => this.PositionChanged += value; - remove => this.PositionChanged -= value; - } + public event PositionChangeEventDelegate PositionChangeNotify + { + add => PositionChanged += value; + remove => PositionChanged -= value; + } - public HSlider() - { - this.InitializeComponent(); - this.m_nPosition = 0U; - this.m_nMoveDelta = 1U; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.FromKnownColor(KnownColor.Control); - } + public HSlider() + { + InitializeComponent(); + m_nPosition = 0U; + m_nMoveDelta = 1U; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.FromKnownColor(KnownColor.Control); + } - public uint Position - { - get => this.m_nPosition; - set - { - if (value < 0U) - value = 0U; - if (value > 100U) - value = 100U; - this.m_nPosition = value; - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } - } + public uint Position + { + get => m_nPosition; + set + { + if (value < 0U) + value = 0U; + if (value > 100U) + value = 100U; + m_nPosition = value; + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } + } - public float PositionFloat - { - get => (float) this.m_nPosition / 100f; - set - { - uint num = (uint) ((double) value * 100.0); - if (num < 0U) - num = 0U; - if (num > 100U) - num = 100U; - this.m_nPosition = num; - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } - } + public float PositionFloat + { + get => m_nPosition / 100f; + set + { + uint num = (uint)((double)value * 100.0); + if (num < 0U) + num = 0U; + if (num > 100U) + num = 100U; + m_nPosition = num; + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } + } - public uint MoveDelta - { - get => this.m_nMoveDelta; - set => this.m_nMoveDelta = value; - } + public uint MoveDelta + { + get => m_nMoveDelta; + set => m_nMoveDelta = value; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(this.BackColor); - graphics.DrawLine(new Pen(Color.Gray, 2f), (float) this.Height / 2f, (float) this.Height / 2f, (float) this.Width - (float) this.Height / 2f, (float) this.Height / 2f); - float num = (float) this.m_nPosition / 100f * (float) (this.Width - this.Height) + (float) this.Height / 2f; - graphics.FillEllipse(Brushes.SteelBlue, num - (float) this.Height / 4f, (float) this.Height / 4f, (float) this.Height / 2f, (float) this.Height / 2f); - } + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(BackColor); + graphics.DrawLine(new Pen(Color.Gray, 2f), Height / 2f, Height / 2f, Width - Height / 2f, Height / 2f); + float num = m_nPosition / 100f * (Width - Height) + Height / 2f; + graphics.FillEllipse(Brushes.SteelBlue, num - Height / 4f, Height / 4f, Height / 2f, Height / 2f); + } - private void HSlider_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - this.m_bMouseDown = true; - float num = (float) e.X; - if ((double) num < (double) this.Height / 2.0) - num = (float) this.Height / 2f; - if ((double) num > (double) this.Width - (double) this.Height / 2.0) - num = (float) this.Width - (float) this.Height / 2f; - this.m_nPosition = (uint) Math.Round((double) ((num - (float) this.Height / 2f) / (float) (this.Width - this.Height)) * 100.0); - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } + private void HSlider_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + m_bMouseDown = true; + float num = e.X; + if ((double)num < Height / 2.0) + num = Height / 2f; + if ((double)num > Width - Height / 2.0) + num = Width - Height / 2f; + m_nPosition = (uint)Math.Round((double)((num - Height / 2f) / (Width - Height)) * 100.0); + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } - private void HSlider_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.m_bMouseDown = false; - } + private void HSlider_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + PositionChanged?.Invoke(Position / 100f, this); + m_bMouseDown = false; + } - private void HSlider_MouseMove(object sender, MouseEventArgs e) - { - if (!this.m_bMouseDown) - return; - float num = (float) e.X; - if ((double) num < (double) this.Height / 2.0) - num = (float) this.Height / 2f; - if ((double) num > (double) this.Width - (double) this.Height / 2.0) - num = (float) this.Width - (float) this.Height / 2f; - this.m_nPosition = (uint) Math.Round((double) ((num - (float) this.Height / 2f) / (float) (this.Width - this.Height)) * 100.0); - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } + private void HSlider_MouseMove(object sender, MouseEventArgs e) + { + if (!m_bMouseDown) + return; + float num = e.X; + if ((double)num < Height / 2.0) + num = Height / 2f; + if ((double)num > Width - Height / 2.0) + num = Width - Height / 2f; + m_nPosition = (uint)Math.Round((double)((num - Height / 2f) / (Width - Height)) * 100.0); + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = nameof (HSlider); - this.Size = new Size(204, 47); - this.MouseDown += new MouseEventHandler(this.HSlider_MouseDown); - this.MouseMove += new MouseEventHandler(this.HSlider_MouseMove); - this.MouseUp += new MouseEventHandler(this.HSlider_MouseUp); - this.ResumeLayout(false); - } + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = nameof(HSlider); + Size = new Size(204, 47); + MouseDown += new MouseEventHandler(HSlider_MouseDown); + MouseMove += new MouseEventHandler(HSlider_MouseMove); + MouseUp += new MouseEventHandler(HSlider_MouseUp); + ResumeLayout(false); + } - public delegate void PositionChangeEventDelegate(float fPercent, HSlider objSender); - } + public delegate void PositionChangeEventDelegate(float fPercent, HSlider objSender); + } } diff --git a/UIControls/IRShape.cs b/UIControls/IRShape.cs index 17f6ba3..447db44 100644 --- a/UIControls/IRShape.cs +++ b/UIControls/IRShape.cs @@ -6,145 +6,145 @@ namespace ViPER4WindowsBin.UIControls { - public class IRShape : UserControl - { - private IContainer components; - private Color m_clBackColor = Color.White; - private Color m_clForeColor = Color.Black; - private float[] m_fIRSamples = new float[256]; - - protected override void Dispose(bool disposing) + public class IRShape : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private Color m_clBackColor = Color.White; + private Color m_clForeColor = Color.Black; + private readonly float[] m_fIRSamples = new float[256]; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = nameof (IRShape); - this.Size = new Size(190, 63); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public IRShape() - { - this.InitializeComponent(); - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - } + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = nameof(IRShape); + Size = new Size(190, 63); + ResumeLayout(false); + } - public Color ShapeBackColor - { - get => this.m_clBackColor; - set - { - this.m_clBackColor = value; - this.Invalidate(); - } - } + public IRShape() + { + InitializeComponent(); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + } - public Color ShapeForeColor - { - get => this.m_clForeColor; - set - { - this.m_clForeColor = value; - this.Invalidate(); - } - } + public Color ShapeBackColor + { + get => m_clBackColor; + set + { + m_clBackColor = value; + Invalidate(); + } + } - public void SetImpulseResponse(float[] fIRSamples, int nChannels) - { - this.ZeroArray(); - if (fIRSamples == null || nChannels <= 0) - { - this.Invalidate(); - } - else - { - int length = fIRSamples.Length / nChannels; - if (length <= 0) + public Color ShapeForeColor { - this.Invalidate(); + get => m_clForeColor; + set + { + m_clForeColor = value; + Invalidate(); + } } - else + + public void SetImpulseResponse(float[] fIRSamples, int nChannels) { - float[] fArray = new float[length]; - int num1 = 0; - int index1 = 0; - while (num1 < length * nChannels) - { - double num2 = 0.0; - for (int index2 = 0; index2 < nChannels; ++index2) - num2 += (double) fIRSamples[num1 + index2]; - double num3 = num2 / (double) nChannels; - fArray[index1] = (float) num3; - num1 += nChannels; - ++index1; - } - this.ScaleArray(fArray); - this.Invalidate(); + ZeroArray(); + if (fIRSamples == null || nChannels <= 0) + { + Invalidate(); + } + else + { + int length = fIRSamples.Length / nChannels; + if (length <= 0) + { + Invalidate(); + } + else + { + float[] fArray = new float[length]; + int num1 = 0; + int index1 = 0; + while (num1 < length * nChannels) + { + double num2 = 0.0; + for (int index2 = 0; index2 < nChannels; ++index2) + num2 += fIRSamples[num1 + index2]; + double num3 = num2 / nChannels; + fArray[index1] = (float)num3; + num1 += nChannels; + ++index1; + } + ScaleArray(fArray); + Invalidate(); + } + } } - } - } - private void ZeroArray() - { - for (int index = 0; index < this.m_fIRSamples.Length; ++index) - this.m_fIRSamples[index] = 0.0f; - } + private void ZeroArray() + { + for (int index = 0; index < m_fIRSamples.Length; ++index) + m_fIRSamples[index] = 0.0f; + } - private void ScaleArray(float[] fArray) - { - int num1 = fArray.Length / (this.m_fIRSamples.Length + 1); - float num2 = 0.0f; - int index1 = 0; - for (int index2 = 0; index1 < fArray.Length && index2 < this.m_fIRSamples.Length; ++index2) - { - this.m_fIRSamples[index2] = fArray[index1]; - if ((double) Math.Abs(this.m_fIRSamples[index2]) > (double) num2) - num2 = Math.Abs(this.m_fIRSamples[index2]); - index1 += num1; - } - if ((double) num2 <= 9.9999999747524271E-07) - return; - float num3 = (float) (1.0 / ((double) num2 + 9.9999999747524271E-07)); - for (int index3 = 0; index3 < this.m_fIRSamples.Length; ++index3) - this.m_fIRSamples[index3] *= num3; - } + private void ScaleArray(float[] fArray) + { + int num1 = fArray.Length / (m_fIRSamples.Length + 1); + float num2 = 0.0f; + int index1 = 0; + for (int index2 = 0; index1 < fArray.Length && index2 < m_fIRSamples.Length; ++index2) + { + m_fIRSamples[index2] = fArray[index1]; + if ((double)Math.Abs(m_fIRSamples[index2]) > (double)num2) + num2 = Math.Abs(m_fIRSamples[index2]); + index1 += num1; + } + if ((double)num2 <= 9.9999999747524271E-07) + return; + float num3 = (float)(1.0 / ((double)num2 + 9.9999999747524271E-07)); + for (int index3 = 0; index3 < m_fIRSamples.Length; ++index3) + m_fIRSamples[index3] *= num3; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(this.m_clBackColor); - graphics.DrawRectangle(new Pen(Color.Gray, 1f), this.ClientRectangle); - double num1 = ((double) this.Width - 2.0) / (double) (this.m_fIRSamples.Length + 1); - PointF pt1 = new PointF(2f, (float) this.Height / 2f); - for (int index = 0; index < this.m_fIRSamples.Length; ++index) - { - float x = (float) index * (float) num1 + 2f; - if ((double) x > (double) this.Width - 1.0) - break; - float num2 = (float) this.Height / 2f + this.m_fIRSamples[index] * ((float) (this.Height - 2) / 2f); - if ((double) num2 < 2.0) - num2 = 2f; - if ((double) num2 > (double) this.Height - 2.0) - num2 = (float) this.Height - 2f; - float y = (float) this.Height - num2; - graphics.DrawLine(new Pen(this.m_clForeColor, 1f), pt1, new PointF(x, y)); - pt1.X = x; - pt1.Y = y; - } + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(m_clBackColor); + graphics.DrawRectangle(new Pen(Color.Gray, 1f), ClientRectangle); + double num1 = (Width - 2.0) / (m_fIRSamples.Length + 1); + PointF pt1 = new PointF(2f, Height / 2f); + for (int index = 0; index < m_fIRSamples.Length; ++index) + { + float x = index * (float)num1 + 2f; + if ((double)x > Width - 1.0) + break; + float num2 = Height / 2f + m_fIRSamples[index] * ((Height - 2) / 2f); + if ((double)num2 < 2.0) + num2 = 2f; + if ((double)num2 > Height - 2.0) + num2 = Height - 2f; + float y = Height - num2; + graphics.DrawLine(new Pen(m_clForeColor, 1f), pt1, new PointF(x, y)); + pt1.X = x; + pt1.Y = y; + } + } } - } } diff --git a/UIControls/OnOffSwitch.cs b/UIControls/OnOffSwitch.cs index e9b4005..e6f146e 100644 --- a/UIControls/OnOffSwitch.cs +++ b/UIControls/OnOffSwitch.cs @@ -5,99 +5,96 @@ namespace ViPER4WindowsBin.UIControls { - public class OnOffSwitch : UserControl - { - private IContainer components; - private bool m_bSwitchStatus; - - protected override void Dispose(bool disposing) + public class OnOffSwitch : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private bool m_bSwitchStatus; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.BackColor = Color.Transparent; - this.DoubleBuffered = true; - this.Name = nameof (OnOffSwitch); - this.Size = new Size(107, 28); - this.KeyUp += new KeyEventHandler(this.OnOffSwitch_KeyUp); - this.MouseUp += new MouseEventHandler(this.OnOffSwitch_MouseUp); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private event OnOffSwitch.SwitchChangeEventDelegate SwitchChanged; + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + BackColor = Color.Transparent; + DoubleBuffered = true; + Name = nameof(OnOffSwitch); + Size = new Size(107, 28); + KeyUp += new KeyEventHandler(OnOffSwitch_KeyUp); + MouseUp += new MouseEventHandler(OnOffSwitch_MouseUp); + ResumeLayout(false); + } - public event OnOffSwitch.SwitchChangeEventDelegate SwitchChangeNotify - { - add => this.SwitchChanged += value; - remove => this.SwitchChanged -= value; - } + private event SwitchChangeEventDelegate SwitchChanged; - public OnOffSwitch() - { - this.InitializeComponent(); - this.m_bSwitchStatus = false; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.Transparent; - } + public event SwitchChangeEventDelegate SwitchChangeNotify + { + add => SwitchChanged += value; + remove => SwitchChanged -= value; + } - public bool SwitchedOn - { - get => this.m_bSwitchStatus; - set - { - this.m_bSwitchStatus = value; - if (this.SwitchChanged != null) - this.SwitchChanged(this.m_bSwitchStatus, this); - this.Invalidate(); - } - } + public OnOffSwitch() + { + InitializeComponent(); + m_bSwitchStatus = false; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.Transparent; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(Color.White); - graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0, 0, this.Width, this.Height); - if (this.m_bSwitchStatus) - graphics.FillRectangle(Brushes.SteelBlue, (float) ((double) this.Width / 2.0 + 6.0), 2f, (float) ((double) this.Width / 2.0 - 8.0), (float) this.Height - 4f); - else - graphics.FillRectangle(Brushes.Gray, 2f, 2f, (float) ((double) this.Width / 2.0 - 8.0), (float) this.Height - 4f); - } + public bool SwitchedOn + { + get => m_bSwitchStatus; + set + { + m_bSwitchStatus = value; + SwitchChanged?.Invoke(m_bSwitchStatus, this); + Invalidate(); + } + } - private void OnOffSwitch_KeyUp(object sender, KeyEventArgs e) - { - if (e.KeyCode != Keys.Space && e.KeyCode != Keys.Return) - return; - this.m_bSwitchStatus = !this.m_bSwitchStatus; - if (this.SwitchChanged != null) - this.SwitchChanged(this.m_bSwitchStatus, this); - this.Invalidate(); - } + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(Color.White); + graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0, 0, Width, Height); + if (m_bSwitchStatus) + graphics.FillRectangle(Brushes.SteelBlue, (float)(Width / 2.0 + 6.0), 2f, (float)(Width / 2.0 - 8.0), Height - 4f); + else + graphics.FillRectangle(Brushes.Gray, 2f, 2f, (float)(Width / 2.0 - 8.0), Height - 4f); + } - private void OnOffSwitch_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - this.m_bSwitchStatus = !this.m_bSwitchStatus; - if (this.SwitchChanged != null) - this.SwitchChanged(this.m_bSwitchStatus, this); - this.Invalidate(); - } + private void OnOffSwitch_KeyUp(object sender, KeyEventArgs e) + { + if (e.KeyCode != Keys.Space && e.KeyCode != Keys.Return) + return; + m_bSwitchStatus = !m_bSwitchStatus; + SwitchChanged?.Invoke(m_bSwitchStatus, this); + Invalidate(); + } - public delegate void SwitchChangeEventDelegate(bool bSwitchedOn, OnOffSwitch objSender); - } + private void OnOffSwitch_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + m_bSwitchStatus = !m_bSwitchStatus; + SwitchChanged?.Invoke(m_bSwitchStatus, this); + Invalidate(); + } + + public delegate void SwitchChangeEventDelegate(bool bSwitchedOn, OnOffSwitch objSender); + } } diff --git a/UIControls/OpenFileBox.cs b/UIControls/OpenFileBox.cs index 53fe09b..8a6b9e1 100644 --- a/UIControls/OpenFileBox.cs +++ b/UIControls/OpenFileBox.cs @@ -7,140 +7,138 @@ namespace ViPER4WindowsBin.UIControls { - public class OpenFileBox : UserControl - { - private IContainer components; - private OpenFileDialog m_ofdDialog = new OpenFileDialog(); - private string m_szFilePathName = ""; - - protected override void Dispose(bool disposing) + public class OpenFileBox : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private readonly OpenFileDialog m_ofdDialog = new OpenFileDialog(); + private string m_szFilePathName = ""; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = nameof (OpenFileBox); - this.Size = new Size(147, 36); - this.Click += new EventHandler(this.OpenFileBox_Click); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private event OpenFileBox.FileChangeEventDelegate FileChanged; + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = nameof(OpenFileBox); + Size = new Size(147, 36); + Click += new EventHandler(OpenFileBox_Click); + ResumeLayout(false); + } - public event OpenFileBox.FileChangeEventDelegate FileChangeNotify - { - add => this.FileChanged += value; - remove => this.FileChanged -= value; - } + private event FileChangeEventDelegate FileChanged; - public OpenFileBox() - { - this.InitializeComponent(); - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.FromKnownColor(KnownColor.Control); - } + public event FileChangeEventDelegate FileChangeNotify + { + add => FileChanged += value; + remove => FileChanged -= value; + } - public string FilePathName - { - get => this.m_szFilePathName; - set - { - this.m_szFilePathName = value; - if (this.FileChanged != null) - this.FileChanged(this.m_szFilePathName, this); - this.Invalidate(); - } - } + public OpenFileBox() + { + InitializeComponent(); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.FromKnownColor(KnownColor.Control); + } - public string DialogTitle - { - set => this.m_ofdDialog.Title = value; - } + public string FilePathName + { + get => m_szFilePathName; + set + { + m_szFilePathName = value; + FileChanged?.Invoke(m_szFilePathName, this); + Invalidate(); + } + } - public string OpenDirectory - { - set => this.m_ofdDialog.InitialDirectory = value; - } + public string DialogTitle + { + set => m_ofdDialog.Title = value; + } - public string FileFilter - { - set => this.m_ofdDialog.Filter = value; - } + public string OpenDirectory + { + set => m_ofdDialog.InitialDirectory = value; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - graphics.Clear(this.BackColor); - graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0.0f, 0.0f, (float) this.Width, (float) this.Height); - graphics.FillRectangle(Brushes.SteelBlue, (float) this.Width - 27f, 2f, 25f, (float) this.Height - 4f); - float x = (float) this.Width - 14.5f; - float num1 = (float) this.Height / 2f; - PointF pointF1 = new PointF(x - 4f, num1 - 4f); - PointF pointF2 = new PointF(x + 4f, num1 - 4f); - PointF pointF3 = new PointF(x, num1 + 4f); - graphics.FillPolygon(Brushes.Black, new PointF[3] - { + public string FileFilter + { + set => m_ofdDialog.Filter = value; + } + + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + graphics.Clear(BackColor); + graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0.0f, 0.0f, Width, Height); + graphics.FillRectangle(Brushes.SteelBlue, Width - 27f, 2f, 25f, Height - 4f); + float x = Width - 14.5f; + float num1 = Height / 2f; + PointF pointF1 = new PointF(x - 4f, num1 - 4f); + PointF pointF2 = new PointF(x + 4f, num1 - 4f); + PointF pointF3 = new PointF(x, num1 + 4f); + graphics.FillPolygon(Brushes.Black, new PointF[3] + { pointF1, pointF2, pointF3 - }); - string s; - if (this.m_szFilePathName.Length <= 0) - { - s = ""; - } - else - { - int num2 = this.m_szFilePathName.LastIndexOf("\\"); - if (num2 > 0) + }); + string s; + if (m_szFilePathName.Length <= 0) + { + s = ""; + } + else + { + int num2 = m_szFilePathName.LastIndexOf("\\"); + if (num2 > 0) + { + string str = m_szFilePathName.Substring(num2 + 1, m_szFilePathName.Length - num2 - 1); + s = str.Length <= 0 ? "" : str; + } + else + s = ""; + } + Font font = Font; + graphics.DrawString(s, font, Brushes.Black, new RectangleF() + { + X = 2f, + Y = 2f, + Width = Width - 35f, + Height = Height - 4f + }, new StringFormat() + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Center, + Trimming = StringTrimming.EllipsisCharacter, + FormatFlags = StringFormatFlags.NoWrap + }); + } + + private void OpenFileBox_Click(object sender, EventArgs e) { - string str = this.m_szFilePathName.Substring(num2 + 1, this.m_szFilePathName.Length - num2 - 1); - s = str.Length <= 0 ? "" : str; + if (m_ofdDialog.ShowDialog() == DialogResult.Cancel) + return; + m_szFilePathName = m_ofdDialog.FileName; + FileChanged?.Invoke(m_szFilePathName, this); + Invalidate(); } - else - s = ""; - } - Font font = this.Font; - graphics.DrawString(s, font, Brushes.Black, new RectangleF() - { - X = 2f, - Y = 2f, - Width = (float) this.Width - 35f, - Height = (float) this.Height - 4f - }, new StringFormat() - { - Alignment = StringAlignment.Near, - LineAlignment = StringAlignment.Center, - Trimming = StringTrimming.EllipsisCharacter, - FormatFlags = StringFormatFlags.NoWrap - }); - } - private void OpenFileBox_Click(object sender, EventArgs e) - { - if (this.m_ofdDialog.ShowDialog() == DialogResult.Cancel) - return; - this.m_szFilePathName = this.m_ofdDialog.FileName; - if (this.FileChanged != null) - this.FileChanged(this.m_szFilePathName, this); - this.Invalidate(); + public delegate void FileChangeEventDelegate(string szFilePathName, OpenFileBox objSender); } - - public delegate void FileChangeEventDelegate(string szFilePathName, OpenFileBox objSender); - } } diff --git a/UIControls/SingleButton.cs b/UIControls/SingleButton.cs index 00dcab4..b81018c 100644 --- a/UIControls/SingleButton.cs +++ b/UIControls/SingleButton.cs @@ -6,119 +6,119 @@ namespace ViPER4WindowsBin.UIControls { - public class SingleButton : UserControl - { - private IContainer components; - private bool m_bMouseDown; - private string m_szButtonText = ""; - - protected override void Dispose(bool disposing) + public class SingleButton : UserControl { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private bool m_bMouseDown; + private string m_szButtonText = ""; - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.DoubleBuffered = true; - this.Name = nameof (SingleButton); - this.Size = new Size(112, 40); - this.KeyUp += new KeyEventHandler(this.SingleButton_KeyUp); - this.MouseDown += new MouseEventHandler(this.SingleButton_MouseDown); - this.MouseUp += new MouseEventHandler(this.SingleButton_MouseUp); - this.ResumeLayout(false); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private event SingleButton.ButtonClickEventDelegate ButtonClick; + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + DoubleBuffered = true; + Name = nameof(SingleButton); + Size = new Size(112, 40); + KeyUp += new KeyEventHandler(SingleButton_KeyUp); + MouseDown += new MouseEventHandler(SingleButton_MouseDown); + MouseUp += new MouseEventHandler(SingleButton_MouseUp); + ResumeLayout(false); + } - public event SingleButton.ButtonClickEventDelegate ButtonClickNotify - { - add => this.ButtonClick += value; - remove => this.ButtonClick -= value; - } + private event ButtonClickEventDelegate ButtonClick; - public SingleButton() - { - this.InitializeComponent(); - this.m_bMouseDown = false; - this.m_szButtonText = ""; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.FromKnownColor(KnownColor.Control); - } + public event ButtonClickEventDelegate ButtonClickNotify + { + add => ButtonClick += value; + remove => ButtonClick -= value; + } - public string ButtonText - { - get => this.m_szButtonText; - set - { - this.m_szButtonText = value; - this.Invalidate(); - } - } + public SingleButton() + { + InitializeComponent(); + m_bMouseDown = false; + m_szButtonText = ""; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.FromKnownColor(KnownColor.Control); + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - graphics.Clear(this.BackColor); - graphics.DrawRectangle(new Pen(Color.Gray, 2f), this.ClientRectangle); - Brush brush = Brushes.Black; - if (this.m_bMouseDown) - brush = Brushes.SteelBlue; - Font font = this.Font; - graphics.DrawString(this.m_szButtonText, font, brush, new RectangleF() - { - X = 3f, - Y = 5f, - Width = (float) this.Width - 6f, - Height = (float) this.Height - 6f - }, new StringFormat() - { - Alignment = StringAlignment.Center, - LineAlignment = StringAlignment.Center, - Trimming = StringTrimming.EllipsisCharacter, - FormatFlags = StringFormatFlags.NoWrap - }); - } + public string ButtonText + { + get => m_szButtonText; + set + { + m_szButtonText = value; + Invalidate(); + } + } - private void SingleButton_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - this.m_bMouseDown = true; - this.Invalidate(); - } + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + graphics.Clear(BackColor); + graphics.DrawRectangle(new Pen(Color.Gray, 2f), ClientRectangle); + Brush brush = Brushes.Black; + if (m_bMouseDown) + brush = Brushes.SteelBlue; + Font font = Font; + graphics.DrawString(m_szButtonText, font, brush, new RectangleF() + { + X = 3f, + Y = 5f, + Width = Width - 6f, + Height = Height - 6f + }, new StringFormat() + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Center, + Trimming = StringTrimming.EllipsisCharacter, + FormatFlags = StringFormatFlags.NoWrap + }); + } - private void SingleButton_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - this.m_bMouseDown = false; - this.Invalidate(); - if (this.ButtonClick == null) - return; - this.ButtonClick(this); - } + private void SingleButton_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + m_bMouseDown = true; + Invalidate(); + } - private void SingleButton_KeyUp(object sender, KeyEventArgs e) - { - if (e.KeyCode != Keys.Return && e.KeyCode != Keys.Space || this.ButtonClick == null) - return; - this.ButtonClick(this); - } + private void SingleButton_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + m_bMouseDown = false; + Invalidate(); + if (ButtonClick == null) + return; + ButtonClick(this); + } - public delegate void ButtonClickEventDelegate(SingleButton objSender); - } + private void SingleButton_KeyUp(object sender, KeyEventArgs e) + { + if (e.KeyCode != Keys.Return && e.KeyCode != Keys.Space || ButtonClick == null) + return; + ButtonClick(this); + } + + public delegate void ButtonClickEventDelegate(SingleButton objSender); + } } diff --git a/UIControls/TwoSelector.cs b/UIControls/TwoSelector.cs index 3aaf6fa..2e4a910 100644 --- a/UIControls/TwoSelector.cs +++ b/UIControls/TwoSelector.cs @@ -5,155 +5,153 @@ namespace ViPER4WindowsBin.UIControls { - public class TwoSelector : UserControl - { - private object m_objLeftObj; - private object m_objRightObj; - private TwoSelector.SelectorPosition m_spCurrentPosition; - private IContainer components; - - private event TwoSelector.SelectorChangeEventDelegate SelectorChanged; - - public event TwoSelector.SelectorChangeEventDelegate SelectorChangeNotify + public class TwoSelector : UserControl { - add => this.SelectorChanged += value; - remove => this.SelectorChanged -= value; - } + private object m_objLeftObj; + private object m_objRightObj; + private SelectorPosition m_spCurrentPosition; + private readonly IContainer components; - public TwoSelector() - { - this.InitializeComponent(); - this.m_objLeftObj = (object) null; - this.m_objRightObj = (object) null; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.Transparent; - } + private event SelectorChangeEventDelegate SelectorChanged; - public object LeftObject - { - get => this.m_objLeftObj; - set => this.m_objLeftObj = value; - } + public event SelectorChangeEventDelegate SelectorChangeNotify + { + add => SelectorChanged += value; + remove => SelectorChanged -= value; + } - public object RightObject - { - get => this.m_objRightObj; - set => this.m_objRightObj = value; - } + public TwoSelector() + { + InitializeComponent(); + m_objLeftObj = null; + m_objRightObj = null; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.Transparent; + } - public object CurrentObject - { - get => this.m_spCurrentPosition == TwoSelector.SelectorPosition.SELECTOR_ON_LEFT ? this.m_objLeftObj : this.m_objRightObj; - set - { - if (this.m_objLeftObj == this.m_objRightObj) - return; - if (value == this.m_objLeftObj) + public object LeftObject { - this.m_spCurrentPosition = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; - if (this.SelectorChanged != null) - this.SelectorChanged(this.m_spCurrentPosition, this.m_objLeftObj, this); - this.Invalidate(); + get => m_objLeftObj; + set => m_objLeftObj = value; } - else + + public object RightObject { - if (value != this.m_objRightObj) - return; - this.m_spCurrentPosition = TwoSelector.SelectorPosition.SELECTOR_ON_RIGHT; - if (this.SelectorChanged != null) - this.SelectorChanged(this.m_spCurrentPosition, this.m_objRightObj, this); - this.Invalidate(); + get => m_objRightObj; + set => m_objRightObj = value; } - } - } - public TwoSelector.SelectorPosition Selector - { - get => this.m_spCurrentPosition; - set - { - this.m_spCurrentPosition = value; - if (this.SelectorChanged != null) + public object CurrentObject { - if (this.m_spCurrentPosition == TwoSelector.SelectorPosition.SELECTOR_ON_LEFT) - this.SelectorChanged(this.m_spCurrentPosition, this.m_objLeftObj, this); - else - this.SelectorChanged(this.m_spCurrentPosition, this.m_objRightObj, this); + get => m_spCurrentPosition == SelectorPosition.SELECTOR_ON_LEFT ? m_objLeftObj : m_objRightObj; + set + { + if (m_objLeftObj == m_objRightObj) + return; + if (value == m_objLeftObj) + { + m_spCurrentPosition = SelectorPosition.SELECTOR_ON_LEFT; + SelectorChanged?.Invoke(m_spCurrentPosition, m_objLeftObj, this); + Invalidate(); + } + else + { + if (value != m_objRightObj) + return; + m_spCurrentPosition = SelectorPosition.SELECTOR_ON_RIGHT; + SelectorChanged?.Invoke(m_spCurrentPosition, m_objRightObj, this); + Invalidate(); + } + } } - this.Invalidate(); - } - } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(Color.White); - graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0, 0, this.Width, this.Height); - if (this.m_spCurrentPosition == TwoSelector.SelectorPosition.SELECTOR_ON_LEFT) - graphics.FillEllipse(Brushes.SteelBlue, new RectangleF() + public SelectorPosition Selector + { + get => m_spCurrentPosition; + set + { + m_spCurrentPosition = value; + if (SelectorChanged != null) + { + if (m_spCurrentPosition == SelectorPosition.SELECTOR_ON_LEFT) + SelectorChanged(m_spCurrentPosition, m_objLeftObj, this); + else + SelectorChanged(m_spCurrentPosition, m_objRightObj, this); + } + Invalidate(); + } + } + + protected override void OnPaint(PaintEventArgs e) { - X = 2f, - Y = 2f, - Width = (float) this.ClientRectangle.Height - 4f, - Height = (float) this.ClientRectangle.Height - 4f - }); - else - graphics.FillEllipse(Brushes.SteelBlue, new RectangleF() + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(Color.White); + graphics.DrawRectangle(new Pen(Color.Gray, 1f), 0, 0, Width, Height); + if (m_spCurrentPosition == SelectorPosition.SELECTOR_ON_LEFT) + graphics.FillEllipse(Brushes.SteelBlue, new RectangleF() + { + X = 2f, + Y = 2f, + Width = ClientRectangle.Height - 4f, + Height = ClientRectangle.Height - 4f + }); + else + graphics.FillEllipse(Brushes.SteelBlue, new RectangleF() + { + X = (float)(ClientRectangle.Width - 2.0 - (ClientRectangle.Height - 4.0)), + Y = 2f, + Width = ClientRectangle.Height - 4f, + Height = ClientRectangle.Height - 4f + }); + } + + private void TwoSelector_MouseUp(object sender, MouseEventArgs e) { - X = (float) ((double) this.ClientRectangle.Width - 2.0 - ((double) this.ClientRectangle.Height - 4.0)), - Y = 2f, - Width = (float) this.ClientRectangle.Height - 4f, - Height = (float) this.ClientRectangle.Height - 4f - }); - } + if (e.Button != MouseButtons.Left) + return; + if (m_spCurrentPosition == SelectorPosition.SELECTOR_ON_LEFT) + Selector = SelectorPosition.SELECTOR_ON_RIGHT; + else + Selector = SelectorPosition.SELECTOR_ON_LEFT; + } - private void TwoSelector_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - if (this.m_spCurrentPosition == TwoSelector.SelectorPosition.SELECTOR_ON_LEFT) - this.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_RIGHT; - else - this.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + BackColor = Color.Transparent; + DoubleBuffered = true; + Name = nameof(TwoSelector); + Size = new Size(107, 28); + MouseUp += new MouseEventHandler(TwoSelector_MouseUp); + ResumeLayout(false); + } - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.BackColor = Color.Transparent; - this.DoubleBuffered = true; - this.Name = nameof (TwoSelector); - this.Size = new Size(107, 28); - this.MouseUp += new MouseEventHandler(this.TwoSelector_MouseUp); - this.ResumeLayout(false); - } + public enum SelectorPosition + { + SELECTOR_ON_LEFT, + SELECTOR_ON_RIGHT, + } - public enum SelectorPosition - { - SELECTOR_ON_LEFT, - SELECTOR_ON_RIGHT, + public delegate void SelectorChangeEventDelegate( + SelectorPosition spCurrentPosition, + object objSelected, + TwoSelector objSender); } - - public delegate void SelectorChangeEventDelegate( - TwoSelector.SelectorPosition spCurrentPosition, - object objSelected, - TwoSelector objSender); - } } diff --git a/UIControls/VSlider.cs b/UIControls/VSlider.cs index bd185e8..5140475 100644 --- a/UIControls/VSlider.cs +++ b/UIControls/VSlider.cs @@ -6,133 +6,129 @@ namespace ViPER4WindowsBin.UIControls { - public class VSlider : UserControl - { - private const uint m_nRangeMin = 0; - private const uint m_nRangeMax = 100; - private bool m_bMouseDown; - private uint m_nPosition; - private uint m_nMoveDelta = 1; - private IContainer components; + public class VSlider : UserControl + { + private const uint m_nRangeMin = 0; + private const uint m_nRangeMax = 100; + private bool m_bMouseDown; + private uint m_nPosition; + private uint m_nMoveDelta = 1; + private readonly IContainer components; - private event VSlider.PositionChangeEventDelegate PositionChanged; + private event PositionChangeEventDelegate PositionChanged; - public event VSlider.PositionChangeEventDelegate PositionChangeNotify - { - add => this.PositionChanged += value; - remove => this.PositionChanged -= value; - } + public event PositionChangeEventDelegate PositionChangeNotify + { + add => PositionChanged += value; + remove => PositionChanged -= value; + } - public VSlider() - { - this.InitializeComponent(); - this.m_nPosition = 0U; - this.m_nMoveDelta = 1U; - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.ResizeRedraw, true); - this.SetStyle(ControlStyles.StandardClick, true); - this.SetStyle(ControlStyles.Selectable, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.BackColor = Color.FromKnownColor(KnownColor.Control); - } + public VSlider() + { + InitializeComponent(); + m_nPosition = 0U; + m_nMoveDelta = 1U; + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.StandardClick, true); + SetStyle(ControlStyles.Selectable, true); + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.UserPaint, true); + BackColor = Color.FromKnownColor(KnownColor.Control); + } - public uint Position - { - get => 100U - this.m_nPosition; - set - { - if (value < 0U) - value = 0U; - if (value > 100U) - value = 100U; - this.m_nPosition = 100U - value; - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } - } + public uint Position + { + get => 100U - m_nPosition; + set + { + if (value < 0U) + value = 0U; + if (value > 100U) + value = 100U; + m_nPosition = 100U - value; + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } + } - public uint MoveDelta - { - get => this.m_nMoveDelta; - set => this.m_nMoveDelta = value; - } + public uint MoveDelta + { + get => m_nMoveDelta; + set => m_nMoveDelta = value; + } - protected override void OnPaint(PaintEventArgs e) - { - Graphics graphics = e.Graphics; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.Clear(this.BackColor); - graphics.DrawLine(new Pen(Color.Gray, 2f), (float) this.Width / 2f, (float) this.Width / 2f, (float) this.Width / 2f, (float) this.Height - (float) this.Width / 2f); - float num = (float) this.m_nPosition / 100f * (float) (this.Height - this.Width) + (float) this.Width / 2f; - graphics.FillEllipse(Brushes.SteelBlue, (float) this.Width / 4f, num - (float) this.Width / 4f, (float) this.Width / 2f, (float) this.Width / 2f); - } + protected override void OnPaint(PaintEventArgs e) + { + Graphics graphics = e.Graphics; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + graphics.Clear(BackColor); + graphics.DrawLine(new Pen(Color.Gray, 2f), Width / 2f, Width / 2f, Width / 2f, Height - Width / 2f); + float num = m_nPosition / 100f * (Height - Width) + Width / 2f; + graphics.FillEllipse(Brushes.SteelBlue, Width / 4f, num - Width / 4f, Width / 2f, Width / 2f); + } - private void VSlider_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - this.m_bMouseDown = true; - float num = (float) e.Y; - if ((double) num < (double) this.Width / 2.0) - num = (float) this.Width / 2f; - if ((double) num > (double) this.Height - (double) this.Width / 2.0) - num = (float) this.Height - (float) this.Width / 2f; - this.m_nPosition = (uint) Math.Round((double) ((num - (float) this.Width / 2f) / (float) (this.Height - this.Width)) * 100.0); - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } + private void VSlider_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + m_bMouseDown = true; + float num = e.Y; + if ((double)num < Width / 2.0) + num = Width / 2f; + if ((double)num > Height - Width / 2.0) + num = Height - Width / 2f; + m_nPosition = (uint)Math.Round((double)((num - Width / 2f) / (Height - Width)) * 100.0); + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } - private void VSlider_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - return; - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.m_bMouseDown = false; - } + private void VSlider_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + PositionChanged?.Invoke(Position / 100f, this); + m_bMouseDown = false; + } - private void VSlider_MouseMove(object sender, MouseEventArgs e) - { - if (!this.m_bMouseDown) - return; - float num = (float) e.Y; - if ((double) num < (double) this.Width / 2.0) - num = (float) this.Width / 2f; - if ((double) num > (double) this.Height - (double) this.Width / 2.0) - num = (float) this.Height - (float) this.Width / 2f; - this.m_nPosition = (uint) Math.Round((double) ((num - (float) this.Width / 2f) / (float) (this.Height - this.Width)) * 100.0); - if (this.PositionChanged != null) - this.PositionChanged((float) this.Position / 100f, this); - this.Invalidate(); - } + private void VSlider_MouseMove(object sender, MouseEventArgs e) + { + if (!m_bMouseDown) + return; + float num = e.Y; + if ((double)num < Width / 2.0) + num = Width / 2f; + if ((double)num > Height - Width / 2.0) + num = Height - Width / 2f; + m_nPosition = (uint)Math.Round((double)((num - Width / 2f) / (Height - Width)) * 100.0); + PositionChanged?.Invoke(Position / 100f, this); + Invalidate(); + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private void InitializeComponent() - { - this.SuspendLayout(); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.BackColor = SystemColors.Control; - this.DoubleBuffered = true; - this.Name = nameof (VSlider); - this.Size = new Size(47, 204); - this.MouseDown += new MouseEventHandler(this.VSlider_MouseDown); - this.MouseMove += new MouseEventHandler(this.VSlider_MouseMove); - this.MouseUp += new MouseEventHandler(this.VSlider_MouseUp); - this.ResumeLayout(false); - } + private void InitializeComponent() + { + SuspendLayout(); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + BackColor = SystemColors.Control; + DoubleBuffered = true; + Name = nameof(VSlider); + Size = new Size(47, 204); + MouseDown += new MouseEventHandler(VSlider_MouseDown); + MouseMove += new MouseEventHandler(VSlider_MouseMove); + MouseUp += new MouseEventHandler(VSlider_MouseUp); + ResumeLayout(false); + } - public delegate void PositionChangeEventDelegate(float fPercent, VSlider objSender); - } + public delegate void PositionChangeEventDelegate(float fPercent, VSlider objSender); + } } diff --git a/Utils/ConfigFile.cs b/Utils/ConfigFile.cs index c9b0bc1..c557e0f 100644 --- a/Utils/ConfigFile.cs +++ b/Utils/ConfigFile.cs @@ -3,133 +3,133 @@ namespace ViPER4WindowsBin.Utils { - internal class ConfigFile - { - private string m_szConfigPathName = ""; + internal class ConfigFile + { + private readonly string m_szConfigPathName = ""; - public ConfigFile(string szConfigPath) => this.m_szConfigPathName = szConfigPath; + public ConfigFile(string szConfigPath) => m_szConfigPathName = szConfigPath; - public string ReadConfig(string szKey) - { - if (this.m_szConfigPathName == null || this.m_szConfigPathName == "") - return ""; - int length = this.m_szConfigPathName.LastIndexOf("\\"); - if (length <= 0 || !Directory.Exists(this.m_szConfigPathName.Substring(0, length) + "\\")) - return ""; - if (!File.Exists(this.m_szConfigPathName)) - return ""; - try - { - StreamReader streamReader = new StreamReader(this.m_szConfigPathName); - while (!streamReader.EndOfStream) + public string ReadConfig(string szKey) { - string str = streamReader.ReadLine(); - if (str != null && !str.StartsWith("#")) - { - string[] strArray = str.Split('='); - if (strArray.Length == 2 && strArray[0].Trim().ToUpper() == szKey.Trim().ToUpper()) - { - streamReader.Close(); - return strArray[1].Trim(); - } - } - } - streamReader.Close(); - return ""; - } - catch - { - return ""; - } - } - - public void SetConfig(string szKey, string szValue) - { - switch (szKey) - { - case null: - break; - case "": - break; - default: - if (this.m_szConfigPathName == null || this.m_szConfigPathName == "") - break; - int length = this.m_szConfigPathName.LastIndexOf("\\"); - if (length > 0) - { - string path = this.m_szConfigPathName.Substring(0, length) + "\\"; - if (!Directory.Exists(path)) - { - try - { - Directory.CreateDirectory(path); - } - catch - { - break; - } - } - } - if (!File.Exists(this.m_szConfigPathName)) - { + if (m_szConfigPathName == null || m_szConfigPathName == "") + return ""; + int length = m_szConfigPathName.LastIndexOf("\\"); + if (length <= 0 || !Directory.Exists(m_szConfigPathName.Substring(0, length) + "\\")) + return ""; + if (!File.Exists(m_szConfigPathName)) + return ""; try { - StreamWriter streamWriter = new StreamWriter(this.m_szConfigPathName, false, Encoding.Unicode); - streamWriter.WriteLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); - streamWriter.Flush(); - streamWriter.Close(); - break; + StreamReader streamReader = new StreamReader(m_szConfigPathName); + while (!streamReader.EndOfStream) + { + string str = streamReader.ReadLine(); + if (str != null && !str.StartsWith("#")) + { + string[] strArray = str.Split('='); + if (strArray.Length == 2 && strArray[0].Trim().ToUpper() == szKey.Trim().ToUpper()) + { + streamReader.Close(); + return strArray[1].Trim(); + } + } + } + streamReader.Close(); + return ""; } catch { + return ""; } - } - try - { - StringBuilder stringBuilder = new StringBuilder(); - StreamReader streamReader = new StreamReader(this.m_szConfigPathName); - bool flag = false; - while (!streamReader.EndOfStream) + } + + public void SetConfig(string szKey, string szValue) + { + switch (szKey) { - string str = streamReader.ReadLine(); - if (str != null) - { - if (str.StartsWith("#")) - { - stringBuilder.AppendLine(str); - } - else - { - string[] strArray = str.Split('='); - if (strArray.Length == 2) - { - if (strArray[0].Trim().ToUpper() == szKey.Trim().ToUpper()) + case null: + break; + case "": + break; + default: + if (m_szConfigPathName == null || m_szConfigPathName == "") + break; + int length = m_szConfigPathName.LastIndexOf("\\"); + if (length > 0) { - stringBuilder.AppendLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); - flag = true; + string path = m_szConfigPathName.Substring(0, length) + "\\"; + if (!Directory.Exists(path)) + { + try + { + Directory.CreateDirectory(path); + } + catch + { + break; + } + } + } + if (!File.Exists(m_szConfigPathName)) + { + try + { + StreamWriter streamWriter = new StreamWriter(m_szConfigPathName, false, Encoding.Unicode); + streamWriter.WriteLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); + streamWriter.Flush(); + streamWriter.Close(); + break; + } + catch + { + } + } + try + { + StringBuilder stringBuilder = new StringBuilder(); + StreamReader streamReader = new StreamReader(m_szConfigPathName); + bool flag = false; + while (!streamReader.EndOfStream) + { + string str = streamReader.ReadLine(); + if (str != null) + { + if (str.StartsWith("#")) + { + stringBuilder.AppendLine(str); + } + else + { + string[] strArray = str.Split('='); + if (strArray.Length == 2) + { + if (strArray[0].Trim().ToUpper() == szKey.Trim().ToUpper()) + { + stringBuilder.AppendLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); + flag = true; + } + else + stringBuilder.AppendLine(str.Trim()); + } + else + stringBuilder.AppendLine(str); + } + } + } + streamReader.Close(); + if (!flag) + stringBuilder.AppendLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); + StreamWriter streamWriter = new StreamWriter(m_szConfigPathName, false, Encoding.Unicode); + streamWriter.Write(stringBuilder.ToString()); + streamWriter.Flush(); + streamWriter.Close(); + break; + } + catch + { + break; } - else - stringBuilder.AppendLine(str.Trim()); - } - else - stringBuilder.AppendLine(str); - } - } } - streamReader.Close(); - if (!flag) - stringBuilder.AppendLine(szKey.Trim().ToUpper() + "=" + szValue.Trim()); - StreamWriter streamWriter = new StreamWriter(this.m_szConfigPathName, false, Encoding.Unicode); - streamWriter.Write(stringBuilder.ToString()); - streamWriter.Flush(); - streamWriter.Close(); - break; - } - catch - { - break; - } - } + } } - } } diff --git a/Utils/FolderExplorer.cs b/Utils/FolderExplorer.cs index 39c3e18..349e076 100644 --- a/Utils/FolderExplorer.cs +++ b/Utils/FolderExplorer.cs @@ -3,30 +3,30 @@ namespace ViPER4WindowsBin.Utils { - internal class FolderExplorer - { - private void InternalListFiles(string szFolder, List lsResult) + internal class FolderExplorer { - try - { - lsResult.AddRange((IEnumerable) Directory.GetFiles(szFolder)); - foreach (string directory in Directory.GetDirectories(szFolder)) - this.InternalListFiles(directory, lsResult); - } - catch - { - } - } + private void InternalListFiles(string szFolder, List lsResult) + { + try + { + lsResult.AddRange(Directory.GetFiles(szFolder)); + foreach (string directory in Directory.GetDirectories(szFolder)) + InternalListFiles(directory, lsResult); + } + catch + { + } + } - public string[] ListFiles(string szFolder) - { - if (szFolder == null) - return new string[0]; - if (!Directory.Exists(szFolder)) - return new string[0]; - List lsResult = new List(); - this.InternalListFiles(szFolder, lsResult); - return lsResult.ToArray(); + public string[] ListFiles(string szFolder) + { + if (szFolder == null) + return new string[0]; + if (!Directory.Exists(szFolder)) + return new string[0]; + List lsResult = new List(); + InternalListFiles(szFolder, lsResult); + return lsResult.ToArray(); + } } - } } diff --git a/Utils/Parameters.cs b/Utils/Parameters.cs index a0a2303..290b942 100644 --- a/Utils/Parameters.cs +++ b/Utils/Parameters.cs @@ -6,840 +6,852 @@ namespace ViPER4WindowsBin.Utils { - internal class Parameters - { - public const int EFFECT_MODE_MUSIC = 0; - public const int EFFECT_MODE_MOVIE = 1; - public const int EFFECT_MODE_FREESTYLE = 2; - public const uint CF_DEFAULT_CLEVEL = 2949820; - public const uint CF_CMOY_CLEVEL = 3932860; - public const uint CF_JMEIER_CLEVEL = 6226570; - public const float MINKNEEMULT = 0.0f; - public const float MAXKNEEMULT = 4f; - public const float MINATTACKTIME = 0.0001f; - public const float MAXATTACKTIME = 0.2f; - public const float MINRELEASETIME = 0.005f; - public const float MAXRELEASETIME = 2f; - public const float MAXGAINDB = 60f; - public const float MINADAPTTIME = 1f; - public const float MAXADAPTTIME = 4f; - public const float MINCRESTTIME = 0.005f; - public const float MAXCRESTTIME = 2f; - - public static char[] WriteStringToArray260(string szContext) - { - if (szContext.Length >= 260) - return new char[260]; - char[] charArray = szContext.ToCharArray(); - char[] destinationArray = new char[260]; - for (int index = 0; index < destinationArray.Length; ++index) - destinationArray[index] = Convert.ToChar(0); - Array.Copy((Array) charArray, (Array) destinationArray, charArray.Length); - return destinationArray; - } - - public static byte[] ParameterSerialize(object sParameter) + internal class Parameters { - int length = Marshal.SizeOf(sParameter); - IntPtr num = Marshal.AllocHGlobal(length); - Marshal.StructureToPtr(sParameter, num, false); - byte[] destination = new byte[length]; - Marshal.Copy(num, destination, 0, length); - Marshal.FreeHGlobal(num); - return destination; - } + public const int EFFECT_MODE_MUSIC = 0; + public const int EFFECT_MODE_MOVIE = 1; + public const int EFFECT_MODE_FREESTYLE = 2; + public const uint CF_DEFAULT_CLEVEL = 2949820; + public const uint CF_CMOY_CLEVEL = 3932860; + public const uint CF_JMEIER_CLEVEL = 6226570; + public const float MINKNEEMULT = 0.0f; + public const float MAXKNEEMULT = 4f; + public const float MINATTACKTIME = 0.0001f; + public const float MAXATTACKTIME = 0.2f; + public const float MINRELEASETIME = 0.005f; + public const float MAXRELEASETIME = 2f; + public const float MAXGAINDB = 60f; + public const float MINADAPTTIME = 1f; + public const float MAXADAPTTIME = 4f; + public const float MINCRESTTIME = 0.005f; + public const float MAXCRESTTIME = 2f; - public static RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1 DeserializeParamOfBaseSystem_1_0_1( - byte[] baRawData) - { - System.Type type = typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1); - int num1 = Marshal.SizeOf(type); - if (num1 != baRawData.Length) - return new RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1() + public static char[] WriteStringToArray260(string szContext) { - m_bEffectEnabled = 0, - m_nEffectMode = 0, - m_nFilterShortLen = 4096, - m_nFilterMediumLen = 0, - m_nFilterLongLen = 0, - m_rChannelPan = 0.0f - }; - IntPtr num2 = Marshal.AllocHGlobal(num1); - Marshal.Copy(baRawData, 0, num2, num1); - object structure = Marshal.PtrToStructure(num2, type); - Marshal.FreeHGlobal(num2); - return (RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1) structure; - } - - public static RuntimeUtils.ConfigProxy._ParamOfBaseSystem DeserializeParamOfBaseSystem( - byte[] baRawData) - { - System.Type type = typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem); - int num1 = Marshal.SizeOf(type); - if (num1 != baRawData.Length) - { - RuntimeUtils.ConfigProxy._ParamOfBaseSystem sParameter = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - Parameters.LoadDefaultParameter(ref sParameter); - return sParameter; - } - IntPtr num2 = Marshal.AllocHGlobal(num1); - Marshal.Copy(baRawData, 0, num2, num1); - object structure = Marshal.PtrToStructure(num2, type); - Marshal.FreeHGlobal(num2); - return (RuntimeUtils.ConfigProxy._ParamOfBaseSystem) structure; - } - - public static RuntimeUtils.ConfigProxy._ParamOfMusicMode DeserializeParamOfMusicMode( - byte[] baRawData) - { - System.Type type = typeof (RuntimeUtils.ConfigProxy._ParamOfMusicMode); - int num1 = Marshal.SizeOf(type); - if (num1 != baRawData.Length) - { - RuntimeUtils.ConfigProxy._ParamOfMusicMode sParameter = new RuntimeUtils.ConfigProxy._ParamOfMusicMode(); - Parameters.LoadDefaultParameter(ref sParameter); - return sParameter; - } - IntPtr num2 = Marshal.AllocHGlobal(num1); - Marshal.Copy(baRawData, 0, num2, num1); - object structure = Marshal.PtrToStructure(num2, type); - Marshal.FreeHGlobal(num2); - return (RuntimeUtils.ConfigProxy._ParamOfMusicMode) structure; - } + if (szContext.Length >= 260) + return new char[260]; + char[] charArray = szContext.ToCharArray(); + char[] destinationArray = new char[260]; + for (int index = 0; index < destinationArray.Length; ++index) + destinationArray[index] = Convert.ToChar(0); + Array.Copy(charArray, destinationArray, charArray.Length); + return destinationArray; + } - public static RuntimeUtils.ConfigProxy._ParamOfMovieMode DeserializeParamOfMovieMode( - byte[] baRawData) - { - System.Type type = typeof (RuntimeUtils.ConfigProxy._ParamOfMovieMode); - int num1 = Marshal.SizeOf(type); - if (num1 != baRawData.Length) - { - RuntimeUtils.ConfigProxy._ParamOfMovieMode sParameter = new RuntimeUtils.ConfigProxy._ParamOfMovieMode(); - Parameters.LoadDefaultParameter(ref sParameter); - return sParameter; - } - IntPtr num2 = Marshal.AllocHGlobal(num1); - Marshal.Copy(baRawData, 0, num2, num1); - object structure = Marshal.PtrToStructure(num2, type); - Marshal.FreeHGlobal(num2); - return (RuntimeUtils.ConfigProxy._ParamOfMovieMode) structure; - } + public static byte[] ParameterSerialize(object sParameter) + { + int length = Marshal.SizeOf(sParameter); + IntPtr num = Marshal.AllocHGlobal(length); + Marshal.StructureToPtr(sParameter, num, false); + byte[] destination = new byte[length]; + Marshal.Copy(num, destination, 0, length); + Marshal.FreeHGlobal(num); + return destination; + } - public static RuntimeUtils.ConfigProxy._ParamOfFreestyle DeserializeParamOfFreestyle( - byte[] baRawData) - { - System.Type type = typeof (RuntimeUtils.ConfigProxy._ParamOfFreestyle); - int num1 = Marshal.SizeOf(type); - if (num1 != baRawData.Length) - { - RuntimeUtils.ConfigProxy._ParamOfFreestyle sParameter = new RuntimeUtils.ConfigProxy._ParamOfFreestyle(); - Parameters.LoadDefaultParameter(ref sParameter); - return sParameter; - } - IntPtr num2 = Marshal.AllocHGlobal(num1); - Marshal.Copy(baRawData, 0, num2, num1); - object structure = Marshal.PtrToStructure(num2, type); - Marshal.FreeHGlobal(num2); - return (RuntimeUtils.ConfigProxy._ParamOfFreestyle) structure; - } + public static RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1 DeserializeParamOfBaseSystem_1_0_1( + byte[] baRawData) + { + Type type = typeof(RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1); + int num1 = Marshal.SizeOf(type); + if (num1 != baRawData.Length) + return new RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1() + { + m_bEffectEnabled = 0, + m_nEffectMode = 0, + m_nFilterShortLen = 4096, + m_nFilterMediumLen = 0, + m_nFilterLongLen = 0, + m_rChannelPan = 0.0f + }; + IntPtr num2 = Marshal.AllocHGlobal(num1); + Marshal.Copy(baRawData, 0, num2, num1); + object structure = Marshal.PtrToStructure(num2, type); + Marshal.FreeHGlobal(num2); + return (RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1)structure; + } - public static void SaveLocalPreset( - string szFilePathName, - RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramBaseSystem, - RuntimeUtils.ConfigProxy._ParamOfMusicMode paramMusicMode, - RuntimeUtils.ConfigProxy._ParamOfMovieMode paramMovieMode, - RuntimeUtils.ConfigProxy._ParamOfFreestyle paramFreestyle) - { - byte[] buffer1 = Parameters.ParameterSerialize((object) paramBaseSystem); - byte[] buffer2 = Parameters.ParameterSerialize((object) paramMusicMode); - byte[] buffer3 = Parameters.ParameterSerialize((object) paramMovieMode); - byte[] buffer4 = Parameters.ParameterSerialize((object) paramFreestyle); - if (buffer1 == null || buffer2 == null || buffer3 == null) - return; - if (buffer4 == null) - return; - try - { - FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); - byte[] buffer5 = new byte[14] + public static RuntimeUtils.ConfigProxy.ParamOfBaseSystem DeserializeParamOfBaseSystem( + byte[] baRawData) { - (byte) 86, - (byte) 105, - (byte) 80, - (byte) 69, - (byte) 82, - (byte) 52, - (byte) 87, - (byte) 105, - (byte) 110, - (byte) 100, - (byte) 111, - (byte) 119, - (byte) 115, - (byte) 88 - }; - fileStream.Write(buffer5, 0, buffer5.Length); - fileStream.WriteByte((byte) 1); - fileStream.WriteByte((byte) 1); - fileStream.WriteByte((byte) 1); - fileStream.WriteByte((byte) 1); - fileStream.Write(buffer1, 0, buffer1.Length); - fileStream.Write(buffer2, 0, buffer2.Length); - fileStream.Write(buffer3, 0, buffer3.Length); - fileStream.Write(buffer4, 0, buffer4.Length); - fileStream.Flush(); - fileStream.Close(); - } - catch (Exception ex) - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.AppendLine(GlobalMessages.ERROR); - stringBuilder.AppendLine(GlobalMessages.TECHNICAL_INFO); - stringBuilder.AppendLine(ex.Message); - int num = (int) MessageBox.Show(stringBuilder.ToString(), GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); - } - } + Type type = typeof(RuntimeUtils.ConfigProxy.ParamOfBaseSystem); + int num1 = Marshal.SizeOf(type); + if (num1 != baRawData.Length) + { + RuntimeUtils.ConfigProxy.ParamOfBaseSystem sParameter = new RuntimeUtils.ConfigProxy.ParamOfBaseSystem(); + LoadDefaultParameter(ref sParameter); + return sParameter; + } + IntPtr num2 = Marshal.AllocHGlobal(num1); + Marshal.Copy(baRawData, 0, num2, num1); + object structure = Marshal.PtrToStructure(num2, type); + Marshal.FreeHGlobal(num2); + return (RuntimeUtils.ConfigProxy.ParamOfBaseSystem)structure; + } - public static bool SavePreset( - string szFilePathName, - RuntimeUtils.ConfigProxy._ParamOfMusicMode paramMusicMode) - { - byte[] buffer1 = Parameters.ParameterSerialize((object) paramMusicMode); - if (buffer1 == null) - return false; - try - { - FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); - byte[] buffer2 = new byte[14] + public static RuntimeUtils.ConfigProxy.ParamOfMusicMode DeserializeParamOfMusicMode( + byte[] baRawData) { - (byte) 86, - (byte) 105, - (byte) 80, - (byte) 69, - (byte) 82, - (byte) 52, - (byte) 87, - (byte) 105, - (byte) 110, - (byte) 100, - (byte) 111, - (byte) 119, - (byte) 115, - (byte) 88 - }; - fileStream.Write(buffer2, 0, buffer2.Length); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 1); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 0); - fileStream.Write(buffer1, 0, buffer1.Length); - fileStream.Flush(); - fileStream.Close(); - return true; - } - catch - { - return false; - } - } + Type type = typeof(RuntimeUtils.ConfigProxy.ParamOfMusicMode); + int num1 = Marshal.SizeOf(type); + if (num1 != baRawData.Length) + { + RuntimeUtils.ConfigProxy.ParamOfMusicMode sParameter = new RuntimeUtils.ConfigProxy.ParamOfMusicMode(); + LoadDefaultParameter(ref sParameter); + return sParameter; + } + IntPtr num2 = Marshal.AllocHGlobal(num1); + Marshal.Copy(baRawData, 0, num2, num1); + object structure = Marshal.PtrToStructure(num2, type); + Marshal.FreeHGlobal(num2); + return (RuntimeUtils.ConfigProxy.ParamOfMusicMode)structure; + } - public static bool SavePreset( - string szFilePathName, - RuntimeUtils.ConfigProxy._ParamOfMovieMode paramMovieMode) - { - byte[] buffer1 = Parameters.ParameterSerialize((object) paramMovieMode); - if (buffer1 == null) - return false; - try - { - FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); - byte[] buffer2 = new byte[14] + public static RuntimeUtils.ConfigProxy.ParamOfMovieMode DeserializeParamOfMovieMode( + byte[] baRawData) { - (byte) 86, - (byte) 105, - (byte) 80, - (byte) 69, - (byte) 82, - (byte) 52, - (byte) 87, - (byte) 105, - (byte) 110, - (byte) 100, - (byte) 111, - (byte) 119, - (byte) 115, - (byte) 88 - }; - fileStream.Write(buffer2, 0, buffer2.Length); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 1); - fileStream.WriteByte((byte) 0); - fileStream.Write(buffer1, 0, buffer1.Length); - fileStream.Flush(); - fileStream.Close(); - return true; - } - catch - { - return false; - } - } + Type type = typeof(RuntimeUtils.ConfigProxy.ParamOfMovieMode); + int num1 = Marshal.SizeOf(type); + if (num1 != baRawData.Length) + { + RuntimeUtils.ConfigProxy.ParamOfMovieMode sParameter = new RuntimeUtils.ConfigProxy.ParamOfMovieMode(); + LoadDefaultParameter(ref sParameter); + return sParameter; + } + IntPtr num2 = Marshal.AllocHGlobal(num1); + Marshal.Copy(baRawData, 0, num2, num1); + object structure = Marshal.PtrToStructure(num2, type); + Marshal.FreeHGlobal(num2); + return (RuntimeUtils.ConfigProxy.ParamOfMovieMode)structure; + } - public static bool SavePreset( - string szFilePathName, - RuntimeUtils.ConfigProxy._ParamOfFreestyle paramFreestyle) - { - byte[] buffer1 = Parameters.ParameterSerialize((object) paramFreestyle); - if (buffer1 == null) - return false; - try - { - FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); - byte[] buffer2 = new byte[14] + public static RuntimeUtils.ConfigProxy.ParamOfFreestyle DeserializeParamOfFreestyle( + byte[] baRawData) { - (byte) 86, - (byte) 105, - (byte) 80, - (byte) 69, - (byte) 82, - (byte) 52, - (byte) 87, - (byte) 105, - (byte) 110, - (byte) 100, - (byte) 111, - (byte) 119, - (byte) 115, - (byte) 88 - }; - fileStream.Write(buffer2, 0, buffer2.Length); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 0); - fileStream.WriteByte((byte) 1); - fileStream.Write(buffer1, 0, buffer1.Length); - fileStream.Flush(); - fileStream.Close(); - return true; - } - catch - { - return false; - } - } + Type type = typeof(RuntimeUtils.ConfigProxy.ParamOfFreestyle); + int num1 = Marshal.SizeOf(type); + if (num1 != baRawData.Length) + { + RuntimeUtils.ConfigProxy.ParamOfFreestyle sParameter = new RuntimeUtils.ConfigProxy.ParamOfFreestyle(); + LoadDefaultParameter(ref sParameter); + return sParameter; + } + IntPtr num2 = Marshal.AllocHGlobal(num1); + Marshal.Copy(baRawData, 0, num2, num1); + object structure = Marshal.PtrToStructure(num2, type); + Marshal.FreeHGlobal(num2); + return (RuntimeUtils.ConfigProxy.ParamOfFreestyle)structure; + } - public static bool ReadPreset( - string szFilePathName, - ref RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramBaseSystem, - ref RuntimeUtils.ConfigProxy._ParamOfMusicMode paramMusicMode, - ref RuntimeUtils.ConfigProxy._ParamOfMovieMode paramMovieMode, - ref RuntimeUtils.ConfigProxy._ParamOfFreestyle paramFreestyle, - out bool bPBaseSystem, - out bool bPMusicMode, - out bool bPMovieMode, - out bool bPFreestyle) - { - if (szFilePathName == null) - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - if (szFilePathName.Length <= 0) - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - if (!File.Exists(szFilePathName)) - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - long length; - try - { - length = new FileInfo(szFilePathName).Length; - } - catch - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - if (length <= 0L) - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - try - { - FileStream fileStream = new FileStream(szFilePathName, FileMode.Open); - byte[] numArray1 = new byte[14] + public static void SaveLocalPreset( + string szFilePathName, + RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramBaseSystem, + RuntimeUtils.ConfigProxy.ParamOfMusicMode paramMusicMode, + RuntimeUtils.ConfigProxy.ParamOfMovieMode paramMovieMode, + RuntimeUtils.ConfigProxy.ParamOfFreestyle paramFreestyle) { - (byte) 86, - (byte) 105, - (byte) 80, - (byte) 69, - (byte) 82, - (byte) 52, - (byte) 87, - (byte) 105, - (byte) 110, - (byte) 100, - (byte) 111, - (byte) 119, - (byte) 115, - (byte) 88 - }; - byte[] buffer = new byte[14]; - if (fileStream.Read(buffer, 0, buffer.Length) != buffer.Length) + byte[] buffer1 = ParameterSerialize(paramBaseSystem); + byte[] buffer2 = ParameterSerialize(paramMusicMode); + byte[] buffer3 = ParameterSerialize(paramMovieMode); + byte[] buffer4 = ParameterSerialize(paramFreestyle); + if (buffer1 == null || buffer2 == null || buffer3 == null) + return; + if (buffer4 == null) + return; + try + { + FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); + byte[] buffer5 = new byte[14] + { + 86, + 105, + 80, + 69, + 82, + 52, + 87, + 105, + 110, + 100, + 111, + 119, + 115, + 88 + }; + fileStream.Write(buffer5, 0, buffer5.Length); + fileStream.WriteByte(1); + fileStream.WriteByte(1); + fileStream.WriteByte(1); + fileStream.WriteByte(1); + fileStream.Write(buffer1, 0, buffer1.Length); + fileStream.Write(buffer2, 0, buffer2.Length); + fileStream.Write(buffer3, 0, buffer3.Length); + fileStream.Write(buffer4, 0, buffer4.Length); + fileStream.Flush(); + fileStream.Close(); + } + catch (Exception ex) + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.AppendLine(GlobalMessages.ERROR); + stringBuilder.AppendLine(GlobalMessages.TECHNICAL_INFO); + stringBuilder.AppendLine(ex.Message); + _ = (int)MessageBox.Show(stringBuilder.ToString(), GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + } + + public static bool SavePreset( + string szFilePathName, + RuntimeUtils.ConfigProxy.ParamOfMusicMode paramMusicMode) { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; + byte[] buffer1 = ParameterSerialize(paramMusicMode); + if (buffer1 == null) + return false; + try + { + FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); + byte[] buffer2 = new byte[14] + { + 86, + 105, + 80, + 69, + 82, + 52, + 87, + 105, + 110, + 100, + 111, + 119, + 115, + 88 + }; + fileStream.Write(buffer2, 0, buffer2.Length); + fileStream.WriteByte(0); + fileStream.WriteByte(1); + fileStream.WriteByte(0); + fileStream.WriteByte(0); + fileStream.Write(buffer1, 0, buffer1.Length); + fileStream.Flush(); + fileStream.Close(); + return true; + } + catch + { + return false; + } } - for (int index = 0; index < numArray1.Length; ++index) + + public static bool SavePreset( + string szFilePathName, + RuntimeUtils.ConfigProxy.ParamOfMovieMode paramMovieMode) { - if ((int) buffer[index] != (int) numArray1[index]) - { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } + byte[] buffer1 = ParameterSerialize(paramMovieMode); + if (buffer1 == null) + return false; + try + { + FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); + byte[] buffer2 = new byte[14] + { + 86, + 105, + 80, + 69, + 82, + 52, + 87, + 105, + 110, + 100, + 111, + 119, + 115, + 88 + }; + fileStream.Write(buffer2, 0, buffer2.Length); + fileStream.WriteByte(0); + fileStream.WriteByte(0); + fileStream.WriteByte(1); + fileStream.WriteByte(0); + fileStream.Write(buffer1, 0, buffer1.Length); + fileStream.Flush(); + fileStream.Close(); + return true; + } + catch + { + return false; + } } - int num1 = fileStream.ReadByte(); - int num2 = fileStream.ReadByte(); - int num3 = fileStream.ReadByte(); - int num4 = fileStream.ReadByte(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - long num5 = 18; - if (num1 == 1) - num5 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem)); - if (num2 == 1) - num5 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMusicMode)); - if (num3 == 1) - num5 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMovieMode)); - if (num4 == 1) - num5 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfFreestyle)); - if (num5 != length) + + public static bool SavePreset( + string szFilePathName, + RuntimeUtils.ConfigProxy.ParamOfFreestyle paramFreestyle) { - long num6 = 18; - if (num1 == 1) - num6 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1)); - if (num2 == 1) - num6 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMusicMode)); - if (num3 == 1) - num6 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMovieMode)); - if (num4 == 1) - num6 += (long) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfFreestyle)); - if (num6 == length) - { - if (num1 == 1) + byte[] buffer1 = ParameterSerialize(paramFreestyle); + if (buffer1 == null) + return false; + try { - byte[] numArray2 = new byte[Marshal.SizeOf((object) new RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1())]; - if (fileStream.Read(numArray2, 0, numArray2.Length) != numArray2.Length) - { + FileStream fileStream = new FileStream(szFilePathName, FileMode.Create); + byte[] buffer2 = new byte[14] + { + 86, + 105, + 80, + 69, + 82, + 52, + 87, + 105, + 110, + 100, + 111, + 119, + 115, + 88 + }; + fileStream.Write(buffer2, 0, buffer2.Length); + fileStream.WriteByte(0); + fileStream.WriteByte(0); + fileStream.WriteByte(0); + fileStream.WriteByte(1); + fileStream.Write(buffer1, 0, buffer1.Length); + fileStream.Flush(); fileStream.Close(); + return true; + } + catch + { + return false; + } + } + + public static bool ReadPreset( + string szFilePathName, + ref RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramBaseSystem, + ref RuntimeUtils.ConfigProxy.ParamOfMusicMode paramMusicMode, + ref RuntimeUtils.ConfigProxy.ParamOfMovieMode paramMovieMode, + ref RuntimeUtils.ConfigProxy.ParamOfFreestyle paramFreestyle, + out bool bPBaseSystem, + out bool bPMusicMode, + out bool bPMovieMode, + out bool bPFreestyle) + { + if (szFilePathName == null) + { bPBaseSystem = false; bPMusicMode = false; bPMovieMode = false; bPFreestyle = false; return false; - } - RuntimeUtils.ConfigProxy._ParamOfBaseSystem_1_0_1 paramOfBaseSystem101 = Parameters.DeserializeParamOfBaseSystem_1_0_1(numArray2); - Parameters.LoadDefaultParameter(ref paramBaseSystem); - paramBaseSystem.m_bEffectEnabled = paramOfBaseSystem101.m_bEffectEnabled; - paramBaseSystem.m_nEffectMode = paramOfBaseSystem101.m_nEffectMode; - paramBaseSystem.m_nFilterShortLen = paramOfBaseSystem101.m_nFilterShortLen; - paramBaseSystem.m_nFilterMediumLen = paramOfBaseSystem101.m_nFilterMediumLen; - paramBaseSystem.m_nFilterLongLen = paramOfBaseSystem101.m_nFilterLongLen; - paramBaseSystem.m_rChannelPan = paramOfBaseSystem101.m_rChannelPan; - bPBaseSystem = true; } - if (num2 == 1) + if (szFilePathName.Length <= 0) { - byte[] numArray3 = new byte[Marshal.SizeOf((object) paramMusicMode)]; - if (fileStream.Read(numArray3, 0, numArray3.Length) != numArray3.Length) - { - fileStream.Close(); bPBaseSystem = false; bPMusicMode = false; bPMovieMode = false; bPFreestyle = false; return false; - } - paramMusicMode = Parameters.DeserializeParamOfMusicMode(numArray3); - bPMusicMode = true; } - if (num3 == 1) + if (!File.Exists(szFilePathName)) + { + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + long length; + try + { + length = new FileInfo(szFilePathName).Length; + } + catch + { + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + if (length <= 0L) { - byte[] numArray4 = new byte[Marshal.SizeOf((object) paramMovieMode)]; - if (fileStream.Read(numArray4, 0, numArray4.Length) != numArray4.Length) - { - fileStream.Close(); bPBaseSystem = false; bPMusicMode = false; bPMovieMode = false; bPFreestyle = false; return false; - } - paramMovieMode = Parameters.DeserializeParamOfMovieMode(numArray4); - bPMovieMode = true; } - if (num4 == 1) + try { - byte[] numArray5 = new byte[Marshal.SizeOf((object) paramFreestyle)]; - if (fileStream.Read(numArray5, 0, numArray5.Length) != numArray5.Length) - { + FileStream fileStream = new FileStream(szFilePathName, FileMode.Open); + byte[] numArray1 = new byte[14] + { + 86, + 105, + 80, + 69, + 82, + 52, + 87, + 105, + 110, + 100, + 111, + 119, + 115, + 88 + }; + byte[] buffer = new byte[14]; + if (fileStream.Read(buffer, 0, buffer.Length) != buffer.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + for (int index = 0; index < numArray1.Length; ++index) + { + if (buffer[index] != numArray1[index]) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + } + int num1 = fileStream.ReadByte(); + int num2 = fileStream.ReadByte(); + int num3 = fileStream.ReadByte(); + int num4 = fileStream.ReadByte(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + long num5 = 18; + if (num1 == 1) + num5 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfBaseSystem)); + if (num2 == 1) + num5 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfMusicMode)); + if (num3 == 1) + num5 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfMovieMode)); + if (num4 == 1) + num5 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfFreestyle)); + if (num5 != length) + { + long num6 = 18; + if (num1 == 1) + num6 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1)); + if (num2 == 1) + num6 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfMusicMode)); + if (num3 == 1) + num6 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfMovieMode)); + if (num4 == 1) + num6 += Marshal.SizeOf(typeof(RuntimeUtils.ConfigProxy.ParamOfFreestyle)); + if (num6 == length) + { + if (num1 == 1) + { + byte[] numArray2 = new byte[Marshal.SizeOf((object)new RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1())]; + if (fileStream.Read(numArray2, 0, numArray2.Length) != numArray2.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + RuntimeUtils.ConfigProxy.ParamOfBaseSystem_1_0_1 paramOfBaseSystem101 = DeserializeParamOfBaseSystem_1_0_1(numArray2); + LoadDefaultParameter(ref paramBaseSystem); + paramBaseSystem.m_bEffectEnabled = paramOfBaseSystem101.m_bEffectEnabled; + paramBaseSystem.m_nEffectMode = paramOfBaseSystem101.m_nEffectMode; + paramBaseSystem.m_nFilterShortLen = paramOfBaseSystem101.m_nFilterShortLen; + paramBaseSystem.m_nFilterMediumLen = paramOfBaseSystem101.m_nFilterMediumLen; + paramBaseSystem.m_nFilterLongLen = paramOfBaseSystem101.m_nFilterLongLen; + paramBaseSystem.m_rChannelPan = paramOfBaseSystem101.m_rChannelPan; + bPBaseSystem = true; + } + if (num2 == 1) + { + byte[] numArray3 = new byte[Marshal.SizeOf((object)paramMusicMode)]; + if (fileStream.Read(numArray3, 0, numArray3.Length) != numArray3.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramMusicMode = DeserializeParamOfMusicMode(numArray3); + bPMusicMode = true; + } + if (num3 == 1) + { + byte[] numArray4 = new byte[Marshal.SizeOf((object)paramMovieMode)]; + if (fileStream.Read(numArray4, 0, numArray4.Length) != numArray4.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramMovieMode = DeserializeParamOfMovieMode(numArray4); + bPMovieMode = true; + } + if (num4 == 1) + { + byte[] numArray5 = new byte[Marshal.SizeOf((object)paramFreestyle)]; + if (fileStream.Read(numArray5, 0, numArray5.Length) != numArray5.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramFreestyle = DeserializeParamOfFreestyle(numArray5); + bPFreestyle = true; + } + fileStream.Close(); + if (bPBaseSystem && bPMusicMode && bPMovieMode && bPFreestyle) + SaveLocalPreset(szFilePathName, paramBaseSystem, paramMusicMode, paramMovieMode, paramFreestyle); + return true; + } + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + if (num1 == 1) + { + byte[] numArray6 = new byte[Marshal.SizeOf((object)paramBaseSystem)]; + if (fileStream.Read(numArray6, 0, numArray6.Length) != numArray6.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramBaseSystem = DeserializeParamOfBaseSystem(numArray6); + bPBaseSystem = true; + } + if (num2 == 1) + { + byte[] numArray7 = new byte[Marshal.SizeOf((object)paramMusicMode)]; + if (fileStream.Read(numArray7, 0, numArray7.Length) != numArray7.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramMusicMode = DeserializeParamOfMusicMode(numArray7); + bPMusicMode = true; + } + if (num3 == 1) + { + byte[] numArray8 = new byte[Marshal.SizeOf((object)paramMovieMode)]; + if (fileStream.Read(numArray8, 0, numArray8.Length) != numArray8.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramMovieMode = DeserializeParamOfMovieMode(numArray8); + bPMovieMode = true; + } + if (num4 == 1) + { + byte[] numArray9 = new byte[Marshal.SizeOf((object)paramFreestyle)]; + if (fileStream.Read(numArray9, 0, numArray9.Length) != numArray9.Length) + { + fileStream.Close(); + bPBaseSystem = false; + bPMusicMode = false; + bPMovieMode = false; + bPFreestyle = false; + return false; + } + paramFreestyle = DeserializeParamOfFreestyle(numArray9); + bPFreestyle = true; + } fileStream.Close(); + return true; + } + catch + { bPBaseSystem = false; bPMusicMode = false; bPMovieMode = false; bPFreestyle = false; return false; - } - paramFreestyle = Parameters.DeserializeParamOfFreestyle(numArray5); - bPFreestyle = true; } - fileStream.Close(); - if (bPBaseSystem && bPMusicMode && bPMovieMode && bPFreestyle) - Parameters.SaveLocalPreset(szFilePathName, paramBaseSystem, paramMusicMode, paramMovieMode, paramFreestyle); - return true; - } - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; } - if (num1 == 1) + + public static float LOG2PARAM(float x, float mn, float mx) { - byte[] numArray6 = new byte[Marshal.SizeOf((object) paramBaseSystem)]; - if (fileStream.Read(numArray6, 0, numArray6.Length) != numArray6.Length) - { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - paramBaseSystem = Parameters.DeserializeParamOfBaseSystem(numArray6); - bPBaseSystem = true; + return (float)((Math.Log((double)x) - Math.Log((double)mn)) / (Math.Log((double)mx) - Math.Log((double)mn))); } - if (num2 == 1) + + public static float LIN2PARAM(float x, float mn, float mx) { - byte[] numArray7 = new byte[Marshal.SizeOf((object) paramMusicMode)]; - if (fileStream.Read(numArray7, 0, numArray7.Length) != numArray7.Length) - { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - paramMusicMode = Parameters.DeserializeParamOfMusicMode(numArray7); - bPMusicMode = true; + return (float)(((double)x - (double)mn) / ((double)mx - (double)mn)); } - if (num3 == 1) + + public static float PARAM2LOG(float x, float mn, float mx) { - byte[] numArray8 = new byte[Marshal.SizeOf((object) paramMovieMode)]; - if (fileStream.Read(numArray8, 0, numArray8.Length) != numArray8.Length) - { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - paramMovieMode = Parameters.DeserializeParamOfMovieMode(numArray8); - bPMovieMode = true; + return (float)Math.Exp(Math.Log((double)mn) + (double)x * (Math.Log((double)mx) - Math.Log((double)mn))); } - if (num4 == 1) + + public static float PARAM2LIN(float x, float mn, float mx) { - byte[] numArray9 = new byte[Marshal.SizeOf((object) paramFreestyle)]; - if (fileStream.Read(numArray9, 0, numArray9.Length) != numArray9.Length) - { - fileStream.Close(); - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - paramFreestyle = Parameters.DeserializeParamOfFreestyle(numArray9); - bPFreestyle = true; + return mn + x * (mx - mn); } - fileStream.Close(); - return true; - } - catch - { - bPBaseSystem = false; - bPMusicMode = false; - bPMovieMode = false; - bPFreestyle = false; - return false; - } - } - - public static float LOG2PARAM(float x, float mn, float mx) => (float) ((Math.Log((double) x) - Math.Log((double) mn)) / (Math.Log((double) mx) - Math.Log((double) mn))); - - public static float LIN2PARAM(float x, float mn, float mx) => (float) (((double) x - (double) mn) / ((double) mx - (double) mn)); - - public static float PARAM2LOG(float x, float mn, float mx) => (float) Math.Exp(Math.Log((double) mn) + (double) x * (Math.Log((double) mx) - Math.Log((double) mn))); - - public static float PARAM2LIN(float x, float mn, float mx) => mn + x * (mx - mn); - public static void LoadDefaultParameter( - ref RuntimeUtils.ConfigProxy._ParamOfBaseSystem sParameter) - { - sParameter.m_bEffectEnabled = 0; - sParameter.m_nEffectMode = 0U; - sParameter.m_nFilterShortLen = 4096; - sParameter.m_nFilterMediumLen = 0; - sParameter.m_nFilterLongLen = 0; - sParameter.m_rChannelPan = 0.0f; - sParameter.m_bVirtApplied = 0; - sParameter.m_rpChannelAngle_00 = new float[9]; - sParameter.m_rpChannelAngle_01 = new float[9]; - sParameter.m_rpChannelAngle_02 = new float[9]; - sParameter.m_rpChannelAngle_03 = new float[9]; - sParameter.m_rpChannelAngle_04 = new float[9]; - sParameter.m_rpChannelAngle_05 = new float[9]; - sParameter.m_rpChannelAngle_06 = new float[9]; - sParameter.m_rpChannelAngle_07 = new float[9]; - sParameter.m_rpChannelAngle_08 = new float[9]; - sParameter.m_rpChannelAngle_00[0] = 0.0f; - sParameter.m_rpChannelAngle_01[0] = -30f; - sParameter.m_rpChannelAngle_01[1] = 30f; - sParameter.m_rpChannelAngle_02[0] = -90f; - sParameter.m_rpChannelAngle_02[1] = 90f; - sParameter.m_rpChannelAngle_03[0] = -150f; - sParameter.m_rpChannelAngle_03[1] = 150f; - sParameter.m_rpChannelAngle_04[0] = -45f; - sParameter.m_rpChannelAngle_04[1] = 45f; - sParameter.m_rpChannelAngle_04[2] = -135f; - sParameter.m_rpChannelAngle_04[3] = 135f; - sParameter.m_rpChannelAngle_05[0] = -30f; - sParameter.m_rpChannelAngle_05[1] = 30f; - sParameter.m_rpChannelAngle_05[2] = 0.0f; - sParameter.m_rpChannelAngle_05[3] = 0.0f; - sParameter.m_rpChannelAngle_05[4] = -110f; - sParameter.m_rpChannelAngle_05[5] = 110f; - sParameter.m_rpChannelAngle_06[0] = -30f; - sParameter.m_rpChannelAngle_06[1] = 30f; - sParameter.m_rpChannelAngle_06[2] = 0.0f; - sParameter.m_rpChannelAngle_06[3] = 0.0f; - sParameter.m_rpChannelAngle_06[4] = 180f; - sParameter.m_rpChannelAngle_06[5] = -90f; - sParameter.m_rpChannelAngle_06[6] = 90f; - sParameter.m_rpChannelAngle_07[0] = -30f; - sParameter.m_rpChannelAngle_07[1] = 30f; - sParameter.m_rpChannelAngle_07[2] = 0.0f; - sParameter.m_rpChannelAngle_07[3] = 0.0f; - sParameter.m_rpChannelAngle_07[4] = -150f; - sParameter.m_rpChannelAngle_07[5] = 150f; - sParameter.m_rpChannelAngle_07[6] = -90f; - sParameter.m_rpChannelAngle_07[7] = 90f; - sParameter.m_rpChannelAngle_08[0] = -30f; - sParameter.m_rpChannelAngle_08[1] = 30f; - sParameter.m_rpChannelAngle_08[2] = 0.0f; - sParameter.m_rpChannelAngle_08[3] = 0.0f; - sParameter.m_rpChannelAngle_08[4] = -150f; - sParameter.m_rpChannelAngle_08[5] = 150f; - sParameter.m_rpChannelAngle_08[6] = 180f; - sParameter.m_rpChannelAngle_08[7] = -90f; - sParameter.m_rpChannelAngle_08[8] = 90f; - sParameter.m_bEnvRealizeEnabled = 0; - sParameter.m_bEnvRealizePreprocess = 1; - sParameter.m_nEnvRealizePreset = 2; - sParameter.m_rEnvRealizeDrySignal = 1f; - } + public static void LoadDefaultParameter( + ref RuntimeUtils.ConfigProxy.ParamOfBaseSystem sParameter) + { + sParameter.m_bEffectEnabled = 0; + sParameter.m_nEffectMode = 0U; + sParameter.m_nFilterShortLen = 4096; + sParameter.m_nFilterMediumLen = 0; + sParameter.m_nFilterLongLen = 0; + sParameter.m_rChannelPan = 0.0f; + sParameter.m_bVirtApplied = 0; + sParameter.m_rpChannelAngle_00 = new float[9]; + sParameter.m_rpChannelAngle_01 = new float[9]; + sParameter.m_rpChannelAngle_02 = new float[9]; + sParameter.m_rpChannelAngle_03 = new float[9]; + sParameter.m_rpChannelAngle_04 = new float[9]; + sParameter.m_rpChannelAngle_05 = new float[9]; + sParameter.m_rpChannelAngle_06 = new float[9]; + sParameter.m_rpChannelAngle_07 = new float[9]; + sParameter.m_rpChannelAngle_08 = new float[9]; + sParameter.m_rpChannelAngle_00[0] = 0.0f; + sParameter.m_rpChannelAngle_01[0] = -30f; + sParameter.m_rpChannelAngle_01[1] = 30f; + sParameter.m_rpChannelAngle_02[0] = -90f; + sParameter.m_rpChannelAngle_02[1] = 90f; + sParameter.m_rpChannelAngle_03[0] = -150f; + sParameter.m_rpChannelAngle_03[1] = 150f; + sParameter.m_rpChannelAngle_04[0] = -45f; + sParameter.m_rpChannelAngle_04[1] = 45f; + sParameter.m_rpChannelAngle_04[2] = -135f; + sParameter.m_rpChannelAngle_04[3] = 135f; + sParameter.m_rpChannelAngle_05[0] = -30f; + sParameter.m_rpChannelAngle_05[1] = 30f; + sParameter.m_rpChannelAngle_05[2] = 0.0f; + sParameter.m_rpChannelAngle_05[3] = 0.0f; + sParameter.m_rpChannelAngle_05[4] = -110f; + sParameter.m_rpChannelAngle_05[5] = 110f; + sParameter.m_rpChannelAngle_06[0] = -30f; + sParameter.m_rpChannelAngle_06[1] = 30f; + sParameter.m_rpChannelAngle_06[2] = 0.0f; + sParameter.m_rpChannelAngle_06[3] = 0.0f; + sParameter.m_rpChannelAngle_06[4] = 180f; + sParameter.m_rpChannelAngle_06[5] = -90f; + sParameter.m_rpChannelAngle_06[6] = 90f; + sParameter.m_rpChannelAngle_07[0] = -30f; + sParameter.m_rpChannelAngle_07[1] = 30f; + sParameter.m_rpChannelAngle_07[2] = 0.0f; + sParameter.m_rpChannelAngle_07[3] = 0.0f; + sParameter.m_rpChannelAngle_07[4] = -150f; + sParameter.m_rpChannelAngle_07[5] = 150f; + sParameter.m_rpChannelAngle_07[6] = -90f; + sParameter.m_rpChannelAngle_07[7] = 90f; + sParameter.m_rpChannelAngle_08[0] = -30f; + sParameter.m_rpChannelAngle_08[1] = 30f; + sParameter.m_rpChannelAngle_08[2] = 0.0f; + sParameter.m_rpChannelAngle_08[3] = 0.0f; + sParameter.m_rpChannelAngle_08[4] = -150f; + sParameter.m_rpChannelAngle_08[5] = 150f; + sParameter.m_rpChannelAngle_08[6] = 180f; + sParameter.m_rpChannelAngle_08[7] = -90f; + sParameter.m_rpChannelAngle_08[8] = 90f; + sParameter.m_bEnvRealizeEnabled = 0; + sParameter.m_bEnvRealizePreprocess = 1; + sParameter.m_nEnvRealizePreset = 2; + sParameter.m_rEnvRealizeDrySignal = 1f; + } - public static void LoadDefaultParameter( - ref RuntimeUtils.ConfigProxy._ParamOfMusicMode sParameter) - { - sParameter.m_rPreVolume = 1f; - sParameter.m_bConvolverEnabled = 0; - sParameter.m_szConvolverIR = new char[260]; - for (int index = 0; index < 256; ++index) - sParameter.m_szConvolverIR[index] = char.MinValue; - sParameter.m_rConvolverIRGain = 1f; - sParameter.m_bViPERBassEnabled = 0; - sParameter.m_nViPERBassSpkSize = 60; - sParameter.m_rViPERBassFactor = 0.0f; - sParameter.m_bViPERClarityEnabled = 0; - sParameter.m_nViPERClarityMode = 0; - sParameter.m_rViPERClarityFactor = 0.0f; - sParameter.m_bSurroundEnabled = 0; - sParameter.m_nVHERoomSize = 0; - sParameter.m_bReverbEnabled = 0; - sParameter.m_rReverbSize = 0.0f; - sParameter.m_rReverbPredelay = 0.0f; - sParameter.m_rReverbDamping = 0.0f; - sParameter.m_rReverbDensity = 0.0f; - sParameter.m_rReverbBandwidth = 1f; - sParameter.m_rReverbDecay = 0.0f; - sParameter.m_rReverbEarlyMix = 0.0f; - sParameter.m_rReverbMix = 0.0f; - sParameter.m_rReverbGain = 1f; - sParameter.m_bEqualizerEnabled = 0; - sParameter.m_rpEqualizerBands = new float[18]; - for (int index = 0; index < 18; ++index) - sParameter.m_rpEqualizerBands[index] = 1f; - sParameter.m_bCompressorEnabled = 0; - sParameter.m_bCompAutoKnee = 1; - sParameter.m_bCompAutoGain = 1; - sParameter.m_bCompAutoAttack = 1; - sParameter.m_bCompAutoRelease = 1; - sParameter.m_rCompThreshold = 0.0f; - sParameter.m_rCompRatio = 0.0f; - sParameter.m_rCompKneeWidth = 0.0f; - sParameter.m_rCompGain = 0.0f; - sParameter.m_rCompAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); - sParameter.m_rCompRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); - sParameter.m_bCureEnabled = 0; - sParameter.m_uiCureLevel = 6226570U; - sParameter.m_bTubeEnabled = 0; - sParameter.m_rPostVolume = 1f; - } + public static void LoadDefaultParameter( + ref RuntimeUtils.ConfigProxy.ParamOfMusicMode sParameter) + { + sParameter.m_rPreVolume = 1f; + sParameter.m_bConvolverEnabled = 0; + sParameter.m_szConvolverIR = new char[260]; + for (int index = 0; index < 256; ++index) + sParameter.m_szConvolverIR[index] = char.MinValue; + sParameter.m_rConvolverIRGain = 1f; + sParameter.m_bViPERBassEnabled = 0; + sParameter.m_nViPERBassSpkSize = 60; + sParameter.m_rViPERBassFactor = 0.0f; + sParameter.m_bViPERClarityEnabled = 0; + sParameter.m_nViPERClarityMode = 0; + sParameter.m_rViPERClarityFactor = 0.0f; + sParameter.m_bSurroundEnabled = 0; + sParameter.m_nVHERoomSize = 0; + sParameter.m_bReverbEnabled = 0; + sParameter.m_rReverbSize = 0.0f; + sParameter.m_rReverbPredelay = 0.0f; + sParameter.m_rReverbDamping = 0.0f; + sParameter.m_rReverbDensity = 0.0f; + sParameter.m_rReverbBandwidth = 1f; + sParameter.m_rReverbDecay = 0.0f; + sParameter.m_rReverbEarlyMix = 0.0f; + sParameter.m_rReverbMix = 0.0f; + sParameter.m_rReverbGain = 1f; + sParameter.m_bEqualizerEnabled = 0; + sParameter.m_rpEqualizerBands = new float[18]; + for (int index = 0; index < 18; ++index) + sParameter.m_rpEqualizerBands[index] = 1f; + sParameter.m_bCompressorEnabled = 0; + sParameter.m_bCompAutoKnee = 1; + sParameter.m_bCompAutoGain = 1; + sParameter.m_bCompAutoAttack = 1; + sParameter.m_bCompAutoRelease = 1; + sParameter.m_rCompThreshold = 0.0f; + sParameter.m_rCompRatio = 0.0f; + sParameter.m_rCompKneeWidth = 0.0f; + sParameter.m_rCompGain = 0.0f; + sParameter.m_rCompAttack = LOG2PARAM(0.005f, 0.0001f, 0.2f); + sParameter.m_rCompRelease = LOG2PARAM(0.05f, 0.005f, 2f); + sParameter.m_bCureEnabled = 0; + sParameter.m_uiCureLevel = 6226570U; + sParameter.m_bTubeEnabled = 0; + sParameter.m_rPostVolume = 1f; + } - public static void LoadDefaultParameter( - ref RuntimeUtils.ConfigProxy._ParamOfMovieMode sParameter) - { - sParameter.m_rPreVolume = 1f; - sParameter.m_bConvolverEnabled = 0; - sParameter.m_szConvolverIR = new char[260]; - for (int index = 0; index < 256; ++index) - sParameter.m_szConvolverIR[index] = char.MinValue; - sParameter.m_rConvolverIRGain = 1f; - sParameter.m_bViPERBassEnabled = 0; - sParameter.m_nViPERBassSpkSize = 60; - sParameter.m_rViPERBassFactor = 0.0f; - sParameter.m_bViPERClarityEnabled = 0; - sParameter.m_rViPERClarityFactor = 0.0f; - sParameter.m_bSurroundEnabled = 0; - sParameter.m_r3DSurroundStereo = 1f; - sParameter.m_r3DSurroundImage = 1f; - sParameter.m_bReverbEnabled = 0; - sParameter.m_rReverbSize = 0.0f; - sParameter.m_rReverbPredelay = 0.0f; - sParameter.m_rReverbDamping = 0.0f; - sParameter.m_rReverbDensity = 0.0f; - sParameter.m_rReverbBandwidth = 1f; - sParameter.m_rReverbDecay = 0.0f; - sParameter.m_rReverbEarlyMix = 0.0f; - sParameter.m_rReverbMix = 0.0f; - sParameter.m_rReverbGain = 1f; - sParameter.m_bEqualizerEnabled = 0; - sParameter.m_rpEqualizerBands = new float[18]; - for (int index = 0; index < 18; ++index) - sParameter.m_rpEqualizerBands[index] = 1f; - sParameter.m_bCompressorEnabled = 0; - sParameter.m_bCompAutoKnee = 1; - sParameter.m_bCompAutoGain = 1; - sParameter.m_bCompAutoAttack = 1; - sParameter.m_bCompAutoRelease = 1; - sParameter.m_rCompThreshold = 0.0f; - sParameter.m_rCompRatio = 0.0f; - sParameter.m_rCompKneeWidth = 0.0f; - sParameter.m_rCompGain = 0.0f; - sParameter.m_rCompAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); - sParameter.m_rCompRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); - sParameter.m_bSmartVolumeEnabled = 0; - sParameter.m_rSVRatio = 0.5f; - sParameter.m_rSVVolume = 1f; - sParameter.m_rSVMaxGain = 4f; - sParameter.m_rPostVolume = 1f; - } + public static void LoadDefaultParameter( + ref RuntimeUtils.ConfigProxy.ParamOfMovieMode sParameter) + { + sParameter.m_rPreVolume = 1f; + sParameter.m_bConvolverEnabled = 0; + sParameter.m_szConvolverIR = new char[260]; + for (int index = 0; index < 256; ++index) + sParameter.m_szConvolverIR[index] = char.MinValue; + sParameter.m_rConvolverIRGain = 1f; + sParameter.m_bViPERBassEnabled = 0; + sParameter.m_nViPERBassSpkSize = 60; + sParameter.m_rViPERBassFactor = 0.0f; + sParameter.m_bViPERClarityEnabled = 0; + sParameter.m_rViPERClarityFactor = 0.0f; + sParameter.m_bSurroundEnabled = 0; + sParameter.m_r3DSurroundStereo = 1f; + sParameter.m_r3DSurroundImage = 1f; + sParameter.m_bReverbEnabled = 0; + sParameter.m_rReverbSize = 0.0f; + sParameter.m_rReverbPredelay = 0.0f; + sParameter.m_rReverbDamping = 0.0f; + sParameter.m_rReverbDensity = 0.0f; + sParameter.m_rReverbBandwidth = 1f; + sParameter.m_rReverbDecay = 0.0f; + sParameter.m_rReverbEarlyMix = 0.0f; + sParameter.m_rReverbMix = 0.0f; + sParameter.m_rReverbGain = 1f; + sParameter.m_bEqualizerEnabled = 0; + sParameter.m_rpEqualizerBands = new float[18]; + for (int index = 0; index < 18; ++index) + sParameter.m_rpEqualizerBands[index] = 1f; + sParameter.m_bCompressorEnabled = 0; + sParameter.m_bCompAutoKnee = 1; + sParameter.m_bCompAutoGain = 1; + sParameter.m_bCompAutoAttack = 1; + sParameter.m_bCompAutoRelease = 1; + sParameter.m_rCompThreshold = 0.0f; + sParameter.m_rCompRatio = 0.0f; + sParameter.m_rCompKneeWidth = 0.0f; + sParameter.m_rCompGain = 0.0f; + sParameter.m_rCompAttack = LOG2PARAM(0.005f, 0.0001f, 0.2f); + sParameter.m_rCompRelease = LOG2PARAM(0.05f, 0.005f, 2f); + sParameter.m_bSmartVolumeEnabled = 0; + sParameter.m_rSVRatio = 0.5f; + sParameter.m_rSVVolume = 1f; + sParameter.m_rSVMaxGain = 4f; + sParameter.m_rPostVolume = 1f; + } - public static void LoadDefaultParameter( - ref RuntimeUtils.ConfigProxy._ParamOfFreestyle sParameter) - { - sParameter.m_rPreVolume = 1f; - sParameter.m_bConvolverEnabled = 0; - sParameter.m_szConvolverIR = new char[260]; - for (int index = 0; index < 256; ++index) - sParameter.m_szConvolverIR[index] = char.MinValue; - sParameter.m_rConvolverIRGain = 1f; - sParameter.m_bViPERBassEnabled = 0; - sParameter.m_nViPERBassMode = 0; - sParameter.m_nViPERBassSpkSize = 60; - sParameter.m_rViPERBassFactor = 0.0f; - sParameter.m_bViPERClarityEnabled = 0; - sParameter.m_nViPERClarityMode = 0; - sParameter.m_rViPERClarityFactor = 0.0f; - sParameter.m_b3DSurroundEnabled = 0; - sParameter.m_r3DSurroundStereo = 1f; - sParameter.m_r3DSurroundImage = 1f; - sParameter.m_bVHESurroundEnabled = 0; - sParameter.m_nVHERoomSize = 0; - sParameter.m_bReverbEnabled = 0; - sParameter.m_rReverbSize = 0.0f; - sParameter.m_rReverbPredelay = 0.0f; - sParameter.m_rReverbDamping = 0.0f; - sParameter.m_rReverbDensity = 0.0f; - sParameter.m_rReverbBandwidth = 1f; - sParameter.m_rReverbDecay = 0.0f; - sParameter.m_rReverbEarlyMix = 0.0f; - sParameter.m_rReverbMix = 0.0f; - sParameter.m_rReverbGain = 1f; - sParameter.m_bEqualizerEnabled = 0; - sParameter.m_rpEqualizerBands = new float[18]; - for (int index = 0; index < 18; ++index) - sParameter.m_rpEqualizerBands[index] = 1f; - sParameter.m_bCompressorEnabled = 0; - sParameter.m_bCompAutoKnee = 1; - sParameter.m_bCompAutoGain = 1; - sParameter.m_bCompAutoAttack = 1; - sParameter.m_bCompAutoRelease = 1; - sParameter.m_bCompAutoMetaNoClipping = 1; - sParameter.m_rCompThreshold = 0.0f; - sParameter.m_rCompRatio = 0.0f; - sParameter.m_rCompKneeWidth = 0.0f; - sParameter.m_rCompGain = 0.0f; - sParameter.m_rCompAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); - sParameter.m_rCompRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); - sParameter.m_rCompMetaKneeMult = Parameters.LIN2PARAM(2f, 0.0f, 4f); - sParameter.m_rCompMetaMaxAttack = Parameters.LOG2PARAM(0.08f, 0.0001f, 0.2f); - sParameter.m_rCompMetaMaxRelease = Parameters.LOG2PARAM(1f, 0.005f, 2f); - sParameter.m_rCompMetaCrest = Parameters.LOG2PARAM(0.2f, 0.005f, 2f); - sParameter.m_rCompMetaAdapt = Parameters.LOG2PARAM(2.5f, 1f, 4f); - sParameter.m_bSmartVolumeEnabled = 0; - sParameter.m_rSVRatio = 0.5f; - sParameter.m_rSVVolume = 1f; - sParameter.m_rSVMaxGain = 4f; - sParameter.m_bCureEnabled = 0; - sParameter.m_uiCureLevel = 6226570U; - sParameter.m_bTubeEnabled = 0; - sParameter.m_rPostVolume = 1f; + public static void LoadDefaultParameter( + ref RuntimeUtils.ConfigProxy.ParamOfFreestyle sParameter) + { + sParameter.m_rPreVolume = 1f; + sParameter.m_bConvolverEnabled = 0; + sParameter.m_szConvolverIR = new char[260]; + for (int index = 0; index < 256; ++index) + sParameter.m_szConvolverIR[index] = char.MinValue; + sParameter.m_rConvolverIRGain = 1f; + sParameter.m_bViPERBassEnabled = 0; + sParameter.m_nViPERBassMode = 0; + sParameter.m_nViPERBassSpkSize = 60; + sParameter.m_rViPERBassFactor = 0.0f; + sParameter.m_bViPERClarityEnabled = 0; + sParameter.m_nViPERClarityMode = 0; + sParameter.m_rViPERClarityFactor = 0.0f; + sParameter.m_b3DSurroundEnabled = 0; + sParameter.m_r3DSurroundStereo = 1f; + sParameter.m_r3DSurroundImage = 1f; + sParameter.m_bVHESurroundEnabled = 0; + sParameter.m_nVHERoomSize = 0; + sParameter.m_bReverbEnabled = 0; + sParameter.m_rReverbSize = 0.0f; + sParameter.m_rReverbPredelay = 0.0f; + sParameter.m_rReverbDamping = 0.0f; + sParameter.m_rReverbDensity = 0.0f; + sParameter.m_rReverbBandwidth = 1f; + sParameter.m_rReverbDecay = 0.0f; + sParameter.m_rReverbEarlyMix = 0.0f; + sParameter.m_rReverbMix = 0.0f; + sParameter.m_rReverbGain = 1f; + sParameter.m_bEqualizerEnabled = 0; + sParameter.m_rpEqualizerBands = new float[18]; + for (int index = 0; index < 18; ++index) + sParameter.m_rpEqualizerBands[index] = 1f; + sParameter.m_bCompressorEnabled = 0; + sParameter.m_bCompAutoKnee = 1; + sParameter.m_bCompAutoGain = 1; + sParameter.m_bCompAutoAttack = 1; + sParameter.m_bCompAutoRelease = 1; + sParameter.m_bCompAutoMetaNoClipping = 1; + sParameter.m_rCompThreshold = 0.0f; + sParameter.m_rCompRatio = 0.0f; + sParameter.m_rCompKneeWidth = 0.0f; + sParameter.m_rCompGain = 0.0f; + sParameter.m_rCompAttack = LOG2PARAM(0.005f, 0.0001f, 0.2f); + sParameter.m_rCompRelease = LOG2PARAM(0.05f, 0.005f, 2f); + sParameter.m_rCompMetaKneeMult = LIN2PARAM(2f, 0.0f, 4f); + sParameter.m_rCompMetaMaxAttack = LOG2PARAM(0.08f, 0.0001f, 0.2f); + sParameter.m_rCompMetaMaxRelease = LOG2PARAM(1f, 0.005f, 2f); + sParameter.m_rCompMetaCrest = LOG2PARAM(0.2f, 0.005f, 2f); + sParameter.m_rCompMetaAdapt = LOG2PARAM(2.5f, 1f, 4f); + sParameter.m_bSmartVolumeEnabled = 0; + sParameter.m_rSVRatio = 0.5f; + sParameter.m_rSVVolume = 1f; + sParameter.m_rSVMaxGain = 4f; + sParameter.m_bCureEnabled = 0; + sParameter.m_uiCureLevel = 6226570U; + sParameter.m_bTubeEnabled = 0; + sParameter.m_rPostVolume = 1f; + } } - } } diff --git a/Utils/RuntimeUtils.cs b/Utils/RuntimeUtils.cs index f59cee6..79e6429 100644 --- a/Utils/RuntimeUtils.cs +++ b/Utils/RuntimeUtils.cs @@ -4,711 +4,734 @@ namespace ViPER4WindowsBin.Utils { - public class RuntimeUtils - { - public class GeneralUtils + public class RuntimeUtils { - public static string CharArrayToString(char[] caArray) - { - string str1 = new string(caArray); - if (string.IsNullOrEmpty(str1)) - return ""; - char[] charArray = str1.ToCharArray(); - int length = -1; - for (int index = 0; index < charArray.Length; ++index) + public class GeneralUtils { - if (charArray[index] == char.MinValue) - { - length = index; - break; - } + public static string CharArrayToString(char[] caArray) + { + string str1 = new string(caArray); + if (string.IsNullOrEmpty(str1)) + return ""; + char[] charArray = str1.ToCharArray(); + int length = -1; + for (int index = 0; index < charArray.Length; ++index) + { + if (charArray[index] == char.MinValue) + { + length = index; + break; + } + } + if (length == -1) + return ""; + char[] destinationArray = new char[length]; + Array.Copy(charArray, destinationArray, length); + string str2 = new string(destinationArray); + return string.IsNullOrEmpty(str2) ? "" : str2; + } } - if (length == -1) - return ""; - char[] destinationArray = new char[length]; - Array.Copy((Array) charArray, (Array) destinationArray, length); - string str2 = new string(destinationArray); - return string.IsNullOrEmpty(str2) ? "" : str2; - } - } - public class EqualizerUtils - { - [DllImport("Utils.dll")] - private static extern void EstimateEqualizer( - float[] rpEQBands, - IntPtr rpResponses, - ref int ipResponseLength, - int nBandCount, - int nWindow, - int nType); - - public static float[] EstimateEqualizerResponse(float[] rpEQBands) - { - if (rpEQBands == null) - return (float[]) null; - if (rpEQBands.Length != 18) - return (float[]) null; - int ipResponseLength = 65536; - float[] numArray = new float[ipResponseLength]; - for (int index = 0; index < ipResponseLength; ++index) - numArray[index] = 0.0f; - IntPtr rpResponses = Marshal.UnsafeAddrOfPinnedArrayElement((Array) numArray, 0); - RuntimeUtils.EqualizerUtils.EstimateEqualizer(rpEQBands, rpResponses, ref ipResponseLength, (int) short.MaxValue, 0, 0); - float num1 = 0.0f; - for (int index = 0; index < ipResponseLength; ++index) + public class EqualizerUtils { - if ((double) numArray[index] > (double) num1) - num1 = numArray[index]; + [DllImport("Utils.dll")] + private static extern void EstimateEqualizer( + float[] rpEQBands, + IntPtr rpResponses, + ref int ipResponseLength, + int nBandCount, + int nWindow, + int nType); + + public static float[] EstimateEqualizerResponse(float[] rpEQBands) + { + if (rpEQBands == null) + return null; + if (rpEQBands.Length != 18) + return null; + int ipResponseLength = 65536; + float[] numArray = new float[ipResponseLength]; + for (int index = 0; index < ipResponseLength; ++index) + numArray[index] = 0.0f; + IntPtr rpResponses = Marshal.UnsafeAddrOfPinnedArrayElement((Array)numArray, 0); + EstimateEqualizer(rpEQBands, rpResponses, ref ipResponseLength, short.MaxValue, 0, 0); + float num1 = 0.0f; + for (int index = 0; index < ipResponseLength; ++index) + { + if (numArray[index] > (double)num1) + num1 = numArray[index]; + } + if ((double)num1 <= 1E-08) + { + for (int index = 0; index < ipResponseLength; ++index) + numArray[index] = 0.0f; + } + else + { + float num2 = 1f / num1; + for (int index = 0; index < ipResponseLength; ++index) + { + numArray[index] *= num2; + if (numArray[index] > 1.0) + numArray[index] = 1f; + } + } + float[] destinationArray = new float[ipResponseLength]; + Array.Copy(numArray, destinationArray, ipResponseLength); + return destinationArray; + } } - if ((double) num1 <= 1E-08) + + public class ImpulseResponseUtils { - for (int index = 0; index < ipResponseLength; ++index) - numArray[index] = 0.0f; + [DllImport("Utils.dll", CharSet = CharSet.Unicode)] + private static extern uint GetImpulseResponseLength( + string pszFilePathName, + ref int piChannels); + + [DllImport("Utils.dll", CharSet = CharSet.Unicode)] + private static extern int EstimateImpulseResponse( + string pszFilePathName, + IntPtr rpBuffer, + uint nBufferSize); + + public static float[] EstimateImpulseResponseSample( + string szIRSPathName, + out int nChannelCount) + { + nChannelCount = 0; + int piChannels = 0; + uint impulseResponseLength = GetImpulseResponseLength(szIRSPathName, ref piChannels); + if (impulseResponseLength == 0U || piChannels == 0) + return null; + IntPtr num = Marshal.AllocHGlobal((int)impulseResponseLength * 4); + if (EstimateImpulseResponse(szIRSPathName, num, impulseResponseLength) == 0) + { + Marshal.FreeHGlobal(num); + return null; + } + nChannelCount = piChannels; + float[] destination = new float[(int)(IntPtr)impulseResponseLength]; + Marshal.Copy(num, destination, 0, (int)impulseResponseLength); + Marshal.FreeHGlobal(num); + return destination; + } } - else + + public class EffectDriver { - float num2 = 1f / num1; - for (int index = 0; index < ipResponseLength; ++index) - { - numArray[index] *= num2; - if ((double) numArray[index] > 1.0) - numArray[index] = 1f; - } + [DllImport("ViPER4Windows.dll", CharSet = CharSet.Ansi)] + private static extern uint GetDriverVersion(int nIndex); + + [DllImport("ViPER4Windows.dll", CharSet = CharSet.Ansi)] + private static extern IntPtr GetDriverCodeName(); + + public static uint GetDriverMainVersion() + { + return GetDriverVersion(0); + } + + public static uint GetDriverSubVersion() + { + return GetDriverVersion(1); + } + + public static uint GetDriverExtVersion() + { + return GetDriverVersion(2); + } + + public static string GetVersion() + { + return GetDriverMainVersion().ToString() + "." + GetDriverSubVersion().ToString() + "." + GetDriverExtVersion().ToString(); + } + + public static string GetCodeName() + { + return Marshal.PtrToStringAnsi(GetDriverCodeName()); + } } - float[] destinationArray = new float[ipResponseLength]; - Array.Copy((Array) numArray, (Array) destinationArray, ipResponseLength); - return destinationArray; - } - } - public class ImpulseResponseUtils - { - [DllImport("Utils.dll", CharSet = CharSet.Unicode)] - private static extern uint GetImpulseResponseLength( - string pszFilePathName, - ref int piChannels); - - [DllImport("Utils.dll", CharSet = CharSet.Unicode)] - private static extern int EstimateImpulseResponse( - string pszFilePathName, - IntPtr rpBuffer, - uint nBufferSize); - - public static float[] EstimateImpulseResponseSample( - string szIRSPathName, - out int nChannelCount) - { - nChannelCount = 0; - int piChannels = 0; - uint impulseResponseLength = RuntimeUtils.ImpulseResponseUtils.GetImpulseResponseLength(szIRSPathName, ref piChannels); - if (impulseResponseLength == 0U || piChannels == 0) - return (float[]) null; - IntPtr num = Marshal.AllocHGlobal((int) impulseResponseLength * 4); - if (RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponse(szIRSPathName, num, impulseResponseLength) == 0) + public class ConfigProxy { - Marshal.FreeHGlobal(num); - return (float[]) null; - } - nChannelCount = piChannels; - float[] destination = new float[(int)(IntPtr) impulseResponseLength]; - Marshal.Copy(num, destination, 0, (int) impulseResponseLength); - Marshal.FreeHGlobal(num); - return destination; - } - } + private readonly int kParameterCommitTime = 500; + private ParamOfBaseSystem paramSystem = new ParamOfBaseSystem(); + private ParamOfMusicMode paramMusic = new ParamOfMusicMode(); + private ParamOfMovieMode paramMovie = new ParamOfMovieMode(); + private ParamOfFreestyle paramFreestyle = new ParamOfFreestyle(); + private IntPtr ptrConfigProxy = IntPtr.Zero; + private readonly string szConfigFilePathName = ""; + private Thread thUpdatingThread; + private readonly Mutex mxUpdatingMutex = new Mutex(); + private bool bThreadFinished; + private bool bKillThread; + private ulong u64UpdateSignal; + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int CheckConfigCompatibility(string pszConfigFilePathName); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern uint GetConfigVersion(string pszConfigFilePathName); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern void Update_1_0_1(string pszConfigFilePathName); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern IntPtr CreateProxy(); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern void DestoryProxy(IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int UpdateSystemParameter( + IntPtr pParameter, + uint uiParameterSize, + IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int UpdateMusicParameter( + IntPtr pParameter, + uint uiParameterSize, + IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int UpdateMovieParameter( + IntPtr pParameter, + uint uiParameterSize, + IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int UpdateFreestyleParameter( + IntPtr pParameter, + uint uiParameterSize, + IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern int MarshalSystemParameter( + IntPtr pParameter, + uint uiParameterSize, + IntPtr pInstance); + + [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] + private static extern void Commit(string pszConfigFilePathName, IntPtr pInstance); + + public static bool CheckConfigVersion(string szConfigPathName) + { + return CheckConfigCompatibility(szConfigPathName) != 0; + } - public class EffectDriver - { - [DllImport("ViPER4Windows.dll", CharSet = CharSet.Ansi)] - private static extern uint GetDriverVersion(int nIndex); + public static void UpdateConfigToCurrent(string szConfigPathName) + { + if (GetConfigVersion(szConfigPathName) != 16777217U) + return; + Update_1_0_1(szConfigPathName); + } - [DllImport("ViPER4Windows.dll", CharSet = CharSet.Ansi)] - private static extern IntPtr GetDriverCodeName(); + public ConfigProxy(string szConfigPathName) + { + szConfigFilePathName = szConfigPathName; + Parameters.LoadDefaultParameter(ref paramSystem); + Parameters.LoadDefaultParameter(ref paramMusic); + Parameters.LoadDefaultParameter(ref paramMovie); + Parameters.LoadDefaultParameter(ref paramFreestyle); + ptrConfigProxy = CreateProxy(); + u64UpdateSignal = 0UL; + if (ptrConfigProxy != IntPtr.Zero) + { + thUpdatingThread = new Thread(new ParameterizedThreadStart(UpdatingThread)) + { + IsBackground = true + }; + bThreadFinished = false; + bKillThread = false; + thUpdatingThread.Start(this); + } + else + { + thUpdatingThread = null; + bThreadFinished = true; + bKillThread = false; + } + } - public static uint GetDriverMainVersion() => RuntimeUtils.EffectDriver.GetDriverVersion(0); + ~ConfigProxy() => Dispose(); - public static uint GetDriverSubVersion() => RuntimeUtils.EffectDriver.GetDriverVersion(1); + public void Dispose() + { + if (thUpdatingThread != null) + { + DateTime now = DateTime.Now; + bKillThread = true; + while (!bThreadFinished) + { + if (DateTime.Now.Subtract(now).TotalMilliseconds > 200.0) + { + thUpdatingThread.Abort(); + break; + } + Thread.Sleep(10); + } + } + thUpdatingThread = null; + bThreadFinished = true; + bKillThread = false; + u64UpdateSignal = 0UL; + if (ptrConfigProxy != IntPtr.Zero) + DestoryProxy(ptrConfigProxy); + ptrConfigProxy = IntPtr.Zero; + } - public static uint GetDriverExtVersion() => RuntimeUtils.EffectDriver.GetDriverVersion(2); + public bool ProxyUsable() + { + return !(ptrConfigProxy == IntPtr.Zero); + } - public static string GetVersion() => RuntimeUtils.EffectDriver.GetDriverMainVersion().ToString() + "." + RuntimeUtils.EffectDriver.GetDriverSubVersion().ToString() + "." + RuntimeUtils.EffectDriver.GetDriverExtVersion().ToString(); + public void UpdateParameter( + ParamOfBaseSystem sParameter) + { + mxUpdatingMutex.WaitOne(); + paramSystem = sParameter; + if (ptrConfigProxy == IntPtr.Zero) + { + mxUpdatingMutex.ReleaseMutex(); + } + else + { + IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ParamOfBaseSystem))); + Marshal.StructureToPtr((object)paramSystem, num, false); + MarshalSystemParameter(num, (uint)Marshal.SizeOf(typeof(ParamOfBaseSystem)), ptrConfigProxy); + Marshal.FreeHGlobal(num); + mxUpdatingMutex.ReleaseMutex(); + } + } - public static string GetCodeName() => Marshal.PtrToStringAnsi(RuntimeUtils.EffectDriver.GetDriverCodeName()); - } + public void UpdateParameter( + ParamOfMusicMode sParameter) + { + mxUpdatingMutex.WaitOne(); + paramMusic = sParameter; + if (ptrConfigProxy == IntPtr.Zero) + { + mxUpdatingMutex.ReleaseMutex(); + } + else + { + IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ParamOfMusicMode))); + Marshal.StructureToPtr((object)paramMusic, num, false); + UpdateMusicParameter(num, (uint)Marshal.SizeOf(typeof(ParamOfMusicMode)), ptrConfigProxy); + Marshal.FreeHGlobal(num); + mxUpdatingMutex.ReleaseMutex(); + } + } - public class ConfigProxy - { - private readonly int kParameterCommitTime = 500; - private RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramSystem = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - private RuntimeUtils.ConfigProxy._ParamOfMusicMode paramMusic = new RuntimeUtils.ConfigProxy._ParamOfMusicMode(); - private RuntimeUtils.ConfigProxy._ParamOfMovieMode paramMovie = new RuntimeUtils.ConfigProxy._ParamOfMovieMode(); - private RuntimeUtils.ConfigProxy._ParamOfFreestyle paramFreestyle = new RuntimeUtils.ConfigProxy._ParamOfFreestyle(); - private IntPtr ptrConfigProxy = IntPtr.Zero; - private string szConfigFilePathName = ""; - private Thread thUpdatingThread; - private Mutex mxUpdatingMutex = new Mutex(); - private bool bThreadFinished; - private bool bKillThread; - private ulong u64UpdateSignal; - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int CheckConfigCompatibility(string pszConfigFilePathName); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern uint GetConfigVersion(string pszConfigFilePathName); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern void Update_1_0_1(string pszConfigFilePathName); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern IntPtr CreateProxy(); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern void DestoryProxy(IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int UpdateSystemParameter( - IntPtr pParameter, - uint uiParameterSize, - IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int UpdateMusicParameter( - IntPtr pParameter, - uint uiParameterSize, - IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int UpdateMovieParameter( - IntPtr pParameter, - uint uiParameterSize, - IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int UpdateFreestyleParameter( - IntPtr pParameter, - uint uiParameterSize, - IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern int MarshalSystemParameter( - IntPtr pParameter, - uint uiParameterSize, - IntPtr pInstance); - - [DllImport("ConfigProxy.dll", CharSet = CharSet.Unicode)] - private static extern void Commit(string pszConfigFilePathName, IntPtr pInstance); - - public static bool CheckConfigVersion(string szConfigPathName) => RuntimeUtils.ConfigProxy.CheckConfigCompatibility(szConfigPathName) != 0; - - public static void UpdateConfigToCurrent(string szConfigPathName) - { - if (RuntimeUtils.ConfigProxy.GetConfigVersion(szConfigPathName) != 16777217U) - return; - RuntimeUtils.ConfigProxy.Update_1_0_1(szConfigPathName); - } - - public ConfigProxy(string szConfigPathName) - { - this.szConfigFilePathName = szConfigPathName; - Parameters.LoadDefaultParameter(ref this.paramSystem); - Parameters.LoadDefaultParameter(ref this.paramMusic); - Parameters.LoadDefaultParameter(ref this.paramMovie); - Parameters.LoadDefaultParameter(ref this.paramFreestyle); - this.ptrConfigProxy = RuntimeUtils.ConfigProxy.CreateProxy(); - this.u64UpdateSignal = 0UL; - if (this.ptrConfigProxy != IntPtr.Zero) - { - this.thUpdatingThread = new Thread(new ParameterizedThreadStart(this.UpdatingThread)); - this.thUpdatingThread.IsBackground = true; - this.bThreadFinished = false; - this.bKillThread = false; - this.thUpdatingThread.Start((object) this); - } - else - { - this.thUpdatingThread = (Thread) null; - this.bThreadFinished = true; - this.bKillThread = false; - } - } + public void UpdateParameter( + ParamOfMovieMode sParameter) + { + mxUpdatingMutex.WaitOne(); + paramMovie = sParameter; + if (ptrConfigProxy == IntPtr.Zero) + { + mxUpdatingMutex.ReleaseMutex(); + } + else + { + IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ParamOfMovieMode))); + Marshal.StructureToPtr((object)paramMovie, num, false); + UpdateMovieParameter(num, (uint)Marshal.SizeOf(typeof(ParamOfMovieMode)), ptrConfigProxy); + Marshal.FreeHGlobal(num); + mxUpdatingMutex.ReleaseMutex(); + } + } - ~ConfigProxy() => this.Dispose(); + public void UpdateParameter( + ParamOfFreestyle sParameter) + { + mxUpdatingMutex.WaitOne(); + paramFreestyle = sParameter; + if (ptrConfigProxy == IntPtr.Zero) + { + mxUpdatingMutex.ReleaseMutex(); + } + else + { + IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ParamOfFreestyle))); + Marshal.StructureToPtr((object)paramFreestyle, num, false); + UpdateFreestyleParameter(num, (uint)Marshal.SizeOf(typeof(ParamOfFreestyle)), ptrConfigProxy); + Marshal.FreeHGlobal(num); + mxUpdatingMutex.ReleaseMutex(); + } + } - public void Dispose() - { - if (this.thUpdatingThread != null) - { - DateTime now = DateTime.Now; - this.bKillThread = true; - while (!this.bThreadFinished) - { - if (DateTime.Now.Subtract(now).TotalMilliseconds > 200.0) + public void SyncConfig() { - this.thUpdatingThread.Abort(); - break; + mxUpdatingMutex.WaitOne(); + ++u64UpdateSignal; + mxUpdatingMutex.ReleaseMutex(); } - Thread.Sleep(10); - } - } - this.thUpdatingThread = (Thread) null; - this.bThreadFinished = true; - this.bKillThread = false; - this.u64UpdateSignal = 0UL; - if (this.ptrConfigProxy != IntPtr.Zero) - RuntimeUtils.ConfigProxy.DestoryProxy(this.ptrConfigProxy); - this.ptrConfigProxy = IntPtr.Zero; - } - - public bool ProxyUsable() => !(this.ptrConfigProxy == IntPtr.Zero); - - public void UpdateParameter( - RuntimeUtils.ConfigProxy._ParamOfBaseSystem sParameter) - { - this.mxUpdatingMutex.WaitOne(); - this.paramSystem = sParameter; - if (this.ptrConfigProxy == IntPtr.Zero) - { - this.mxUpdatingMutex.ReleaseMutex(); - } - else - { - IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem))); - Marshal.StructureToPtr((object) this.paramSystem, num, false); - RuntimeUtils.ConfigProxy.MarshalSystemParameter(num, (uint) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfBaseSystem)), this.ptrConfigProxy); - Marshal.FreeHGlobal(num); - this.mxUpdatingMutex.ReleaseMutex(); - } - } - - public void UpdateParameter( - RuntimeUtils.ConfigProxy._ParamOfMusicMode sParameter) - { - this.mxUpdatingMutex.WaitOne(); - this.paramMusic = sParameter; - if (this.ptrConfigProxy == IntPtr.Zero) - { - this.mxUpdatingMutex.ReleaseMutex(); - } - else - { - IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMusicMode))); - Marshal.StructureToPtr((object) this.paramMusic, num, false); - RuntimeUtils.ConfigProxy.UpdateMusicParameter(num, (uint) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMusicMode)), this.ptrConfigProxy); - Marshal.FreeHGlobal(num); - this.mxUpdatingMutex.ReleaseMutex(); - } - } - - public void UpdateParameter( - RuntimeUtils.ConfigProxy._ParamOfMovieMode sParameter) - { - this.mxUpdatingMutex.WaitOne(); - this.paramMovie = sParameter; - if (this.ptrConfigProxy == IntPtr.Zero) - { - this.mxUpdatingMutex.ReleaseMutex(); - } - else - { - IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMovieMode))); - Marshal.StructureToPtr((object) this.paramMovie, num, false); - RuntimeUtils.ConfigProxy.UpdateMovieParameter(num, (uint) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfMovieMode)), this.ptrConfigProxy); - Marshal.FreeHGlobal(num); - this.mxUpdatingMutex.ReleaseMutex(); - } - } - - public void UpdateParameter( - RuntimeUtils.ConfigProxy._ParamOfFreestyle sParameter) - { - this.mxUpdatingMutex.WaitOne(); - this.paramFreestyle = sParameter; - if (this.ptrConfigProxy == IntPtr.Zero) - { - this.mxUpdatingMutex.ReleaseMutex(); - } - else - { - IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfFreestyle))); - Marshal.StructureToPtr((object) this.paramFreestyle, num, false); - RuntimeUtils.ConfigProxy.UpdateFreestyleParameter(num, (uint) Marshal.SizeOf(typeof (RuntimeUtils.ConfigProxy._ParamOfFreestyle)), this.ptrConfigProxy); - Marshal.FreeHGlobal(num); - this.mxUpdatingMutex.ReleaseMutex(); - } - } - - public void SyncConfig() - { - this.mxUpdatingMutex.WaitOne(); - ++this.u64UpdateSignal; - this.mxUpdatingMutex.ReleaseMutex(); - } - - private void UpdatingThread(object obj) - { - RuntimeUtils.ConfigProxy configProxy = obj as RuntimeUtils.ConfigProxy; - configProxy.bThreadFinished = false; - DateTime now = DateTime.Now; - while (!configProxy.bKillThread) - { - if ((int) DateTime.Now.Subtract(now).TotalMilliseconds > this.kParameterCommitTime) - { - this.mxUpdatingMutex.WaitOne(); - if (configProxy.ptrConfigProxy != IntPtr.Zero && configProxy.u64UpdateSignal > 0UL) + + private void UpdatingThread(object obj) + { + ConfigProxy configProxy = obj as ConfigProxy; + configProxy.bThreadFinished = false; + DateTime now = DateTime.Now; + while (!configProxy.bKillThread) + { + if ((int)DateTime.Now.Subtract(now).TotalMilliseconds > kParameterCommitTime) + { + mxUpdatingMutex.WaitOne(); + if (configProxy.ptrConfigProxy != IntPtr.Zero && configProxy.u64UpdateSignal > 0UL) + { + Commit(configProxy.szConfigFilePathName, configProxy.ptrConfigProxy); + configProxy.u64UpdateSignal = 0UL; + now = DateTime.Now; + } + mxUpdatingMutex.ReleaseMutex(); + } + Thread.Sleep(10); + } + configProxy.bThreadFinished = true; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ParamOfBaseSystem_1_0_1 + { + [MarshalAs(UnmanagedType.I4)] + public int m_bEffectEnabled; + [MarshalAs(UnmanagedType.U4)] + public uint m_nEffectMode; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterShortLen; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterMediumLen; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterLongLen; + [MarshalAs(UnmanagedType.R4)] + public float m_rChannelPan; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ParamOfBaseSystem + { + [MarshalAs(UnmanagedType.I4)] + public int m_bEffectEnabled; + [MarshalAs(UnmanagedType.U4)] + public uint m_nEffectMode; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterShortLen; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterMediumLen; + [MarshalAs(UnmanagedType.I4)] + public int m_nFilterLongLen; + [MarshalAs(UnmanagedType.R4)] + public float m_rChannelPan; + [MarshalAs(UnmanagedType.I4)] + public int m_bVirtApplied; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_00; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_01; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_02; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_03; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_04; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_05; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_06; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_07; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] + public float[] m_rpChannelAngle_08; + [MarshalAs(UnmanagedType.I4)] + public int m_bEnvRealizeEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_bEnvRealizePreprocess; + [MarshalAs(UnmanagedType.I4)] + public int m_nEnvRealizePreset; + [MarshalAs(UnmanagedType.R4)] + public float m_rEnvRealizeDrySignal; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ParamOfMusicMode + { + [MarshalAs(UnmanagedType.R4)] + public float m_rPreVolume; + [MarshalAs(UnmanagedType.I4)] + public int m_bConvolverEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rConvolverIRGain; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] + public char[] m_szConvolverIR; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERBassEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERBassSpkSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERBassFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERClarityEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERClarityMode; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERClarityFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_bSurroundEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nVHERoomSize; + [MarshalAs(UnmanagedType.I4)] + public int m_bReverbEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbPredelay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDamping; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDensity; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbBandwidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDecay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbEarlyMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bEqualizerEnabled; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] + public float[] m_rpEqualizerBands; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompressorEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoKnee; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoAttack; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoRelease; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompThreshold; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRatio; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompKneeWidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompGain; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompAttack; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRelease; + [MarshalAs(UnmanagedType.I4)] + public int m_bCureEnabled; + [MarshalAs(UnmanagedType.U4)] + public uint m_uiCureLevel; + [MarshalAs(UnmanagedType.I4)] + public int m_bTubeEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rPostVolume; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ParamOfMovieMode + { + [MarshalAs(UnmanagedType.R4)] + public float m_rPreVolume; + [MarshalAs(UnmanagedType.I4)] + public int m_bConvolverEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rConvolverIRGain; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] + public char[] m_szConvolverIR; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERBassEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERBassSpkSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERBassFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERClarityEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERClarityFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_bSurroundEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_r3DSurroundStereo; + [MarshalAs(UnmanagedType.R4)] + public float m_r3DSurroundImage; + [MarshalAs(UnmanagedType.I4)] + public int m_bReverbEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbPredelay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDamping; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDensity; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbBandwidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDecay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbEarlyMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bEqualizerEnabled; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] + public float[] m_rpEqualizerBands; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompressorEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoKnee; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoAttack; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoRelease; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompThreshold; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRatio; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompKneeWidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompGain; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompAttack; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRelease; + [MarshalAs(UnmanagedType.I4)] + public int m_bSmartVolumeEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVRatio; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVVolume; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVMaxGain; + [MarshalAs(UnmanagedType.R4)] + public float m_rPostVolume; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ParamOfFreestyle { - RuntimeUtils.ConfigProxy.Commit(configProxy.szConfigFilePathName, configProxy.ptrConfigProxy); - configProxy.u64UpdateSignal = 0UL; - now = DateTime.Now; + [MarshalAs(UnmanagedType.R4)] + public float m_rPreVolume; + [MarshalAs(UnmanagedType.I4)] + public int m_bConvolverEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rConvolverIRGain; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] + public char[] m_szConvolverIR; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERBassEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERBassMode; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERBassSpkSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERBassFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_bViPERClarityEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_nViPERClarityMode; + [MarshalAs(UnmanagedType.R4)] + public float m_rViPERClarityFactor; + [MarshalAs(UnmanagedType.I4)] + public int m_b3DSurroundEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_bVHESurroundEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_r3DSurroundStereo; + [MarshalAs(UnmanagedType.R4)] + public float m_r3DSurroundImage; + [MarshalAs(UnmanagedType.I4)] + public int m_nVHERoomSize; + [MarshalAs(UnmanagedType.I4)] + public int m_bReverbEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbSize; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbPredelay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDamping; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDensity; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbBandwidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbDecay; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbEarlyMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbMix; + [MarshalAs(UnmanagedType.R4)] + public float m_rReverbGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bEqualizerEnabled; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] + public float[] m_rpEqualizerBands; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompressorEnabled; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoKnee; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoAttack; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoRelease; + [MarshalAs(UnmanagedType.I4)] + public int m_bCompAutoMetaNoClipping; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompThreshold; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRatio; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompKneeWidth; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompGain; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompAttack; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompRelease; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompMetaKneeMult; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompMetaMaxAttack; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompMetaMaxRelease; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompMetaCrest; + [MarshalAs(UnmanagedType.R4)] + public float m_rCompMetaAdapt; + [MarshalAs(UnmanagedType.I4)] + public int m_bSmartVolumeEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVRatio; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVVolume; + [MarshalAs(UnmanagedType.R4)] + public float m_rSVMaxGain; + [MarshalAs(UnmanagedType.I4)] + public int m_bCureEnabled; + [MarshalAs(UnmanagedType.U4)] + public uint m_uiCureLevel; + [MarshalAs(UnmanagedType.I4)] + public int m_bTubeEnabled; + [MarshalAs(UnmanagedType.R4)] + public float m_rPostVolume; } - this.mxUpdatingMutex.ReleaseMutex(); - } - Thread.Sleep(10); } - configProxy.bThreadFinished = true; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct _ParamOfBaseSystem_1_0_1 - { - [MarshalAs(UnmanagedType.I4)] - public int m_bEffectEnabled; - [MarshalAs(UnmanagedType.U4)] - public uint m_nEffectMode; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterShortLen; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterMediumLen; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterLongLen; - [MarshalAs(UnmanagedType.R4)] - public float m_rChannelPan; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct _ParamOfBaseSystem - { - [MarshalAs(UnmanagedType.I4)] - public int m_bEffectEnabled; - [MarshalAs(UnmanagedType.U4)] - public uint m_nEffectMode; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterShortLen; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterMediumLen; - [MarshalAs(UnmanagedType.I4)] - public int m_nFilterLongLen; - [MarshalAs(UnmanagedType.R4)] - public float m_rChannelPan; - [MarshalAs(UnmanagedType.I4)] - public int m_bVirtApplied; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_00; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_01; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_02; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_03; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_04; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_05; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_06; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_07; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.R4)] - public float[] m_rpChannelAngle_08; - [MarshalAs(UnmanagedType.I4)] - public int m_bEnvRealizeEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_bEnvRealizePreprocess; - [MarshalAs(UnmanagedType.I4)] - public int m_nEnvRealizePreset; - [MarshalAs(UnmanagedType.R4)] - public float m_rEnvRealizeDrySignal; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct _ParamOfMusicMode - { - [MarshalAs(UnmanagedType.R4)] - public float m_rPreVolume; - [MarshalAs(UnmanagedType.I4)] - public int m_bConvolverEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rConvolverIRGain; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] - public char[] m_szConvolverIR; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERBassEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERBassSpkSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERBassFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERClarityEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERClarityMode; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERClarityFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_bSurroundEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nVHERoomSize; - [MarshalAs(UnmanagedType.I4)] - public int m_bReverbEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbPredelay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDamping; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDensity; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbBandwidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDecay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbEarlyMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bEqualizerEnabled; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] - public float[] m_rpEqualizerBands; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompressorEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoKnee; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoAttack; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoRelease; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompThreshold; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRatio; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompKneeWidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompGain; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompAttack; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRelease; - [MarshalAs(UnmanagedType.I4)] - public int m_bCureEnabled; - [MarshalAs(UnmanagedType.U4)] - public uint m_uiCureLevel; - [MarshalAs(UnmanagedType.I4)] - public int m_bTubeEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rPostVolume; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct _ParamOfMovieMode - { - [MarshalAs(UnmanagedType.R4)] - public float m_rPreVolume; - [MarshalAs(UnmanagedType.I4)] - public int m_bConvolverEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rConvolverIRGain; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] - public char[] m_szConvolverIR; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERBassEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERBassSpkSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERBassFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERClarityEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERClarityFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_bSurroundEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_r3DSurroundStereo; - [MarshalAs(UnmanagedType.R4)] - public float m_r3DSurroundImage; - [MarshalAs(UnmanagedType.I4)] - public int m_bReverbEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbPredelay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDamping; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDensity; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbBandwidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDecay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbEarlyMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bEqualizerEnabled; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] - public float[] m_rpEqualizerBands; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompressorEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoKnee; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoAttack; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoRelease; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompThreshold; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRatio; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompKneeWidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompGain; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompAttack; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRelease; - [MarshalAs(UnmanagedType.I4)] - public int m_bSmartVolumeEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVRatio; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVVolume; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVMaxGain; - [MarshalAs(UnmanagedType.R4)] - public float m_rPostVolume; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct _ParamOfFreestyle - { - [MarshalAs(UnmanagedType.R4)] - public float m_rPreVolume; - [MarshalAs(UnmanagedType.I4)] - public int m_bConvolverEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rConvolverIRGain; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.U2)] - public char[] m_szConvolverIR; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERBassEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERBassMode; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERBassSpkSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERBassFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_bViPERClarityEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_nViPERClarityMode; - [MarshalAs(UnmanagedType.R4)] - public float m_rViPERClarityFactor; - [MarshalAs(UnmanagedType.I4)] - public int m_b3DSurroundEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_bVHESurroundEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_r3DSurroundStereo; - [MarshalAs(UnmanagedType.R4)] - public float m_r3DSurroundImage; - [MarshalAs(UnmanagedType.I4)] - public int m_nVHERoomSize; - [MarshalAs(UnmanagedType.I4)] - public int m_bReverbEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbSize; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbPredelay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDamping; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDensity; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbBandwidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbDecay; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbEarlyMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbMix; - [MarshalAs(UnmanagedType.R4)] - public float m_rReverbGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bEqualizerEnabled; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.R4)] - public float[] m_rpEqualizerBands; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompressorEnabled; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoKnee; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoAttack; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoRelease; - [MarshalAs(UnmanagedType.I4)] - public int m_bCompAutoMetaNoClipping; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompThreshold; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRatio; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompKneeWidth; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompGain; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompAttack; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompRelease; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompMetaKneeMult; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompMetaMaxAttack; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompMetaMaxRelease; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompMetaCrest; - [MarshalAs(UnmanagedType.R4)] - public float m_rCompMetaAdapt; - [MarshalAs(UnmanagedType.I4)] - public int m_bSmartVolumeEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVRatio; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVVolume; - [MarshalAs(UnmanagedType.R4)] - public float m_rSVMaxGain; - [MarshalAs(UnmanagedType.I4)] - public int m_bCureEnabled; - [MarshalAs(UnmanagedType.U4)] - public uint m_uiCureLevel; - [MarshalAs(UnmanagedType.I4)] - public int m_bTubeEnabled; - [MarshalAs(UnmanagedType.R4)] - public float m_rPostVolume; - } } - } } diff --git a/Utils/Win32GDI/DRAW_QUALITY.cs b/Utils/Win32GDI/DRAW_QUALITY.cs index c2d8103..0847c0a 100644 --- a/Utils/Win32GDI/DRAW_QUALITY.cs +++ b/Utils/Win32GDI/DRAW_QUALITY.cs @@ -1,10 +1,10 @@ namespace ViPER4WindowsBin.Utils.Win32GDI { - public enum DRAW_QUALITY - { - QUALITY_SUPER_HIGH, - QUALITY_HIGH, - QUALITY_MIDDLE, - QUALITY_LOW, - } + public enum DRAW_QUALITY + { + QUALITY_SUPER_HIGH, + QUALITY_HIGH, + QUALITY_MIDDLE, + QUALITY_LOW, + } } diff --git a/Utils/Win32GDI/GDIMutex.cs b/Utils/Win32GDI/GDIMutex.cs index cbe71d4..56b4b52 100644 --- a/Utils/Win32GDI/GDIMutex.cs +++ b/Utils/Win32GDI/GDIMutex.cs @@ -2,19 +2,25 @@ namespace ViPER4WindowsBin.Utils.Win32GDI { - internal class GDIMutex - { - private Mutex MutexLock = new Mutex(); - - public GDIMutex(bool Locking) + internal class GDIMutex { - if (!Locking) - return; - this.MutexLock.WaitOne(); - } + private readonly Mutex MutexLock = new Mutex(); - public void WaitLock() => this.MutexLock.WaitOne(); + public GDIMutex(bool Locking) + { + if (!Locking) + return; + MutexLock.WaitOne(); + } - public void Unlock() => this.MutexLock.ReleaseMutex(); - } + public void WaitLock() + { + MutexLock.WaitOne(); + } + + public void Unlock() + { + MutexLock.ReleaseMutex(); + } + } } diff --git a/Utils/Win32GDI/GDIRender.cs b/Utils/Win32GDI/GDIRender.cs index e97a0b3..6c5caed 100644 --- a/Utils/Win32GDI/GDIRender.cs +++ b/Utils/Win32GDI/GDIRender.cs @@ -7,198 +7,207 @@ namespace ViPER4WindowsBin.Utils.Win32GDI { - internal class GDIRender - { - private const int SRCCOPY = 13369376; - private Panel backgroundGraph; - private Graphics backgroundGraphic; - private Graphics backgroundRenderGraphic; - private Graphics backgroundMemoryGraphic; - private Graphics backgroundDrawGraphic; - private Bitmap backgroundMemoryBitmap; - private BufferedGraphics graphicsBuffer; - private IntPtr memoryGraphicHdc; - private IntPtr memoryBitmapHdc; - private GDIMutex RenderLock; - private DRAW_QUALITY DrawQuality; - - [DllImport("gdi32.dll")] - private static extern IntPtr CreateCompatibleDC(IntPtr __pHDC); - - [DllImport("gdi32.dll")] - private static extern IntPtr SelectObject(IntPtr __pHDC, IntPtr __pObject); - - [DllImport("gdi32.dll")] - private static extern int BitBlt( - IntPtr __pHdcDest, - int __nXDest, - int __nYDest, - int __nWidth, - int __nHeight, - IntPtr __pHdcSrc, - int __nXSrc, - int __nYSrc, - int __dwRop); - - [DllImport("gdi32.dll")] - private static extern bool DeleteObject(IntPtr __pObject); - - public GDIRender() + internal class GDIRender { - this.backgroundGraphic = (Graphics) null; - this.backgroundRenderGraphic = (Graphics) null; - this.backgroundMemoryGraphic = (Graphics) null; - this.backgroundDrawGraphic = (Graphics) null; - this.backgroundMemoryBitmap = (Bitmap) null; - this.graphicsBuffer = (BufferedGraphics) null; - this.DrawQuality = DRAW_QUALITY.QUALITY_SUPER_HIGH; - this.RenderLock = new GDIMutex(false); - } + private Panel backgroundGraph; + private Graphics backgroundGraphic; + private Graphics backgroundRenderGraphic; + private Graphics backgroundMemoryGraphic; + private Graphics backgroundDrawGraphic; + private Bitmap backgroundMemoryBitmap; + private BufferedGraphics graphicsBuffer; + private IntPtr memoryGraphicHdc; + private IntPtr memoryBitmapHdc; + private readonly GDIMutex RenderLock; + private DRAW_QUALITY DrawQuality; + + [DllImport("gdi32.dll")] + private static extern IntPtr CreateCompatibleDC(IntPtr __pHDC); + + [DllImport("gdi32.dll")] + private static extern IntPtr SelectObject(IntPtr __pHDC, IntPtr __pObject); + + [DllImport("gdi32.dll")] + private static extern int BitBlt( + IntPtr __pHdcDest, + int __nXDest, + int __nYDest, + int __nWidth, + int __nHeight, + IntPtr __pHdcSrc, + int __nXSrc, + int __nYSrc, + int __dwRop); + + [DllImport("gdi32.dll")] + private static extern bool DeleteObject(IntPtr __pObject); + + public GDIRender() + { + backgroundGraphic = null; + backgroundRenderGraphic = null; + backgroundMemoryGraphic = null; + backgroundDrawGraphic = null; + backgroundMemoryBitmap = null; + graphicsBuffer = null; + DrawQuality = DRAW_QUALITY.QUALITY_SUPER_HIGH; + RenderLock = new GDIMutex(false); + } - ~GDIRender() => this.Dispose(); + ~GDIRender() => Dispose(); - public void Dispose() - { - if (this.backgroundGraphic != null) - this.backgroundGraphic.Dispose(); - this.backgroundGraphic = (Graphics) null; - if (this.graphicsBuffer != null) - this.graphicsBuffer.Dispose(); - this.graphicsBuffer = (BufferedGraphics) null; - if (this.backgroundRenderGraphic != null) - this.backgroundRenderGraphic.Dispose(); - this.backgroundRenderGraphic = (Graphics) null; - if (this.backgroundMemoryBitmap != null) - { - GDIRender.DeleteObject(this.memoryBitmapHdc); - this.backgroundMemoryBitmap.Dispose(); - } - this.backgroundMemoryBitmap = (Bitmap) null; - if (this.backgroundMemoryGraphic != null) - { - GDIRender.DeleteObject(this.memoryGraphicHdc); - this.backgroundMemoryGraphic.Dispose(); - } - this.backgroundMemoryGraphic = (Graphics) null; - if (this.backgroundDrawGraphic != null) - this.backgroundDrawGraphic.Dispose(); - this.backgroundDrawGraphic = (Graphics) null; - } - - public int ResetDraw(Panel GraphOle, Color BackColor) - { - if (GraphOle == null || GraphOle.GetType() != typeof (Panel) || GraphOle.ClientRectangle.Width < 1 || GraphOle.ClientRectangle.Height < 1) - return -1; - this.RenderLock.WaitLock(); - this.backgroundGraph = GraphOle; - lock (this.backgroundGraph) - { - if (this.backgroundGraphic != null) - this.backgroundGraphic.Dispose(); - if (this.graphicsBuffer != null) - this.graphicsBuffer.Dispose(); - if (this.backgroundRenderGraphic != null) - this.backgroundRenderGraphic.Dispose(); - if (this.backgroundMemoryBitmap != null) + public void Dispose() { - GDIRender.DeleteObject(this.memoryBitmapHdc); - this.backgroundMemoryBitmap.Dispose(); + backgroundGraphic?.Dispose(); + backgroundGraphic = null; + graphicsBuffer?.Dispose(); + graphicsBuffer = null; + backgroundRenderGraphic?.Dispose(); + backgroundRenderGraphic = null; + if (backgroundMemoryBitmap != null) + { + DeleteObject(memoryBitmapHdc); + backgroundMemoryBitmap.Dispose(); + } + backgroundMemoryBitmap = null; + if (backgroundMemoryGraphic != null) + { + DeleteObject(memoryGraphicHdc); + backgroundMemoryGraphic.Dispose(); + } + backgroundMemoryGraphic = null; + backgroundDrawGraphic?.Dispose(); + backgroundDrawGraphic = null; } - if (this.backgroundMemoryGraphic != null) + + public int ResetDraw(Panel GraphOle, Color BackColor) { - GDIRender.DeleteObject(this.memoryGraphicHdc); - this.backgroundMemoryGraphic.Dispose(); + if (GraphOle == null || GraphOle.GetType() != typeof(Panel) || GraphOle.ClientRectangle.Width < 1 || GraphOle.ClientRectangle.Height < 1) + return -1; + RenderLock.WaitLock(); + backgroundGraph = GraphOle; + lock (backgroundGraph) + { + backgroundGraphic?.Dispose(); + graphicsBuffer?.Dispose(); + backgroundRenderGraphic?.Dispose(); + if (backgroundMemoryBitmap != null) + { + DeleteObject(memoryBitmapHdc); + backgroundMemoryBitmap.Dispose(); + } + if (backgroundMemoryGraphic != null) + { + DeleteObject(memoryGraphicHdc); + backgroundMemoryGraphic.Dispose(); + } + backgroundDrawGraphic?.Dispose(); + backgroundGraphic = backgroundGraph.CreateGraphics(); + graphicsBuffer = BufferedGraphicsManager.Current.Allocate(backgroundGraphic, backgroundGraph.ClientRectangle); + backgroundRenderGraphic = graphicsBuffer.Graphics; + backgroundRenderGraphic.Clear(BackColor); + backgroundRenderGraphic.SetClip(backgroundGraph.ClientRectangle); + backgroundMemoryBitmap = new Bitmap(backgroundGraph.ClientRectangle.Width, backgroundGraph.ClientRectangle.Height, backgroundRenderGraphic); + backgroundMemoryGraphic = Graphics.FromImage(backgroundMemoryBitmap); + backgroundMemoryGraphic.Clear(BackColor); + memoryGraphicHdc = CreateCompatibleDC(backgroundMemoryGraphic.GetHdc()); + memoryBitmapHdc = backgroundMemoryBitmap.GetHbitmap(); + SelectObject(memoryGraphicHdc, memoryBitmapHdc); + backgroundDrawGraphic = Graphics.FromHdc(memoryGraphicHdc); + switch (DrawQuality) + { + case DRAW_QUALITY.QUALITY_SUPER_HIGH: + backgroundDrawGraphic.SmoothingMode = SmoothingMode.HighQuality; + backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + backgroundDrawGraphic.InterpolationMode = InterpolationMode.HighQualityBilinear; + backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.HighQuality; + break; + case DRAW_QUALITY.QUALITY_HIGH: + backgroundDrawGraphic.SmoothingMode = SmoothingMode.AntiAlias; + backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + backgroundDrawGraphic.InterpolationMode = InterpolationMode.Bilinear; + backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.Half; + break; + case DRAW_QUALITY.QUALITY_MIDDLE: + backgroundDrawGraphic.SmoothingMode = SmoothingMode.HighSpeed; + backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.AntiAlias; + backgroundDrawGraphic.InterpolationMode = InterpolationMode.NearestNeighbor; + backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.HighSpeed; + break; + case DRAW_QUALITY.QUALITY_LOW: + backgroundDrawGraphic.SmoothingMode = SmoothingMode.None; + backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; + backgroundDrawGraphic.InterpolationMode = InterpolationMode.Low; + backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.None; + break; + } + } + RenderLock.Unlock(); + return 0; } - if (this.backgroundDrawGraphic != null) - this.backgroundDrawGraphic.Dispose(); - this.backgroundGraphic = this.backgroundGraph.CreateGraphics(); - this.graphicsBuffer = BufferedGraphicsManager.Current.Allocate(this.backgroundGraphic, this.backgroundGraph.ClientRectangle); - this.backgroundRenderGraphic = this.graphicsBuffer.Graphics; - this.backgroundRenderGraphic.Clear(BackColor); - this.backgroundRenderGraphic.SetClip(this.backgroundGraph.ClientRectangle); - this.backgroundMemoryBitmap = new Bitmap(this.backgroundGraph.ClientRectangle.Width, this.backgroundGraph.ClientRectangle.Height, this.backgroundRenderGraphic); - this.backgroundMemoryGraphic = Graphics.FromImage((Image) this.backgroundMemoryBitmap); - this.backgroundMemoryGraphic.Clear(BackColor); - this.memoryGraphicHdc = GDIRender.CreateCompatibleDC(this.backgroundMemoryGraphic.GetHdc()); - this.memoryBitmapHdc = this.backgroundMemoryBitmap.GetHbitmap(); - GDIRender.SelectObject(this.memoryGraphicHdc, this.memoryBitmapHdc); - this.backgroundDrawGraphic = Graphics.FromHdc(this.memoryGraphicHdc); - switch (this.DrawQuality) + + public void SetDrawQuality(DRAW_QUALITY NewQuality) { - case DRAW_QUALITY.QUALITY_SUPER_HIGH: - this.backgroundDrawGraphic.SmoothingMode = SmoothingMode.HighQuality; - this.backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - this.backgroundDrawGraphic.InterpolationMode = InterpolationMode.HighQualityBilinear; - this.backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.HighQuality; - break; - case DRAW_QUALITY.QUALITY_HIGH: - this.backgroundDrawGraphic.SmoothingMode = SmoothingMode.AntiAlias; - this.backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; - this.backgroundDrawGraphic.InterpolationMode = InterpolationMode.Bilinear; - this.backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.Half; - break; - case DRAW_QUALITY.QUALITY_MIDDLE: - this.backgroundDrawGraphic.SmoothingMode = SmoothingMode.HighSpeed; - this.backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.AntiAlias; - this.backgroundDrawGraphic.InterpolationMode = InterpolationMode.NearestNeighbor; - this.backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.HighSpeed; - break; - case DRAW_QUALITY.QUALITY_LOW: - this.backgroundDrawGraphic.SmoothingMode = SmoothingMode.None; - this.backgroundDrawGraphic.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; - this.backgroundDrawGraphic.InterpolationMode = InterpolationMode.Low; - this.backgroundDrawGraphic.PixelOffsetMode = PixelOffsetMode.None; - break; + DrawQuality = NewQuality; } - } - this.RenderLock.Unlock(); - return 0; - } - - public void SetDrawQuality(DRAW_QUALITY NewQuality) => this.DrawQuality = NewQuality; - public void BeginRender() => this.RenderLock.WaitLock(); + public void BeginRender() + { + RenderLock.WaitLock(); + } - public void EndRender() => this.RenderLock.Unlock(); + public void EndRender() + { + RenderLock.Unlock(); + } - public Graphics GetGraphicHandle() => this.backgroundDrawGraphic; + public Graphics GetGraphicHandle() + { + return backgroundDrawGraphic; + } - public IntPtr BeginUnmanaged() => this.backgroundDrawGraphic.GetHdc(); + public IntPtr BeginUnmanaged() + { + return backgroundDrawGraphic.GetHdc(); + } - public void EndUnmanaged() => this.backgroundDrawGraphic.ReleaseHdc(); + public void EndUnmanaged() + { + backgroundDrawGraphic.ReleaseHdc(); + } - public void BltToFront() - { - this.RenderLock.WaitLock(); - try - { - IntPtr hdc = this.backgroundDrawGraphic.GetHdc(); - GDIRender.BitBlt(this.backgroundRenderGraphic.GetHdc(), 0, 0, this.backgroundGraph.ClientRectangle.Width, this.backgroundGraph.ClientRectangle.Height, hdc, 0, 0, 13369376); - this.backgroundDrawGraphic.ReleaseHdc(); - this.backgroundRenderGraphic.ReleaseHdc(); - this.graphicsBuffer.Render(this.backgroundGraphic); - } - finally - { - this.RenderLock.Unlock(); - } - } + public void BltToFront() + { + RenderLock.WaitLock(); + try + { + IntPtr hdc = backgroundDrawGraphic.GetHdc(); + BitBlt(backgroundRenderGraphic.GetHdc(), 0, 0, backgroundGraph.ClientRectangle.Width, backgroundGraph.ClientRectangle.Height, hdc, 0, 0, 13369376); + backgroundDrawGraphic.ReleaseHdc(); + backgroundRenderGraphic.ReleaseHdc(); + graphicsBuffer.Render(backgroundGraphic); + } + finally + { + RenderLock.Unlock(); + } + } - public void BltToFront(int srcX, int srcY, int dstX, int dstY, int Width, int Height) - { - this.RenderLock.WaitLock(); - try - { - IntPtr hdc = this.backgroundDrawGraphic.GetHdc(); - GDIRender.BitBlt(this.backgroundRenderGraphic.GetHdc(), dstX, dstY, Width, Height, hdc, srcX, srcY, 13369376); - this.backgroundDrawGraphic.ReleaseHdc(); - this.backgroundRenderGraphic.ReleaseHdc(); - this.graphicsBuffer.Render(this.backgroundGraphic); - } - finally - { - this.RenderLock.Unlock(); - } + public void BltToFront(int srcX, int srcY, int dstX, int dstY, int Width, int Height) + { + RenderLock.WaitLock(); + try + { + IntPtr hdc = backgroundDrawGraphic.GetHdc(); + BitBlt(backgroundRenderGraphic.GetHdc(), dstX, dstY, Width, Height, hdc, srcX, srcY, 13369376); + backgroundDrawGraphic.ReleaseHdc(); + backgroundRenderGraphic.ReleaseHdc(); + graphicsBuffer.Render(backgroundGraphic); + } + finally + { + RenderLock.Unlock(); + } + } } - } } diff --git a/Version.cs b/Version.cs index 5bb4f7a..41b163d 100644 --- a/Version.cs +++ b/Version.cs @@ -1,9 +1,9 @@ namespace ViPER4WindowsBin { - public class Version - { - public const uint MainVersion = 1; - public const uint SubVersion = 0; - public const uint ExtVersion = 5; - } + public class Version + { + public const uint MainVersion = 1; + public const uint SubVersion = 0; + public const uint ExtVersion = 5; + } } diff --git a/frmAbout.cs b/frmAbout.cs index 44544c2..6ef5df7 100644 --- a/frmAbout.cs +++ b/frmAbout.cs @@ -5,111 +5,111 @@ namespace ViPER4WindowsBin { - public class frmAbout : Form - { - private IContainer components; - private Label label_ControlPanelVersion; - private Label label_DriverVersion; - private Label label_CodeName; - private Label label_LanVersion; - private Label label_LanTranslator; - private Label label_Copyright; - private Label label_SupportForum; - - protected override void Dispose(bool disposing) + public class FrmAbout : Form { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private Label label_ControlPanelVersion; + private Label label_DriverVersion; + private Label label_CodeName; + private Label label_LanVersion; + private Label label_LanTranslator; + private Label label_Copyright; + private Label label_SupportForum; - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmAbout)); - this.label_ControlPanelVersion = new Label(); - this.label_DriverVersion = new Label(); - this.label_CodeName = new Label(); - this.label_LanVersion = new Label(); - this.label_LanTranslator = new Label(); - this.label_Copyright = new Label(); - this.label_SupportForum = new Label(); - this.SuspendLayout(); - this.label_ControlPanelVersion.AutoSize = true; - this.label_ControlPanelVersion.Location = new Point(12, 18); - this.label_ControlPanelVersion.Name = "label_ControlPanelVersion"; - this.label_ControlPanelVersion.Size = new Size(131, 12); - this.label_ControlPanelVersion.TabIndex = 0; - this.label_ControlPanelVersion.Text = "$CONTROLPANEL_VERSION"; - this.label_DriverVersion.AutoSize = true; - this.label_DriverVersion.Location = new Point(12, 40); - this.label_DriverVersion.Name = "label_DriverVersion"; - this.label_DriverVersion.Size = new Size(95, 12); - this.label_DriverVersion.TabIndex = 1; - this.label_DriverVersion.Text = "$DRIVER_VERSION"; - this.label_CodeName.AutoSize = true; - this.label_CodeName.Location = new Point(12, 62); - this.label_CodeName.Name = "label_CodeName"; - this.label_CodeName.Size = new Size(65, 12); - this.label_CodeName.TabIndex = 2; - this.label_CodeName.Text = "$CODE_NAME"; - this.label_LanVersion.AutoSize = true; - this.label_LanVersion.Location = new Point(12, 84); - this.label_LanVersion.Name = "label_LanVersion"; - this.label_LanVersion.Size = new Size(107, 12); - this.label_LanVersion.TabIndex = 3; - this.label_LanVersion.Text = "$LANGUAGE_VERSION"; - this.label_LanTranslator.AutoSize = true; - this.label_LanTranslator.Location = new Point(12, 106); - this.label_LanTranslator.Name = "label_LanTranslator"; - this.label_LanTranslator.Size = new Size(125, 12); - this.label_LanTranslator.TabIndex = 4; - this.label_LanTranslator.Text = "$LANGUAGE_TRANSLATOR"; - this.label_Copyright.AutoSize = true; - this.label_Copyright.Location = new Point(12, 140); - this.label_Copyright.Name = "label_Copyright"; - this.label_Copyright.Size = new Size(65, 12); - this.label_Copyright.TabIndex = 5; - this.label_Copyright.Text = "$COPYRIGHT"; - this.label_SupportForum.AutoSize = true; - this.label_SupportForum.Location = new Point(12, 162); - this.label_SupportForum.Name = "label_SupportForum"; - this.label_SupportForum.Size = new Size(89, 12); - this.label_SupportForum.TabIndex = 6; - this.label_SupportForum.Text = "$SUPPORT_FORUM"; - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(410, 190); - this.Controls.Add((Control) this.label_SupportForum); - this.Controls.Add((Control) this.label_Copyright); - this.Controls.Add((Control) this.label_LanTranslator); - this.Controls.Add((Control) this.label_LanVersion); - this.Controls.Add((Control) this.label_CodeName); - this.Controls.Add((Control) this.label_DriverVersion); - this.Controls.Add((Control) this.label_ControlPanelVersion); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmAbout); - this.ShowInTaskbar = false; - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$ABOUT"; - this.ResumeLayout(false); - this.PerformLayout(); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public frmAbout() - { - this.InitializeComponent(); - this.Text = GlobalMessages.ABOUT; - this.label_ControlPanelVersion.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + 1U.ToString() + "." + 0U.ToString() + "." + 5U.ToString(); - this.label_DriverVersion.Text = GlobalMessages.DRIVER_VERSION + " : " + RuntimeUtils.EffectDriver.GetVersion(); - this.label_CodeName.Text = GlobalMessages.CODE_NAME + " : " + RuntimeUtils.EffectDriver.GetCodeName(); - this.label_LanVersion.Text = GlobalMessages.LANGUAGE_VERSION + " : " + GlobalMessages.LANGUAGE_VERSION_STR; - this.label_LanTranslator.Text = GlobalMessages.LANGUAGE_TRANSLATOR + " : " + GlobalMessages.LANGUAGE_TRANSLATOR_STR; - this.label_Copyright.Text = GlobalMessages.COPYRIGHT; - this.label_SupportForum.Text = GlobalMessages.SUPPORT_FORUM; + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmAbout)); + label_ControlPanelVersion = new Label(); + label_DriverVersion = new Label(); + label_CodeName = new Label(); + label_LanVersion = new Label(); + label_LanTranslator = new Label(); + label_Copyright = new Label(); + label_SupportForum = new Label(); + SuspendLayout(); + label_ControlPanelVersion.AutoSize = true; + label_ControlPanelVersion.Location = new Point(12, 18); + label_ControlPanelVersion.Name = "label_ControlPanelVersion"; + label_ControlPanelVersion.Size = new Size(131, 12); + label_ControlPanelVersion.TabIndex = 0; + label_ControlPanelVersion.Text = "$CONTROLPANEL_VERSION"; + label_DriverVersion.AutoSize = true; + label_DriverVersion.Location = new Point(12, 40); + label_DriverVersion.Name = "label_DriverVersion"; + label_DriverVersion.Size = new Size(95, 12); + label_DriverVersion.TabIndex = 1; + label_DriverVersion.Text = "$DRIVER_VERSION"; + label_CodeName.AutoSize = true; + label_CodeName.Location = new Point(12, 62); + label_CodeName.Name = "label_CodeName"; + label_CodeName.Size = new Size(65, 12); + label_CodeName.TabIndex = 2; + label_CodeName.Text = "$CODE_NAME"; + label_LanVersion.AutoSize = true; + label_LanVersion.Location = new Point(12, 84); + label_LanVersion.Name = "label_LanVersion"; + label_LanVersion.Size = new Size(107, 12); + label_LanVersion.TabIndex = 3; + label_LanVersion.Text = "$LANGUAGE_VERSION"; + label_LanTranslator.AutoSize = true; + label_LanTranslator.Location = new Point(12, 106); + label_LanTranslator.Name = "label_LanTranslator"; + label_LanTranslator.Size = new Size(125, 12); + label_LanTranslator.TabIndex = 4; + label_LanTranslator.Text = "$LANGUAGE_TRANSLATOR"; + label_Copyright.AutoSize = true; + label_Copyright.Location = new Point(12, 140); + label_Copyright.Name = "label_Copyright"; + label_Copyright.Size = new Size(65, 12); + label_Copyright.TabIndex = 5; + label_Copyright.Text = "$COPYRIGHT"; + label_SupportForum.AutoSize = true; + label_SupportForum.Location = new Point(12, 162); + label_SupportForum.Name = "label_SupportForum"; + label_SupportForum.Size = new Size(89, 12); + label_SupportForum.TabIndex = 6; + label_SupportForum.Text = "$SUPPORT_FORUM"; + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(410, 190); + Controls.Add(label_SupportForum); + Controls.Add(label_Copyright); + Controls.Add(label_LanTranslator); + Controls.Add(label_LanVersion); + Controls.Add(label_CodeName); + Controls.Add(label_DriverVersion); + Controls.Add(label_ControlPanelVersion); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmAbout); + ShowInTaskbar = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "$ABOUT"; + ResumeLayout(false); + PerformLayout(); + } + + public FrmAbout() + { + InitializeComponent(); + Text = GlobalMessages.ABOUT; + label_ControlPanelVersion.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + 1U.ToString() + "." + 0U.ToString() + "." + 5U.ToString(); + label_DriverVersion.Text = GlobalMessages.DRIVER_VERSION + " : " + RuntimeUtils.EffectDriver.GetVersion(); + label_CodeName.Text = GlobalMessages.CODE_NAME + " : " + RuntimeUtils.EffectDriver.GetCodeName(); + label_LanVersion.Text = GlobalMessages.LANGUAGE_VERSION + " : " + GlobalMessages.LANGUAGE_VERSION_STR; + label_LanTranslator.Text = GlobalMessages.LANGUAGE_TRANSLATOR + " : " + GlobalMessages.LANGUAGE_TRANSLATOR_STR; + label_Copyright.Text = GlobalMessages.COPYRIGHT; + label_SupportForum.Text = GlobalMessages.SUPPORT_FORUM; + } } - } } diff --git a/frmChannelPan.cs b/frmChannelPan.cs index 245306f..20ad020 100644 --- a/frmChannelPan.cs +++ b/frmChannelPan.cs @@ -5,116 +5,116 @@ namespace ViPER4WindowsBin { - public class frmChannelPan : Form - { - private float m_rChannelPan; - private IContainer components; - private Label label_Left; - private Label label_Right; - private HSlider hSlider_Pan; - private SingleButton singleButton_Center; - private Label label_Value; - - public float ChannelPan + public class FrmChannelPan : Form { - get => this.m_rChannelPan; - set - { - this.m_rChannelPan = value; - this.hSlider_Pan.PositionFloat = (float) ((double) this.m_rChannelPan * 0.5 + 0.5); - } - } + private float m_rChannelPan; + private readonly IContainer components; + private Label label_Left; + private Label label_Right; + private HSlider hSlider_Pan; + private SingleButton singleButton_Center; + private Label label_Value; - public frmChannelPan() - { - this.InitializeComponent(); - this.Text = GlobalMessages.CHANNEL_PAN; - this.label_Left.Text = GlobalMessages.LEFT; - this.label_Right.Text = GlobalMessages.RIGHT; - this.singleButton_Center.ButtonText = GlobalMessages.BALANCE; - } + public float ChannelPan + { + get => m_rChannelPan; + set + { + m_rChannelPan = value; + hSlider_Pan.PositionFloat = (float)(m_rChannelPan * 0.5 + 0.5); + } + } - private void hSlider_Pan_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rChannelPan = (float) (((double) fPercent - 0.5) * 2.0); - this.label_Value.Text = this.m_rChannelPan.ToString("F01"); - } + public FrmChannelPan() + { + InitializeComponent(); + Text = GlobalMessages.CHANNEL_PAN; + label_Left.Text = GlobalMessages.LEFT; + label_Right.Text = GlobalMessages.RIGHT; + singleButton_Center.ButtonText = GlobalMessages.BALANCE; + } - private void singleButton_Center_ButtonClickNotify(SingleButton objSender) - { - this.m_rChannelPan = 0.0f; - this.hSlider_Pan.Position = 50U; - } + private void HSlider_Pan_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rChannelPan = (float)(((double)fPercent - 0.5) * 2.0); + label_Value.Text = m_rChannelPan.ToString("F01"); + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private void SingleButton_Center_ButtonClickNotify(SingleButton objSender) + { + m_rChannelPan = 0.0f; + hSlider_Pan.Position = 50U; + } - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmChannelPan)); - this.label_Left = new Label(); - this.label_Right = new Label(); - this.hSlider_Pan = new HSlider(); - this.singleButton_Center = new SingleButton(); - this.label_Value = new Label(); - this.SuspendLayout(); - this.label_Left.AutoSize = true; - this.label_Left.Location = new Point(48, 9); - this.label_Left.Name = "label_Left"; - this.label_Left.Size = new Size(35, 12); - this.label_Left.TabIndex = 0; - this.label_Left.Text = "$LEFT"; - this.label_Right.AutoSize = true; - this.label_Right.Location = new Point(386, 9); - this.label_Right.Name = "label_Right"; - this.label_Right.Size = new Size(41, 12); - this.label_Right.TabIndex = 1; - this.label_Right.Text = "$RIGHT"; - this.hSlider_Pan.BackColor = SystemColors.Control; - this.hSlider_Pan.Location = new Point(24, 29); - this.hSlider_Pan.MoveDelta = 1U; - this.hSlider_Pan.Name = "hSlider_Pan"; - this.hSlider_Pan.Position = 50U; - this.hSlider_Pan.PositionFloat = 0.5f; - this.hSlider_Pan.Size = new Size(403, 47); - this.hSlider_Pan.TabIndex = 2; - this.hSlider_Pan.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Pan_PositionChangeNotify); - this.singleButton_Center.BackColor = SystemColors.Control; - this.singleButton_Center.ButtonText = "$BALANCE"; - this.singleButton_Center.Location = new Point(172, 84); - this.singleButton_Center.Name = "singleButton_Center"; - this.singleButton_Center.Size = new Size(112, 40); - this.singleButton_Center.TabIndex = 3; - this.singleButton_Center.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Center_ButtonClickNotify); - this.label_Value.Location = new Point(170, 9); - this.label_Value.Name = "label_Value"; - this.label_Value.Size = new Size(114, 17); - this.label_Value.TabIndex = 4; - this.label_Value.Text = "0.0"; - this.label_Value.TextAlign = ContentAlignment.TopCenter; - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(456, 140); - this.Controls.Add((Control) this.label_Value); - this.Controls.Add((Control) this.singleButton_Center); - this.Controls.Add((Control) this.hSlider_Pan); - this.Controls.Add((Control) this.label_Right); - this.Controls.Add((Control) this.label_Left); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmChannelPan); - this.ShowInTaskbar = false; - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$CHANNEL_PAN"; - this.ResumeLayout(false); - this.PerformLayout(); + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } + + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmChannelPan)); + label_Left = new Label(); + label_Right = new Label(); + hSlider_Pan = new HSlider(); + singleButton_Center = new SingleButton(); + label_Value = new Label(); + SuspendLayout(); + label_Left.AutoSize = true; + label_Left.Location = new Point(48, 9); + label_Left.Name = "label_Left"; + label_Left.Size = new Size(35, 12); + label_Left.TabIndex = 0; + label_Left.Text = "$LEFT"; + label_Right.AutoSize = true; + label_Right.Location = new Point(386, 9); + label_Right.Name = "label_Right"; + label_Right.Size = new Size(41, 12); + label_Right.TabIndex = 1; + label_Right.Text = "$RIGHT"; + hSlider_Pan.BackColor = SystemColors.Control; + hSlider_Pan.Location = new Point(24, 29); + hSlider_Pan.MoveDelta = 1U; + hSlider_Pan.Name = "hSlider_Pan"; + hSlider_Pan.Position = 50U; + hSlider_Pan.PositionFloat = 0.5f; + hSlider_Pan.Size = new Size(403, 47); + hSlider_Pan.TabIndex = 2; + hSlider_Pan.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Pan_PositionChangeNotify); + singleButton_Center.BackColor = SystemColors.Control; + singleButton_Center.ButtonText = "$BALANCE"; + singleButton_Center.Location = new Point(172, 84); + singleButton_Center.Name = "singleButton_Center"; + singleButton_Center.Size = new Size(112, 40); + singleButton_Center.TabIndex = 3; + singleButton_Center.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Center_ButtonClickNotify); + label_Value.Location = new Point(170, 9); + label_Value.Name = "label_Value"; + label_Value.Size = new Size(114, 17); + label_Value.TabIndex = 4; + label_Value.Text = "0.0"; + label_Value.TextAlign = ContentAlignment.TopCenter; + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(456, 140); + Controls.Add(label_Value); + Controls.Add(singleButton_Center); + Controls.Add(hSlider_Pan); + Controls.Add(label_Right); + Controls.Add(label_Left); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmChannelPan); + ShowInTaskbar = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "$CHANNEL_PAN"; + ResumeLayout(false); + PerformLayout(); + } } - } } diff --git a/frmCheckUpdate.cs b/frmCheckUpdate.cs index 9dfd965..e80a4ce 100644 --- a/frmCheckUpdate.cs +++ b/frmCheckUpdate.cs @@ -10,222 +10,222 @@ namespace ViPER4WindowsBin { - public class frmCheckUpdate : Form - { - private const string m_szCheckUpdateLink = "http://vipersaudio.com/swupdate/viper4windows/version.bin"; - private string m_szDownloadLink = ""; - private IContainer components; - private Label label_CodeName; - private Label label_DriverVersion; - private Label label_ControlPanelVersion; - private GroupBox groupBox_VersionFromInternet; - private Label label_CodeName_Net; - private Label label_DriverVerion_Net; - private Label label_ControlPanelVersion_Net; - private SingleButton singleButton_Check; - private SingleButton singleButton_Copy; - - public frmCheckUpdate() + public class FrmCheckUpdate : Form { - this.InitializeComponent(); - this.Text = GlobalMessages.CHECK_UPDATE; - this.label_ControlPanelVersion.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + 1U.ToString() + "." + 0U.ToString() + "." + 5U.ToString(); - this.label_DriverVersion.Text = GlobalMessages.DRIVER_VERSION + " : " + RuntimeUtils.EffectDriver.GetVersion(); - this.label_CodeName.Text = GlobalMessages.CODE_NAME + " : " + RuntimeUtils.EffectDriver.GetCodeName(); - this.groupBox_VersionFromInternet.Text = GlobalMessages.VERSION_FROM_INTERNET; - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.ButtonText = GlobalMessages.CHECK; - this.singleButton_Copy.ButtonText = GlobalMessages.COPY_DOWNLOAD_LINK; - this.singleButton_Copy.Enabled = false; - } + private const string m_szCheckUpdateLink = "http://vipersaudio.com/swupdate/viper4windows/version.bin"; + private string m_szDownloadLink = ""; + private readonly IContainer components; + private Label label_CodeName; + private Label label_DriverVersion; + private Label label_ControlPanelVersion; + private GroupBox groupBox_VersionFromInternet; + private Label label_CodeName_Net; + private Label label_DriverVerion_Net; + private Label label_ControlPanelVersion_Net; + private SingleButton singleButton_Check; + private SingleButton singleButton_Copy; - private void singleButton_Check_ButtonClickNotify(SingleButton objSender) - { - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; - string path = baseDirectory.EndsWith("\\") ? baseDirectory + "version.txt" : baseDirectory + "\\version.txt"; - try - { - this.singleButton_Check.Enabled = false; - HttpWebRequest httpWebRequest = (HttpWebRequest) WebRequest.Create("http://vipersaudio.com/swupdate/viper4windows/version.bin"); - HttpWebResponse response = (HttpWebResponse) httpWebRequest.GetResponse(); - Stream responseStream = response.GetResponseStream(); - Stream stream = (Stream) new FileStream(path, FileMode.Create); - byte[] buffer = new byte[1024]; - for (int count = responseStream.Read(buffer, 0, buffer.Length); count > 0; count = responseStream.Read(buffer, 0, buffer.Length)) - stream.Write(buffer, 0, count); - stream.Flush(); - stream.Close(); - responseStream.Close(); - response.Close(); - httpWebRequest.Abort(); - StreamReader streamReader = new StreamReader(path, Encoding.Unicode); - string str1 = streamReader.ReadLine(); - string str2 = streamReader.ReadLine(); - string str3 = streamReader.ReadLine(); - string str4 = streamReader.ReadLine(); - streamReader.Close(); - System.IO.File.Delete(path); - if (str1 == null || str2 == null || str3 == null || str4 == null) + public FrmCheckUpdate() { - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = false; + InitializeComponent(); + Text = GlobalMessages.CHECK_UPDATE; + label_ControlPanelVersion.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + 1U.ToString() + "." + 0U.ToString() + "." + 5U.ToString(); + label_DriverVersion.Text = GlobalMessages.DRIVER_VERSION + " : " + RuntimeUtils.EffectDriver.GetVersion(); + label_CodeName.Text = GlobalMessages.CODE_NAME + " : " + RuntimeUtils.EffectDriver.GetCodeName(); + groupBox_VersionFromInternet.Text = GlobalMessages.VERSION_FROM_INTERNET; + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.ButtonText = GlobalMessages.CHECK; + singleButton_Copy.ButtonText = GlobalMessages.COPY_DOWNLOAD_LINK; + singleButton_Copy.Enabled = false; } - else if (str1.Split('.').Length != 3) + + private void SingleButton_Check_ButtonClickNotify(SingleButton objSender) { - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = false; + string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + string path = baseDirectory.EndsWith("\\") ? baseDirectory + "version.txt" : baseDirectory + "\\version.txt"; + try + { + singleButton_Check.Enabled = false; + HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://vipersaudio.com/swupdate/viper4windows/version.bin"); + HttpWebResponse response = (HttpWebResponse)httpWebRequest.GetResponse(); + Stream responseStream = response.GetResponseStream(); + Stream stream = new FileStream(path, FileMode.Create); + byte[] buffer = new byte[1024]; + for (int count = responseStream.Read(buffer, 0, buffer.Length); count > 0; count = responseStream.Read(buffer, 0, buffer.Length)) + stream.Write(buffer, 0, count); + stream.Flush(); + stream.Close(); + responseStream.Close(); + response.Close(); + httpWebRequest.Abort(); + StreamReader streamReader = new StreamReader(path, Encoding.Unicode); + string str1 = streamReader.ReadLine(); + string str2 = streamReader.ReadLine(); + string str3 = streamReader.ReadLine(); + string str4 = streamReader.ReadLine(); + streamReader.Close(); + File.Delete(path); + if (str1 == null || str2 == null || str3 == null || str4 == null) + { + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = false; + } + else if (str1.Split('.').Length != 3) + { + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = false; + } + else if (str2.Split('.').Length != 3) + { + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = false; + } + else if (str3 == "" || str4.Length < 32) + { + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = false; + } + else + { + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + str1; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : " + str2; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : " + str3; + m_szDownloadLink = str4; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = true; + } + } + catch + { + File.Delete(path); + label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; + label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; + label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; + singleButton_Check.Enabled = true; + singleButton_Copy.Enabled = false; + } } - else if (str2.Split('.').Length != 3) + + private void SingleButton_Copy_ButtonClickNotify(SingleButton objSender) { - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = false; + Clipboard.Clear(); + Clipboard.SetText(m_szDownloadLink); } - else if (str3 == "" || str4.Length < 32) + + protected override void Dispose(bool disposing) { - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = false; + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); } - else + + private void InitializeComponent() { - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : " + str1; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : " + str2; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : " + str3; - this.m_szDownloadLink = str4; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = true; + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmCheckUpdate)); + label_CodeName = new Label(); + label_DriverVersion = new Label(); + label_ControlPanelVersion = new Label(); + groupBox_VersionFromInternet = new GroupBox(); + label_CodeName_Net = new Label(); + label_DriverVerion_Net = new Label(); + label_ControlPanelVersion_Net = new Label(); + singleButton_Check = new SingleButton(); + singleButton_Copy = new SingleButton(); + groupBox_VersionFromInternet.SuspendLayout(); + SuspendLayout(); + label_CodeName.AutoSize = true; + label_CodeName.Location = new Point(12, 63); + label_CodeName.Name = "label_CodeName"; + label_CodeName.Size = new Size(65, 12); + label_CodeName.TabIndex = 5; + label_CodeName.Text = "$CODE_NAME"; + label_DriverVersion.AutoSize = true; + label_DriverVersion.Location = new Point(12, 41); + label_DriverVersion.Name = "label_DriverVersion"; + label_DriverVersion.Size = new Size(95, 12); + label_DriverVersion.TabIndex = 4; + label_DriverVersion.Text = "$DRIVER_VERSION"; + label_ControlPanelVersion.AutoSize = true; + label_ControlPanelVersion.Location = new Point(12, 19); + label_ControlPanelVersion.Name = "label_ControlPanelVersion"; + label_ControlPanelVersion.Size = new Size(131, 12); + label_ControlPanelVersion.TabIndex = 3; + label_ControlPanelVersion.Text = "$CONTROLPANEL_VERSION"; + groupBox_VersionFromInternet.Controls.Add(label_CodeName_Net); + groupBox_VersionFromInternet.Controls.Add(label_DriverVerion_Net); + groupBox_VersionFromInternet.Controls.Add(label_ControlPanelVersion_Net); + groupBox_VersionFromInternet.Location = new Point(14, 97); + groupBox_VersionFromInternet.Name = "groupBox_VersionFromInternet"; + groupBox_VersionFromInternet.Size = new Size(332, 96); + groupBox_VersionFromInternet.TabIndex = 6; + groupBox_VersionFromInternet.TabStop = false; + groupBox_VersionFromInternet.Text = "$VERSION_FROM_INTERNET"; + label_CodeName_Net.AutoSize = true; + label_CodeName_Net.Location = new Point(17, 70); + label_CodeName_Net.Name = "label_CodeName_Net"; + label_CodeName_Net.Size = new Size(65, 12); + label_CodeName_Net.TabIndex = 8; + label_CodeName_Net.Text = "$CODE_NAME"; + label_DriverVerion_Net.AutoSize = true; + label_DriverVerion_Net.Location = new Point(17, 48); + label_DriverVerion_Net.Name = "label_DriverVerion_Net"; + label_DriverVerion_Net.Size = new Size(95, 12); + label_DriverVerion_Net.TabIndex = 7; + label_DriverVerion_Net.Text = "$DRIVER_VERSION"; + label_ControlPanelVersion_Net.AutoSize = true; + label_ControlPanelVersion_Net.Location = new Point(17, 26); + label_ControlPanelVersion_Net.Name = "label_ControlPanelVersion_Net"; + label_ControlPanelVersion_Net.Size = new Size(131, 12); + label_ControlPanelVersion_Net.TabIndex = 6; + label_ControlPanelVersion_Net.Text = "$CONTROLPANEL_VERSION"; + singleButton_Check.BackColor = SystemColors.Control; + singleButton_Check.ButtonText = "$CHECK"; + singleButton_Check.Location = new Point(239, 19); + singleButton_Check.Name = "singleButton_Check"; + singleButton_Check.Size = new Size(112, 40); + singleButton_Check.TabIndex = 7; + singleButton_Check.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Check_ButtonClickNotify); + singleButton_Copy.BackColor = SystemColors.Control; + singleButton_Copy.ButtonText = "$COPY_DOWNLOAD_LINK"; + singleButton_Copy.Location = new Point(14, 199); + singleButton_Copy.Name = "singleButton_Copy"; + singleButton_Copy.Size = new Size(166, 40); + singleButton_Copy.TabIndex = 8; + singleButton_Copy.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Copy_ButtonClickNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(363, 250); + Controls.Add(singleButton_Copy); + Controls.Add(singleButton_Check); + Controls.Add(groupBox_VersionFromInternet); + Controls.Add(label_CodeName); + Controls.Add(label_DriverVersion); + Controls.Add(label_ControlPanelVersion); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + Name = nameof(FrmCheckUpdate); + StartPosition = FormStartPosition.CenterScreen; + Text = "$CHECK_UPDATE"; + groupBox_VersionFromInternet.ResumeLayout(false); + groupBox_VersionFromInternet.PerformLayout(); + ResumeLayout(false); + PerformLayout(); } - } - catch - { - System.IO.File.Delete(path); - this.label_ControlPanelVersion_Net.Text = GlobalMessages.CONTROL_PANEL_VERSION + " : N/A"; - this.label_DriverVerion_Net.Text = GlobalMessages.DRIVER_VERSION + " : N/A"; - this.label_CodeName_Net.Text = GlobalMessages.CODE_NAME + " : N/A"; - this.singleButton_Check.Enabled = true; - this.singleButton_Copy.Enabled = false; - } - } - - private void singleButton_Copy_ButtonClickNotify(SingleButton objSender) - { - Clipboard.Clear(); - Clipboard.SetText(this.m_szDownloadLink); - } - - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } - - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmCheckUpdate)); - this.label_CodeName = new Label(); - this.label_DriverVersion = new Label(); - this.label_ControlPanelVersion = new Label(); - this.groupBox_VersionFromInternet = new GroupBox(); - this.label_CodeName_Net = new Label(); - this.label_DriverVerion_Net = new Label(); - this.label_ControlPanelVersion_Net = new Label(); - this.singleButton_Check = new SingleButton(); - this.singleButton_Copy = new SingleButton(); - this.groupBox_VersionFromInternet.SuspendLayout(); - this.SuspendLayout(); - this.label_CodeName.AutoSize = true; - this.label_CodeName.Location = new Point(12, 63); - this.label_CodeName.Name = "label_CodeName"; - this.label_CodeName.Size = new Size(65, 12); - this.label_CodeName.TabIndex = 5; - this.label_CodeName.Text = "$CODE_NAME"; - this.label_DriverVersion.AutoSize = true; - this.label_DriverVersion.Location = new Point(12, 41); - this.label_DriverVersion.Name = "label_DriverVersion"; - this.label_DriverVersion.Size = new Size(95, 12); - this.label_DriverVersion.TabIndex = 4; - this.label_DriverVersion.Text = "$DRIVER_VERSION"; - this.label_ControlPanelVersion.AutoSize = true; - this.label_ControlPanelVersion.Location = new Point(12, 19); - this.label_ControlPanelVersion.Name = "label_ControlPanelVersion"; - this.label_ControlPanelVersion.Size = new Size(131, 12); - this.label_ControlPanelVersion.TabIndex = 3; - this.label_ControlPanelVersion.Text = "$CONTROLPANEL_VERSION"; - this.groupBox_VersionFromInternet.Controls.Add((Control) this.label_CodeName_Net); - this.groupBox_VersionFromInternet.Controls.Add((Control) this.label_DriverVerion_Net); - this.groupBox_VersionFromInternet.Controls.Add((Control) this.label_ControlPanelVersion_Net); - this.groupBox_VersionFromInternet.Location = new Point(14, 97); - this.groupBox_VersionFromInternet.Name = "groupBox_VersionFromInternet"; - this.groupBox_VersionFromInternet.Size = new Size(332, 96); - this.groupBox_VersionFromInternet.TabIndex = 6; - this.groupBox_VersionFromInternet.TabStop = false; - this.groupBox_VersionFromInternet.Text = "$VERSION_FROM_INTERNET"; - this.label_CodeName_Net.AutoSize = true; - this.label_CodeName_Net.Location = new Point(17, 70); - this.label_CodeName_Net.Name = "label_CodeName_Net"; - this.label_CodeName_Net.Size = new Size(65, 12); - this.label_CodeName_Net.TabIndex = 8; - this.label_CodeName_Net.Text = "$CODE_NAME"; - this.label_DriverVerion_Net.AutoSize = true; - this.label_DriverVerion_Net.Location = new Point(17, 48); - this.label_DriverVerion_Net.Name = "label_DriverVerion_Net"; - this.label_DriverVerion_Net.Size = new Size(95, 12); - this.label_DriverVerion_Net.TabIndex = 7; - this.label_DriverVerion_Net.Text = "$DRIVER_VERSION"; - this.label_ControlPanelVersion_Net.AutoSize = true; - this.label_ControlPanelVersion_Net.Location = new Point(17, 26); - this.label_ControlPanelVersion_Net.Name = "label_ControlPanelVersion_Net"; - this.label_ControlPanelVersion_Net.Size = new Size(131, 12); - this.label_ControlPanelVersion_Net.TabIndex = 6; - this.label_ControlPanelVersion_Net.Text = "$CONTROLPANEL_VERSION"; - this.singleButton_Check.BackColor = SystemColors.Control; - this.singleButton_Check.ButtonText = "$CHECK"; - this.singleButton_Check.Location = new Point(239, 19); - this.singleButton_Check.Name = "singleButton_Check"; - this.singleButton_Check.Size = new Size(112, 40); - this.singleButton_Check.TabIndex = 7; - this.singleButton_Check.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Check_ButtonClickNotify); - this.singleButton_Copy.BackColor = SystemColors.Control; - this.singleButton_Copy.ButtonText = "$COPY_DOWNLOAD_LINK"; - this.singleButton_Copy.Location = new Point(14, 199); - this.singleButton_Copy.Name = "singleButton_Copy"; - this.singleButton_Copy.Size = new Size(166, 40); - this.singleButton_Copy.TabIndex = 8; - this.singleButton_Copy.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Copy_ButtonClickNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(363, 250); - this.Controls.Add((Control) this.singleButton_Copy); - this.Controls.Add((Control) this.singleButton_Check); - this.Controls.Add((Control) this.groupBox_VersionFromInternet); - this.Controls.Add((Control) this.label_CodeName); - this.Controls.Add((Control) this.label_DriverVersion); - this.Controls.Add((Control) this.label_ControlPanelVersion); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.Name = nameof (frmCheckUpdate); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$CHECK_UPDATE"; - this.groupBox_VersionFromInternet.ResumeLayout(false); - this.groupBox_VersionFromInternet.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); } - } } diff --git a/frmCompressor.cs b/frmCompressor.cs index 1efc3df..f37daaa 100644 --- a/frmCompressor.cs +++ b/frmCompressor.cs @@ -7,749 +7,773 @@ namespace ViPER4WindowsBin { - public class frmCompressor : Form - { - private IContainer components; - private OnOffSwitch onOffSwitch_Compressor; - private Label label_Compressor_Enable; - private GroupBox groupBox_Threshold; - private HSlider hSlider_Threshold; - private Label label_Threshold; - private GroupBox groupBox_Knee; - private Label label_Knee; - private HSlider hSlider_Knee; - private Label label_AutoKnee; - private OnOffSwitch onOffSwitch_AutoKnee; - private GroupBox groupBox_Ratio; - private Label label_Ratio; - private HSlider hSlider_Ratio; - private GroupBox groupBox_Release; - private OnOffSwitch onOffSwitch_AutoRelease; - private Label label_AutoRelease; - private Label label_Release; - private HSlider hSlider_Release; - private GroupBox groupBox_Attack; - private OnOffSwitch onOffSwitch_AutoAttack; - private Label label_AutoAttack; - private Label label_Attack; - private HSlider hSlider_Attack; - private SingleButton singleButton_Cancel; - private SingleButton singleButton_OK; - private GroupBox groupBox_MakeUpGain; - private Label label_Gain; - private HSlider hSlider_Gain; - private OnOffSwitch onOffSwitch_AutoGain; - private Label label_AutoGain; - private Label label_NoClip; - private OnOffSwitch onOffSwitch_NoClip; - private GroupBox groupBox_Misc; - private Label label_KneeMult; - private Label label_KneeMultValue; - private HSlider hSlider_KneeMult; - private Label label_Adapt; - private Label label_AdaptValue; - private HSlider hSlider_Adapt; - private Label label_Crest; - private Label label_CrestValue; - private HSlider hSlider_Crest; - private bool m_bCompressorEnabled; - private float m_rThreshold; - private float m_rKneewidth; - private bool m_bAutoKnee = true; - private float m_rRatio; - private float m_rAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); - private bool m_bAutoAttack = true; - private float m_rRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); - private bool m_bAutoRelease = true; - private float m_rMakeupGain; - private bool m_bAutoGain = true; - private bool m_bNoClip = true; - private float m_rKneeMult = Parameters.LIN2PARAM(2f, 0.0f, 4f); - private float m_rCrestTime = Parameters.LOG2PARAM(0.2f, 0.005f, 2f); - private float m_rAdaptTime = Parameters.LOG2PARAM(2.5f, 1f, 4f); - - protected override void Dispose(bool disposing) + public class FrmCompressor : Form { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); + private readonly IContainer components; + private OnOffSwitch onOffSwitch_Compressor; + private Label label_Compressor_Enable; + private GroupBox groupBox_Threshold; + private HSlider hSlider_Threshold; + private Label label_Threshold; + private GroupBox groupBox_Knee; + private Label label_Knee; + private HSlider hSlider_Knee; + private Label label_AutoKnee; + private OnOffSwitch onOffSwitch_AutoKnee; + private GroupBox groupBox_Ratio; + private Label label_Ratio; + private HSlider hSlider_Ratio; + private GroupBox groupBox_Release; + private OnOffSwitch onOffSwitch_AutoRelease; + private Label label_AutoRelease; + private Label label_Release; + private HSlider hSlider_Release; + private GroupBox groupBox_Attack; + private OnOffSwitch onOffSwitch_AutoAttack; + private Label label_AutoAttack; + private Label label_Attack; + private HSlider hSlider_Attack; + private SingleButton singleButton_Cancel; + private SingleButton singleButton_OK; + private GroupBox groupBox_MakeUpGain; + private Label label_Gain; + private HSlider hSlider_Gain; + private OnOffSwitch onOffSwitch_AutoGain; + private Label label_AutoGain; + private Label label_NoClip; + private OnOffSwitch onOffSwitch_NoClip; + private GroupBox groupBox_Misc; + private Label label_KneeMult; + private Label label_KneeMultValue; + private HSlider hSlider_KneeMult; + private Label label_Adapt; + private Label label_AdaptValue; + private HSlider hSlider_Adapt; + private Label label_Crest; + private Label label_CrestValue; + private HSlider hSlider_Crest; + private bool m_bCompressorEnabled; + private float m_rThreshold; + private float m_rKneewidth; + private bool m_bAutoKnee = true; + private float m_rRatio; + private float m_rAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); + private bool m_bAutoAttack = true; + private float m_rRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); + private bool m_bAutoRelease = true; + private float m_rMakeupGain; + private bool m_bAutoGain = true; + private bool m_bNoClip = true; + private float m_rKneeMult = Parameters.LIN2PARAM(2f, 0.0f, 4f); + private float m_rCrestTime = Parameters.LOG2PARAM(0.2f, 0.005f, 2f); + private float m_rAdaptTime = Parameters.LOG2PARAM(2.5f, 1f, 4f); + + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } + + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmCompressor)); + onOffSwitch_Compressor = new OnOffSwitch(); + label_Compressor_Enable = new Label(); + groupBox_Threshold = new GroupBox(); + label_Threshold = new Label(); + hSlider_Threshold = new HSlider(); + groupBox_Knee = new GroupBox(); + onOffSwitch_AutoKnee = new OnOffSwitch(); + label_AutoKnee = new Label(); + label_Knee = new Label(); + hSlider_Knee = new HSlider(); + groupBox_Ratio = new GroupBox(); + label_Ratio = new Label(); + hSlider_Ratio = new HSlider(); + groupBox_Release = new GroupBox(); + onOffSwitch_AutoRelease = new OnOffSwitch(); + label_AutoRelease = new Label(); + label_Release = new Label(); + hSlider_Release = new HSlider(); + groupBox_Attack = new GroupBox(); + onOffSwitch_AutoAttack = new OnOffSwitch(); + label_AutoAttack = new Label(); + label_Attack = new Label(); + hSlider_Attack = new HSlider(); + singleButton_Cancel = new SingleButton(); + singleButton_OK = new SingleButton(); + groupBox_MakeUpGain = new GroupBox(); + onOffSwitch_AutoGain = new OnOffSwitch(); + label_AutoGain = new Label(); + label_Gain = new Label(); + hSlider_Gain = new HSlider(); + label_NoClip = new Label(); + onOffSwitch_NoClip = new OnOffSwitch(); + groupBox_Misc = new GroupBox(); + label_Adapt = new Label(); + label_AdaptValue = new Label(); + hSlider_Adapt = new HSlider(); + label_Crest = new Label(); + label_CrestValue = new Label(); + hSlider_Crest = new HSlider(); + label_KneeMult = new Label(); + label_KneeMultValue = new Label(); + hSlider_KneeMult = new HSlider(); + groupBox_Threshold.SuspendLayout(); + groupBox_Knee.SuspendLayout(); + groupBox_Ratio.SuspendLayout(); + groupBox_Release.SuspendLayout(); + groupBox_Attack.SuspendLayout(); + groupBox_MakeUpGain.SuspendLayout(); + groupBox_Misc.SuspendLayout(); + SuspendLayout(); + onOffSwitch_Compressor.BackColor = Color.Transparent; + onOffSwitch_Compressor.Location = new Point(12, 29); + onOffSwitch_Compressor.Name = "onOffSwitch_Compressor"; + onOffSwitch_Compressor.Size = new Size(107, 28); + onOffSwitch_Compressor.SwitchedOn = false; + onOffSwitch_Compressor.TabIndex = 3; + onOffSwitch_Compressor.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_Compressor_SwitchChangeNotify); + label_Compressor_Enable.AutoSize = true; + label_Compressor_Enable.Location = new Point(12, 14); + label_Compressor_Enable.Name = "label_Compressor_Enable"; + label_Compressor_Enable.Size = new Size(47, 12); + label_Compressor_Enable.TabIndex = 2; + label_Compressor_Enable.Text = "$ENABLE"; + groupBox_Threshold.Controls.Add(label_Threshold); + groupBox_Threshold.Controls.Add(hSlider_Threshold); + groupBox_Threshold.Location = new Point(12, 73); + groupBox_Threshold.Name = "groupBox_Threshold"; + groupBox_Threshold.Size = new Size(548, 61); + groupBox_Threshold.TabIndex = 4; + groupBox_Threshold.TabStop = false; + groupBox_Threshold.Text = "$COMPRESSOR_THRESHOLD"; + label_Threshold.AutoSize = true; + label_Threshold.Location = new Point(475, 29); + label_Threshold.Name = "label_Threshold"; + label_Threshold.Size = new Size(23, 12); + label_Threshold.TabIndex = 5; + label_Threshold.Text = "0dB"; + hSlider_Threshold.BackColor = SystemColors.Control; + hSlider_Threshold.Location = new Point(6, 20); + hSlider_Threshold.MoveDelta = 1U; + hSlider_Threshold.Name = "hSlider_Threshold"; + hSlider_Threshold.Position = 0U; + hSlider_Threshold.PositionFloat = 0.0f; + hSlider_Threshold.Size = new Size(463, 29); + hSlider_Threshold.TabIndex = 5; + hSlider_Threshold.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Threshold_PositionChangeNotify); + groupBox_Knee.Controls.Add(onOffSwitch_AutoKnee); + groupBox_Knee.Controls.Add(label_AutoKnee); + groupBox_Knee.Controls.Add(label_Knee); + groupBox_Knee.Controls.Add(hSlider_Knee); + groupBox_Knee.Location = new Point(12, 140); + groupBox_Knee.Name = "groupBox_Knee"; + groupBox_Knee.Size = new Size(271, 115); + groupBox_Knee.TabIndex = 5; + groupBox_Knee.TabStop = false; + groupBox_Knee.Text = "$COMPRESSOR_KNEEWIDTH"; + onOffSwitch_AutoKnee.BackColor = Color.Transparent; + onOffSwitch_AutoKnee.Location = new Point(22, 41); + onOffSwitch_AutoKnee.Name = "onOffSwitch_AutoKnee"; + onOffSwitch_AutoKnee.Size = new Size(49, 22); + onOffSwitch_AutoKnee.SwitchedOn = false; + onOffSwitch_AutoKnee.TabIndex = 6; + onOffSwitch_AutoKnee.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoKnee_SwitchChangeNotify); + label_AutoKnee.AutoSize = true; + label_AutoKnee.Location = new Point(20, 26); + label_AutoKnee.Name = "label_AutoKnee"; + label_AutoKnee.Size = new Size(125, 12); + label_AutoKnee.TabIndex = 6; + label_AutoKnee.Text = "$COMPRESSOR_AUTOKNEE"; + label_Knee.AutoSize = true; + label_Knee.Location = new Point(198, 81); + label_Knee.Name = "label_Knee"; + label_Knee.Size = new Size(23, 12); + label_Knee.TabIndex = 5; + label_Knee.Text = "0dB"; + hSlider_Knee.BackColor = SystemColors.Control; + hSlider_Knee.Location = new Point(7, 72); + hSlider_Knee.MoveDelta = 1U; + hSlider_Knee.Name = "hSlider_Knee"; + hSlider_Knee.Position = 0U; + hSlider_Knee.PositionFloat = 0.0f; + hSlider_Knee.Size = new Size(185, 31); + hSlider_Knee.TabIndex = 5; + hSlider_Knee.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Knee_PositionChangeNotify); + groupBox_Ratio.Controls.Add(label_Ratio); + groupBox_Ratio.Controls.Add(hSlider_Ratio); + groupBox_Ratio.Location = new Point(289, 140); + groupBox_Ratio.Name = "groupBox_Ratio"; + groupBox_Ratio.Size = new Size(271, 115); + groupBox_Ratio.TabIndex = 6; + groupBox_Ratio.TabStop = false; + groupBox_Ratio.Text = "$COMPRESSOR_RATIO"; + label_Ratio.AutoSize = true; + label_Ratio.Location = new Point(198, 54); + label_Ratio.Name = "label_Ratio"; + label_Ratio.Size = new Size(41, 12); + label_Ratio.TabIndex = 5; + label_Ratio.Text = "1.00:1"; + hSlider_Ratio.BackColor = SystemColors.Control; + hSlider_Ratio.Location = new Point(7, 45); + hSlider_Ratio.MoveDelta = 1U; + hSlider_Ratio.Name = "hSlider_Ratio"; + hSlider_Ratio.Position = 0U; + hSlider_Ratio.PositionFloat = 0.0f; + hSlider_Ratio.Size = new Size(185, 31); + hSlider_Ratio.TabIndex = 5; + hSlider_Ratio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Ratio_PositionChangeNotify); + groupBox_Release.Controls.Add(onOffSwitch_AutoRelease); + groupBox_Release.Controls.Add(label_AutoRelease); + groupBox_Release.Controls.Add(label_Release); + groupBox_Release.Controls.Add(hSlider_Release); + groupBox_Release.Location = new Point(289, 261); + groupBox_Release.Name = "groupBox_Release"; + groupBox_Release.Size = new Size(271, 115); + groupBox_Release.TabIndex = 8; + groupBox_Release.TabStop = false; + groupBox_Release.Text = "$COMPRESSOR_RELEASE"; + onOffSwitch_AutoRelease.BackColor = Color.Transparent; + onOffSwitch_AutoRelease.Location = new Point(22, 41); + onOffSwitch_AutoRelease.Name = "onOffSwitch_AutoRelease"; + onOffSwitch_AutoRelease.Size = new Size(49, 22); + onOffSwitch_AutoRelease.SwitchedOn = false; + onOffSwitch_AutoRelease.TabIndex = 6; + onOffSwitch_AutoRelease.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoRelease_SwitchChangeNotify); + label_AutoRelease.AutoSize = true; + label_AutoRelease.Location = new Point(20, 26); + label_AutoRelease.Name = "label_AutoRelease"; + label_AutoRelease.Size = new Size(143, 12); + label_AutoRelease.TabIndex = 6; + label_AutoRelease.Text = "$COMPRESSOR_AUTORELEASE"; + label_Release.AutoSize = true; + label_Release.Location = new Point(198, 81); + label_Release.Name = "label_Release"; + label_Release.Size = new Size(41, 12); + label_Release.TabIndex = 5; + label_Release.Text = "5.00ms"; + hSlider_Release.BackColor = SystemColors.Control; + hSlider_Release.Location = new Point(7, 72); + hSlider_Release.MoveDelta = 1U; + hSlider_Release.Name = "hSlider_Release"; + hSlider_Release.Position = 0U; + hSlider_Release.PositionFloat = 0.0f; + hSlider_Release.Size = new Size(185, 31); + hSlider_Release.TabIndex = 5; + hSlider_Release.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Release_PositionChangeNotify); + groupBox_Attack.Controls.Add(onOffSwitch_AutoAttack); + groupBox_Attack.Controls.Add(label_AutoAttack); + groupBox_Attack.Controls.Add(label_Attack); + groupBox_Attack.Controls.Add(hSlider_Attack); + groupBox_Attack.Location = new Point(12, 261); + groupBox_Attack.Name = "groupBox_Attack"; + groupBox_Attack.Size = new Size(271, 115); + groupBox_Attack.TabIndex = 7; + groupBox_Attack.TabStop = false; + groupBox_Attack.Text = "$COMPRESSOR_ATTACK"; + onOffSwitch_AutoAttack.BackColor = Color.Transparent; + onOffSwitch_AutoAttack.Location = new Point(22, 41); + onOffSwitch_AutoAttack.Name = "onOffSwitch_AutoAttack"; + onOffSwitch_AutoAttack.Size = new Size(49, 22); + onOffSwitch_AutoAttack.SwitchedOn = false; + onOffSwitch_AutoAttack.TabIndex = 6; + onOffSwitch_AutoAttack.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoAttack_SwitchChangeNotify); + label_AutoAttack.AutoSize = true; + label_AutoAttack.Location = new Point(20, 26); + label_AutoAttack.Name = "label_AutoAttack"; + label_AutoAttack.Size = new Size(137, 12); + label_AutoAttack.TabIndex = 6; + label_AutoAttack.Text = "$COMPRESSOR_AUTOATTACK"; + label_Attack.AutoSize = true; + label_Attack.Location = new Point(198, 81); + label_Attack.Name = "label_Attack"; + label_Attack.Size = new Size(41, 12); + label_Attack.TabIndex = 5; + label_Attack.Text = "0.10ms"; + hSlider_Attack.BackColor = SystemColors.Control; + hSlider_Attack.Location = new Point(7, 72); + hSlider_Attack.MoveDelta = 1U; + hSlider_Attack.Name = "hSlider_Attack"; + hSlider_Attack.Position = 0U; + hSlider_Attack.PositionFloat = 0.0f; + hSlider_Attack.Size = new Size(185, 31); + hSlider_Attack.TabIndex = 5; + hSlider_Attack.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Attack_PositionChangeNotify); + singleButton_Cancel.BackColor = SystemColors.Control; + singleButton_Cancel.ButtonText = "$CANCEL"; + singleButton_Cancel.Location = new Point(448, 20); + singleButton_Cancel.Name = "singleButton_Cancel"; + singleButton_Cancel.Size = new Size(112, 40); + singleButton_Cancel.TabIndex = 9; + singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + singleButton_OK.BackColor = SystemColors.Control; + singleButton_OK.ButtonText = "$OK"; + singleButton_OK.Location = new Point(328, 20); + singleButton_OK.Name = "singleButton_OK"; + singleButton_OK.Size = new Size(112, 40); + singleButton_OK.TabIndex = 10; + singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + groupBox_MakeUpGain.Controls.Add(onOffSwitch_AutoGain); + groupBox_MakeUpGain.Controls.Add(label_AutoGain); + groupBox_MakeUpGain.Controls.Add(label_Gain); + groupBox_MakeUpGain.Controls.Add(hSlider_Gain); + groupBox_MakeUpGain.Location = new Point(12, 516); + groupBox_MakeUpGain.Name = "groupBox_MakeUpGain"; + groupBox_MakeUpGain.Size = new Size(548, 110); + groupBox_MakeUpGain.TabIndex = 11; + groupBox_MakeUpGain.TabStop = false; + groupBox_MakeUpGain.Text = "$COMPRESSOR_MAKEUPGAIN"; + onOffSwitch_AutoGain.BackColor = Color.Transparent; + onOffSwitch_AutoGain.Location = new Point(22, 41); + onOffSwitch_AutoGain.Name = "onOffSwitch_AutoGain"; + onOffSwitch_AutoGain.Size = new Size(49, 22); + onOffSwitch_AutoGain.SwitchedOn = false; + onOffSwitch_AutoGain.TabIndex = 8; + onOffSwitch_AutoGain.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoGain_SwitchChangeNotify); + label_AutoGain.AutoSize = true; + label_AutoGain.Location = new Point(20, 26); + label_AutoGain.Name = "label_AutoGain"; + label_AutoGain.Size = new Size(125, 12); + label_AutoGain.TabIndex = 7; + label_AutoGain.Text = "$COMPRESSOR_AUTOGAIN"; + label_Gain.AutoSize = true; + label_Gain.Location = new Point(475, 79); + label_Gain.Name = "label_Gain"; + label_Gain.Size = new Size(23, 12); + label_Gain.TabIndex = 5; + label_Gain.Text = "0dB"; + hSlider_Gain.BackColor = SystemColors.Control; + hSlider_Gain.Location = new Point(7, 71); + hSlider_Gain.MoveDelta = 1U; + hSlider_Gain.Name = "hSlider_Gain"; + hSlider_Gain.Position = 0U; + hSlider_Gain.PositionFloat = 0.0f; + hSlider_Gain.Size = new Size(462, 29); + hSlider_Gain.TabIndex = 5; + hSlider_Gain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Gain_PositionChangeNotify); + label_NoClip.AutoSize = true; + label_NoClip.Location = new Point(163, 14); + label_NoClip.Name = "label_NoClip"; + label_NoClip.Size = new Size(113, 12); + label_NoClip.TabIndex = 12; + label_NoClip.Text = "$COMPRESSOR_NOCLIP"; + onOffSwitch_NoClip.BackColor = Color.Transparent; + onOffSwitch_NoClip.Location = new Point(165, 29); + onOffSwitch_NoClip.Name = "onOffSwitch_NoClip"; + onOffSwitch_NoClip.Size = new Size(107, 28); + onOffSwitch_NoClip.SwitchedOn = false; + onOffSwitch_NoClip.TabIndex = 13; + onOffSwitch_NoClip.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_NoClip_SwitchChangeNotify); + groupBox_Misc.Controls.Add(label_Adapt); + groupBox_Misc.Controls.Add(label_AdaptValue); + groupBox_Misc.Controls.Add(hSlider_Adapt); + groupBox_Misc.Controls.Add(label_Crest); + groupBox_Misc.Controls.Add(label_CrestValue); + groupBox_Misc.Controls.Add(hSlider_Crest); + groupBox_Misc.Controls.Add(label_KneeMult); + groupBox_Misc.Controls.Add(label_KneeMultValue); + groupBox_Misc.Controls.Add(hSlider_KneeMult); + groupBox_Misc.Location = new Point(12, 382); + groupBox_Misc.Name = "groupBox_Misc"; + groupBox_Misc.Size = new Size(548, 128); + groupBox_Misc.TabIndex = 14; + groupBox_Misc.TabStop = false; + groupBox_Misc.Text = "$COMPRESSOR_MISC"; + label_Adapt.AutoSize = true; + label_Adapt.Location = new Point(297, 76); + label_Adapt.Name = "label_Adapt"; + label_Adapt.Size = new Size(131, 12); + label_Adapt.TabIndex = 12; + label_Adapt.Text = "$COMPRESSOR_ADAPTTIME"; + label_AdaptValue.AutoSize = true; + label_AdaptValue.Location = new Point(475, 100); + label_AdaptValue.Name = "label_AdaptValue"; + label_AdaptValue.Size = new Size(41, 12); + label_AdaptValue.TabIndex = 11; + label_AdaptValue.Text = "0.00ms"; + hSlider_Adapt.BackColor = SystemColors.Control; + hSlider_Adapt.Location = new Point(284, 91); + hSlider_Adapt.MoveDelta = 1U; + hSlider_Adapt.Name = "hSlider_Adapt"; + hSlider_Adapt.Position = 0U; + hSlider_Adapt.PositionFloat = 0.0f; + hSlider_Adapt.Size = new Size(185, 31); + hSlider_Adapt.TabIndex = 10; + hSlider_Adapt.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Adapt_PositionChangeNotify); + label_Crest.AutoSize = true; + label_Crest.Location = new Point(297, 20); + label_Crest.Name = "label_Crest"; + label_Crest.Size = new Size(131, 12); + label_Crest.TabIndex = 9; + label_Crest.Text = "$COMPRESSOR_CRESTTIME"; + label_CrestValue.AutoSize = true; + label_CrestValue.Location = new Point(475, 44); + label_CrestValue.Name = "label_CrestValue"; + label_CrestValue.Size = new Size(41, 12); + label_CrestValue.TabIndex = 8; + label_CrestValue.Text = "0.00ms"; + hSlider_Crest.BackColor = SystemColors.Control; + hSlider_Crest.Location = new Point(284, 35); + hSlider_Crest.MoveDelta = 1U; + hSlider_Crest.Name = "hSlider_Crest"; + hSlider_Crest.Position = 0U; + hSlider_Crest.PositionFloat = 0.0f; + hSlider_Crest.Size = new Size(185, 31); + hSlider_Crest.TabIndex = 7; + hSlider_Crest.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Crest_PositionChangeNotify); + label_KneeMult.AutoSize = true; + label_KneeMult.Location = new Point(20, 43); + label_KneeMult.Name = "label_KneeMult"; + label_KneeMult.Size = new Size(125, 12); + label_KneeMult.TabIndex = 6; + label_KneeMult.Text = "$COMPRESSOR_KNEEMULT"; + label_KneeMultValue.AutoSize = true; + label_KneeMultValue.Location = new Point(198, 67); + label_KneeMultValue.Name = "label_KneeMultValue"; + label_KneeMultValue.Size = new Size(35, 12); + label_KneeMultValue.TabIndex = 5; + label_KneeMultValue.Text = "2.00x"; + hSlider_KneeMult.BackColor = SystemColors.Control; + hSlider_KneeMult.Location = new Point(7, 58); + hSlider_KneeMult.MoveDelta = 1U; + hSlider_KneeMult.Name = "hSlider_KneeMult"; + hSlider_KneeMult.Position = 0U; + hSlider_KneeMult.PositionFloat = 0.0f; + hSlider_KneeMult.Size = new Size(185, 31); + hSlider_KneeMult.TabIndex = 5; + hSlider_KneeMult.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_KneeMult_PositionChangeNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(574, 637); + Controls.Add(groupBox_Misc); + Controls.Add(onOffSwitch_NoClip); + Controls.Add(label_NoClip); + Controls.Add(groupBox_MakeUpGain); + Controls.Add(singleButton_OK); + Controls.Add(singleButton_Cancel); + Controls.Add(groupBox_Release); + Controls.Add(groupBox_Attack); + Controls.Add(groupBox_Ratio); + Controls.Add(groupBox_Knee); + Controls.Add(groupBox_Threshold); + Controls.Add(onOffSwitch_Compressor); + Controls.Add(label_Compressor_Enable); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + Name = nameof(FrmCompressor); + StartPosition = FormStartPosition.CenterScreen; + Text = "$COMPRESSOR"; + groupBox_Threshold.ResumeLayout(false); + groupBox_Threshold.PerformLayout(); + groupBox_Knee.ResumeLayout(false); + groupBox_Knee.PerformLayout(); + groupBox_Ratio.ResumeLayout(false); + groupBox_Ratio.PerformLayout(); + groupBox_Release.ResumeLayout(false); + groupBox_Release.PerformLayout(); + groupBox_Attack.ResumeLayout(false); + groupBox_Attack.PerformLayout(); + groupBox_MakeUpGain.ResumeLayout(false); + groupBox_MakeUpGain.PerformLayout(); + groupBox_Misc.ResumeLayout(false); + groupBox_Misc.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } + + public bool CompressorEnabled + { + get => m_bCompressorEnabled; + set + { + m_bCompressorEnabled = value; + UpdateUI(); + } + } + + public float Threshold + { + get => m_rThreshold; + set + { + m_rThreshold = value; + UpdateUI(); + } + } + + public float KneeWidth + { + get => m_rKneewidth; + set + { + m_rKneewidth = value; + UpdateUI(); + } + } + + public bool AutoKnee + { + get => m_bAutoKnee; + set + { + m_bAutoKnee = value; + UpdateUI(); + } + } + + public float Ratio + { + get => m_rRatio; + set + { + m_rRatio = value; + UpdateUI(); + } + } + + public float AttackTime + { + get => m_rAttack; + set + { + m_rAttack = value; + UpdateUI(); + } + } + + public bool AutoAttack + { + get => m_bAutoAttack; + set + { + m_bAutoAttack = value; + UpdateUI(); + } + } + + public float ReleaseTime + { + get => m_rRelease; + set + { + m_rRelease = value; + UpdateUI(); + } + } + + public bool AutoRelease + { + get => m_bAutoRelease; + set + { + m_bAutoRelease = value; + UpdateUI(); + } + } + + public float MakeupGain + { + get => m_rMakeupGain; + set + { + m_rMakeupGain = value; + UpdateUI(); + } + } + + public bool AutoGain + { + get => m_bAutoGain; + set + { + m_bAutoGain = value; + UpdateUI(); + } + } + + public bool NoClip + { + get => m_bNoClip; + set + { + m_bNoClip = value; + UpdateUI(); + } + } + + public float KneeMult + { + get => m_rKneeMult; + set + { + m_rKneeMult = value; + UpdateUI(); + } + } + + public float CrestTime + { + get => m_rCrestTime; + set + { + m_rCrestTime = value; + UpdateUI(); + } + } + + public float AdaptTime + { + get => m_rAdaptTime; + set + { + m_rAdaptTime = value; + UpdateUI(); + } + } + + public FrmCompressor() + { + InitializeComponent(); + Text = GlobalMessages.COMPRESSOR; + singleButton_OK.ButtonText = GlobalMessages.OK; + singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + label_Compressor_Enable.Text = GlobalMessages.ENABLE; + label_NoClip.Text = GlobalMessages.COMPRESSOR_NOCLIP; + groupBox_Threshold.Text = GlobalMessages.COMPRESSOR_THRESHOLD; + groupBox_Knee.Text = GlobalMessages.COMPRESSOR_KNEEWIDTH; + label_AutoKnee.Text = GlobalMessages.COMPRESSOR_AUTOKNEE; + groupBox_Ratio.Text = GlobalMessages.COMPRESSOR_RATIO; + groupBox_Attack.Text = GlobalMessages.COMPRESSOR_ATTACK; + label_AutoAttack.Text = GlobalMessages.COMPRESSOR_AUTOATTACK; + groupBox_Release.Text = GlobalMessages.COMPRESSOR_RELEASE; + label_AutoRelease.Text = GlobalMessages.COMPRESSOR_AUTORELEASE; + groupBox_Misc.Text = GlobalMessages.COMPRESSOR_MISC; + label_KneeMult.Text = GlobalMessages.COMPRESSOR_KNEEMULT; + label_Crest.Text = GlobalMessages.COMPRESSOR_CRESTTIME; + label_Adapt.Text = GlobalMessages.COMPRESSOR_ADAPTTIME; + groupBox_MakeUpGain.Text = GlobalMessages.COMPRESSOR_MAKEUPGAIN; + label_AutoGain.Text = GlobalMessages.COMPRESSOR_AUTOGAIN; + UpdateUI(); + } + + private void UpdateUI() + { + onOffSwitch_Compressor.SwitchedOn = m_bCompressorEnabled; + onOffSwitch_NoClip.SwitchedOn = m_bNoClip; + onOffSwitch_AutoKnee.SwitchedOn = m_bAutoKnee; + onOffSwitch_AutoAttack.SwitchedOn = m_bAutoAttack; + onOffSwitch_AutoRelease.SwitchedOn = m_bAutoRelease; + onOffSwitch_AutoGain.SwitchedOn = m_bAutoGain; + hSlider_Threshold.Position = (uint)(m_rThreshold * 100.0); + hSlider_Knee.Position = (uint)(m_rKneewidth * 100.0); + hSlider_Ratio.Position = (uint)(m_rRatio * 100.0); + hSlider_Attack.Position = (uint)(m_rAttack * 100.0); + hSlider_Release.Position = (uint)(m_rRelease * 100.0); + hSlider_KneeMult.Position = (uint)(m_rKneeMult * 100.0); + hSlider_Crest.Position = (uint)(m_rCrestTime * 100.0); + hSlider_Adapt.Position = (uint)(m_rAdaptTime * 100.0); + hSlider_Gain.Position = (uint)(m_rMakeupGain * 100.0); + } + + private void OnOffSwitch_Compressor_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bCompressorEnabled = bSwitchedOn; + } + + private void OnOffSwitch_NoClip_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bNoClip = bSwitchedOn; + } + + private void OnOffSwitch_AutoKnee_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoKnee = bSwitchedOn; + } + + private void OnOffSwitch_AutoAttack_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoAttack = bSwitchedOn; + } + + private void OnOffSwitch_AutoRelease_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoRelease = bSwitchedOn; + } + + private void OnOffSwitch_AutoGain_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoGain = bSwitchedOn; + } + + private void HSlider_Threshold_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rThreshold = fPercent; + label_Threshold.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * -60.0 / 20.0))).ToString("F02") + "dB"; + } + + private void HSlider_Knee_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rKneewidth = fPercent; + label_Knee.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; + } + + private void HSlider_Ratio_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rRatio = fPercent; + if ((double)fPercent > 0.99000000953674316) + label_Ratio.Text = "oo:1"; + else + label_Ratio.Text = (1.0 / (1.0 - (double)fPercent)).ToString("F02") + ":1"; + } + + private void HSlider_Attack_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rAttack = fPercent; + label_Attack.Text = ((double)Parameters.PARAM2LOG(fPercent, 0.0001f, 0.2f) * 1000.0).ToString("F02") + "ms"; + } + + private void HSlider_Release_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rRelease = fPercent; + label_Release.Text = ((double)Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; + } + + private void HSlider_KneeMult_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rKneeMult = fPercent; + label_KneeMultValue.Text = Parameters.PARAM2LIN(fPercent, 0.0f, 4f).ToString("F02") + "x"; + } + + private void HSlider_Crest_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rCrestTime = fPercent; + label_CrestValue.Text = ((double)Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; + } + + private void HSlider_Adapt_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rAdaptTime = fPercent; + label_AdaptValue.Text = ((double)Parameters.PARAM2LOG(fPercent, 1f, 4f) * 1000.0).ToString("F02") + "ms"; + } + + private void HSlider_Gain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rMakeupGain = fPercent; + label_Gain.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; + } + + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } + + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } } - - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmCompressor)); - this.onOffSwitch_Compressor = new OnOffSwitch(); - this.label_Compressor_Enable = new Label(); - this.groupBox_Threshold = new GroupBox(); - this.label_Threshold = new Label(); - this.hSlider_Threshold = new HSlider(); - this.groupBox_Knee = new GroupBox(); - this.onOffSwitch_AutoKnee = new OnOffSwitch(); - this.label_AutoKnee = new Label(); - this.label_Knee = new Label(); - this.hSlider_Knee = new HSlider(); - this.groupBox_Ratio = new GroupBox(); - this.label_Ratio = new Label(); - this.hSlider_Ratio = new HSlider(); - this.groupBox_Release = new GroupBox(); - this.onOffSwitch_AutoRelease = new OnOffSwitch(); - this.label_AutoRelease = new Label(); - this.label_Release = new Label(); - this.hSlider_Release = new HSlider(); - this.groupBox_Attack = new GroupBox(); - this.onOffSwitch_AutoAttack = new OnOffSwitch(); - this.label_AutoAttack = new Label(); - this.label_Attack = new Label(); - this.hSlider_Attack = new HSlider(); - this.singleButton_Cancel = new SingleButton(); - this.singleButton_OK = new SingleButton(); - this.groupBox_MakeUpGain = new GroupBox(); - this.onOffSwitch_AutoGain = new OnOffSwitch(); - this.label_AutoGain = new Label(); - this.label_Gain = new Label(); - this.hSlider_Gain = new HSlider(); - this.label_NoClip = new Label(); - this.onOffSwitch_NoClip = new OnOffSwitch(); - this.groupBox_Misc = new GroupBox(); - this.label_Adapt = new Label(); - this.label_AdaptValue = new Label(); - this.hSlider_Adapt = new HSlider(); - this.label_Crest = new Label(); - this.label_CrestValue = new Label(); - this.hSlider_Crest = new HSlider(); - this.label_KneeMult = new Label(); - this.label_KneeMultValue = new Label(); - this.hSlider_KneeMult = new HSlider(); - this.groupBox_Threshold.SuspendLayout(); - this.groupBox_Knee.SuspendLayout(); - this.groupBox_Ratio.SuspendLayout(); - this.groupBox_Release.SuspendLayout(); - this.groupBox_Attack.SuspendLayout(); - this.groupBox_MakeUpGain.SuspendLayout(); - this.groupBox_Misc.SuspendLayout(); - this.SuspendLayout(); - this.onOffSwitch_Compressor.BackColor = Color.Transparent; - this.onOffSwitch_Compressor.Location = new Point(12, 29); - this.onOffSwitch_Compressor.Name = "onOffSwitch_Compressor"; - this.onOffSwitch_Compressor.Size = new Size(107, 28); - this.onOffSwitch_Compressor.SwitchedOn = false; - this.onOffSwitch_Compressor.TabIndex = 3; - this.onOffSwitch_Compressor.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_Compressor_SwitchChangeNotify); - this.label_Compressor_Enable.AutoSize = true; - this.label_Compressor_Enable.Location = new Point(12, 14); - this.label_Compressor_Enable.Name = "label_Compressor_Enable"; - this.label_Compressor_Enable.Size = new Size(47, 12); - this.label_Compressor_Enable.TabIndex = 2; - this.label_Compressor_Enable.Text = "$ENABLE"; - this.groupBox_Threshold.Controls.Add((Control) this.label_Threshold); - this.groupBox_Threshold.Controls.Add((Control) this.hSlider_Threshold); - this.groupBox_Threshold.Location = new Point(12, 73); - this.groupBox_Threshold.Name = "groupBox_Threshold"; - this.groupBox_Threshold.Size = new Size(548, 61); - this.groupBox_Threshold.TabIndex = 4; - this.groupBox_Threshold.TabStop = false; - this.groupBox_Threshold.Text = "$COMPRESSOR_THRESHOLD"; - this.label_Threshold.AutoSize = true; - this.label_Threshold.Location = new Point(475, 29); - this.label_Threshold.Name = "label_Threshold"; - this.label_Threshold.Size = new Size(23, 12); - this.label_Threshold.TabIndex = 5; - this.label_Threshold.Text = "0dB"; - this.hSlider_Threshold.BackColor = SystemColors.Control; - this.hSlider_Threshold.Location = new Point(6, 20); - this.hSlider_Threshold.MoveDelta = 1U; - this.hSlider_Threshold.Name = "hSlider_Threshold"; - this.hSlider_Threshold.Position = 0U; - this.hSlider_Threshold.PositionFloat = 0.0f; - this.hSlider_Threshold.Size = new Size(463, 29); - this.hSlider_Threshold.TabIndex = 5; - this.hSlider_Threshold.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Threshold_PositionChangeNotify); - this.groupBox_Knee.Controls.Add((Control) this.onOffSwitch_AutoKnee); - this.groupBox_Knee.Controls.Add((Control) this.label_AutoKnee); - this.groupBox_Knee.Controls.Add((Control) this.label_Knee); - this.groupBox_Knee.Controls.Add((Control) this.hSlider_Knee); - this.groupBox_Knee.Location = new Point(12, 140); - this.groupBox_Knee.Name = "groupBox_Knee"; - this.groupBox_Knee.Size = new Size(271, 115); - this.groupBox_Knee.TabIndex = 5; - this.groupBox_Knee.TabStop = false; - this.groupBox_Knee.Text = "$COMPRESSOR_KNEEWIDTH"; - this.onOffSwitch_AutoKnee.BackColor = Color.Transparent; - this.onOffSwitch_AutoKnee.Location = new Point(22, 41); - this.onOffSwitch_AutoKnee.Name = "onOffSwitch_AutoKnee"; - this.onOffSwitch_AutoKnee.Size = new Size(49, 22); - this.onOffSwitch_AutoKnee.SwitchedOn = false; - this.onOffSwitch_AutoKnee.TabIndex = 6; - this.onOffSwitch_AutoKnee.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoKnee_SwitchChangeNotify); - this.label_AutoKnee.AutoSize = true; - this.label_AutoKnee.Location = new Point(20, 26); - this.label_AutoKnee.Name = "label_AutoKnee"; - this.label_AutoKnee.Size = new Size(125, 12); - this.label_AutoKnee.TabIndex = 6; - this.label_AutoKnee.Text = "$COMPRESSOR_AUTOKNEE"; - this.label_Knee.AutoSize = true; - this.label_Knee.Location = new Point(198, 81); - this.label_Knee.Name = "label_Knee"; - this.label_Knee.Size = new Size(23, 12); - this.label_Knee.TabIndex = 5; - this.label_Knee.Text = "0dB"; - this.hSlider_Knee.BackColor = SystemColors.Control; - this.hSlider_Knee.Location = new Point(7, 72); - this.hSlider_Knee.MoveDelta = 1U; - this.hSlider_Knee.Name = "hSlider_Knee"; - this.hSlider_Knee.Position = 0U; - this.hSlider_Knee.PositionFloat = 0.0f; - this.hSlider_Knee.Size = new Size(185, 31); - this.hSlider_Knee.TabIndex = 5; - this.hSlider_Knee.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Knee_PositionChangeNotify); - this.groupBox_Ratio.Controls.Add((Control) this.label_Ratio); - this.groupBox_Ratio.Controls.Add((Control) this.hSlider_Ratio); - this.groupBox_Ratio.Location = new Point(289, 140); - this.groupBox_Ratio.Name = "groupBox_Ratio"; - this.groupBox_Ratio.Size = new Size(271, 115); - this.groupBox_Ratio.TabIndex = 6; - this.groupBox_Ratio.TabStop = false; - this.groupBox_Ratio.Text = "$COMPRESSOR_RATIO"; - this.label_Ratio.AutoSize = true; - this.label_Ratio.Location = new Point(198, 54); - this.label_Ratio.Name = "label_Ratio"; - this.label_Ratio.Size = new Size(41, 12); - this.label_Ratio.TabIndex = 5; - this.label_Ratio.Text = "1.00:1"; - this.hSlider_Ratio.BackColor = SystemColors.Control; - this.hSlider_Ratio.Location = new Point(7, 45); - this.hSlider_Ratio.MoveDelta = 1U; - this.hSlider_Ratio.Name = "hSlider_Ratio"; - this.hSlider_Ratio.Position = 0U; - this.hSlider_Ratio.PositionFloat = 0.0f; - this.hSlider_Ratio.Size = new Size(185, 31); - this.hSlider_Ratio.TabIndex = 5; - this.hSlider_Ratio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Ratio_PositionChangeNotify); - this.groupBox_Release.Controls.Add((Control) this.onOffSwitch_AutoRelease); - this.groupBox_Release.Controls.Add((Control) this.label_AutoRelease); - this.groupBox_Release.Controls.Add((Control) this.label_Release); - this.groupBox_Release.Controls.Add((Control) this.hSlider_Release); - this.groupBox_Release.Location = new Point(289, 261); - this.groupBox_Release.Name = "groupBox_Release"; - this.groupBox_Release.Size = new Size(271, 115); - this.groupBox_Release.TabIndex = 8; - this.groupBox_Release.TabStop = false; - this.groupBox_Release.Text = "$COMPRESSOR_RELEASE"; - this.onOffSwitch_AutoRelease.BackColor = Color.Transparent; - this.onOffSwitch_AutoRelease.Location = new Point(22, 41); - this.onOffSwitch_AutoRelease.Name = "onOffSwitch_AutoRelease"; - this.onOffSwitch_AutoRelease.Size = new Size(49, 22); - this.onOffSwitch_AutoRelease.SwitchedOn = false; - this.onOffSwitch_AutoRelease.TabIndex = 6; - this.onOffSwitch_AutoRelease.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoRelease_SwitchChangeNotify); - this.label_AutoRelease.AutoSize = true; - this.label_AutoRelease.Location = new Point(20, 26); - this.label_AutoRelease.Name = "label_AutoRelease"; - this.label_AutoRelease.Size = new Size(143, 12); - this.label_AutoRelease.TabIndex = 6; - this.label_AutoRelease.Text = "$COMPRESSOR_AUTORELEASE"; - this.label_Release.AutoSize = true; - this.label_Release.Location = new Point(198, 81); - this.label_Release.Name = "label_Release"; - this.label_Release.Size = new Size(41, 12); - this.label_Release.TabIndex = 5; - this.label_Release.Text = "5.00ms"; - this.hSlider_Release.BackColor = SystemColors.Control; - this.hSlider_Release.Location = new Point(7, 72); - this.hSlider_Release.MoveDelta = 1U; - this.hSlider_Release.Name = "hSlider_Release"; - this.hSlider_Release.Position = 0U; - this.hSlider_Release.PositionFloat = 0.0f; - this.hSlider_Release.Size = new Size(185, 31); - this.hSlider_Release.TabIndex = 5; - this.hSlider_Release.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Release_PositionChangeNotify); - this.groupBox_Attack.Controls.Add((Control) this.onOffSwitch_AutoAttack); - this.groupBox_Attack.Controls.Add((Control) this.label_AutoAttack); - this.groupBox_Attack.Controls.Add((Control) this.label_Attack); - this.groupBox_Attack.Controls.Add((Control) this.hSlider_Attack); - this.groupBox_Attack.Location = new Point(12, 261); - this.groupBox_Attack.Name = "groupBox_Attack"; - this.groupBox_Attack.Size = new Size(271, 115); - this.groupBox_Attack.TabIndex = 7; - this.groupBox_Attack.TabStop = false; - this.groupBox_Attack.Text = "$COMPRESSOR_ATTACK"; - this.onOffSwitch_AutoAttack.BackColor = Color.Transparent; - this.onOffSwitch_AutoAttack.Location = new Point(22, 41); - this.onOffSwitch_AutoAttack.Name = "onOffSwitch_AutoAttack"; - this.onOffSwitch_AutoAttack.Size = new Size(49, 22); - this.onOffSwitch_AutoAttack.SwitchedOn = false; - this.onOffSwitch_AutoAttack.TabIndex = 6; - this.onOffSwitch_AutoAttack.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoAttack_SwitchChangeNotify); - this.label_AutoAttack.AutoSize = true; - this.label_AutoAttack.Location = new Point(20, 26); - this.label_AutoAttack.Name = "label_AutoAttack"; - this.label_AutoAttack.Size = new Size(137, 12); - this.label_AutoAttack.TabIndex = 6; - this.label_AutoAttack.Text = "$COMPRESSOR_AUTOATTACK"; - this.label_Attack.AutoSize = true; - this.label_Attack.Location = new Point(198, 81); - this.label_Attack.Name = "label_Attack"; - this.label_Attack.Size = new Size(41, 12); - this.label_Attack.TabIndex = 5; - this.label_Attack.Text = "0.10ms"; - this.hSlider_Attack.BackColor = SystemColors.Control; - this.hSlider_Attack.Location = new Point(7, 72); - this.hSlider_Attack.MoveDelta = 1U; - this.hSlider_Attack.Name = "hSlider_Attack"; - this.hSlider_Attack.Position = 0U; - this.hSlider_Attack.PositionFloat = 0.0f; - this.hSlider_Attack.Size = new Size(185, 31); - this.hSlider_Attack.TabIndex = 5; - this.hSlider_Attack.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Attack_PositionChangeNotify); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(448, 20); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(112, 40); - this.singleButton_Cancel.TabIndex = 9; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(328, 20); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(112, 40); - this.singleButton_OK.TabIndex = 10; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.groupBox_MakeUpGain.Controls.Add((Control) this.onOffSwitch_AutoGain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.label_AutoGain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.label_Gain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.hSlider_Gain); - this.groupBox_MakeUpGain.Location = new Point(12, 516); - this.groupBox_MakeUpGain.Name = "groupBox_MakeUpGain"; - this.groupBox_MakeUpGain.Size = new Size(548, 110); - this.groupBox_MakeUpGain.TabIndex = 11; - this.groupBox_MakeUpGain.TabStop = false; - this.groupBox_MakeUpGain.Text = "$COMPRESSOR_MAKEUPGAIN"; - this.onOffSwitch_AutoGain.BackColor = Color.Transparent; - this.onOffSwitch_AutoGain.Location = new Point(22, 41); - this.onOffSwitch_AutoGain.Name = "onOffSwitch_AutoGain"; - this.onOffSwitch_AutoGain.Size = new Size(49, 22); - this.onOffSwitch_AutoGain.SwitchedOn = false; - this.onOffSwitch_AutoGain.TabIndex = 8; - this.onOffSwitch_AutoGain.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoGain_SwitchChangeNotify); - this.label_AutoGain.AutoSize = true; - this.label_AutoGain.Location = new Point(20, 26); - this.label_AutoGain.Name = "label_AutoGain"; - this.label_AutoGain.Size = new Size(125, 12); - this.label_AutoGain.TabIndex = 7; - this.label_AutoGain.Text = "$COMPRESSOR_AUTOGAIN"; - this.label_Gain.AutoSize = true; - this.label_Gain.Location = new Point(475, 79); - this.label_Gain.Name = "label_Gain"; - this.label_Gain.Size = new Size(23, 12); - this.label_Gain.TabIndex = 5; - this.label_Gain.Text = "0dB"; - this.hSlider_Gain.BackColor = SystemColors.Control; - this.hSlider_Gain.Location = new Point(7, 71); - this.hSlider_Gain.MoveDelta = 1U; - this.hSlider_Gain.Name = "hSlider_Gain"; - this.hSlider_Gain.Position = 0U; - this.hSlider_Gain.PositionFloat = 0.0f; - this.hSlider_Gain.Size = new Size(462, 29); - this.hSlider_Gain.TabIndex = 5; - this.hSlider_Gain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Gain_PositionChangeNotify); - this.label_NoClip.AutoSize = true; - this.label_NoClip.Location = new Point(163, 14); - this.label_NoClip.Name = "label_NoClip"; - this.label_NoClip.Size = new Size(113, 12); - this.label_NoClip.TabIndex = 12; - this.label_NoClip.Text = "$COMPRESSOR_NOCLIP"; - this.onOffSwitch_NoClip.BackColor = Color.Transparent; - this.onOffSwitch_NoClip.Location = new Point(165, 29); - this.onOffSwitch_NoClip.Name = "onOffSwitch_NoClip"; - this.onOffSwitch_NoClip.Size = new Size(107, 28); - this.onOffSwitch_NoClip.SwitchedOn = false; - this.onOffSwitch_NoClip.TabIndex = 13; - this.onOffSwitch_NoClip.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_NoClip_SwitchChangeNotify); - this.groupBox_Misc.Controls.Add((Control) this.label_Adapt); - this.groupBox_Misc.Controls.Add((Control) this.label_AdaptValue); - this.groupBox_Misc.Controls.Add((Control) this.hSlider_Adapt); - this.groupBox_Misc.Controls.Add((Control) this.label_Crest); - this.groupBox_Misc.Controls.Add((Control) this.label_CrestValue); - this.groupBox_Misc.Controls.Add((Control) this.hSlider_Crest); - this.groupBox_Misc.Controls.Add((Control) this.label_KneeMult); - this.groupBox_Misc.Controls.Add((Control) this.label_KneeMultValue); - this.groupBox_Misc.Controls.Add((Control) this.hSlider_KneeMult); - this.groupBox_Misc.Location = new Point(12, 382); - this.groupBox_Misc.Name = "groupBox_Misc"; - this.groupBox_Misc.Size = new Size(548, 128); - this.groupBox_Misc.TabIndex = 14; - this.groupBox_Misc.TabStop = false; - this.groupBox_Misc.Text = "$COMPRESSOR_MISC"; - this.label_Adapt.AutoSize = true; - this.label_Adapt.Location = new Point(297, 76); - this.label_Adapt.Name = "label_Adapt"; - this.label_Adapt.Size = new Size(131, 12); - this.label_Adapt.TabIndex = 12; - this.label_Adapt.Text = "$COMPRESSOR_ADAPTTIME"; - this.label_AdaptValue.AutoSize = true; - this.label_AdaptValue.Location = new Point(475, 100); - this.label_AdaptValue.Name = "label_AdaptValue"; - this.label_AdaptValue.Size = new Size(41, 12); - this.label_AdaptValue.TabIndex = 11; - this.label_AdaptValue.Text = "0.00ms"; - this.hSlider_Adapt.BackColor = SystemColors.Control; - this.hSlider_Adapt.Location = new Point(284, 91); - this.hSlider_Adapt.MoveDelta = 1U; - this.hSlider_Adapt.Name = "hSlider_Adapt"; - this.hSlider_Adapt.Position = 0U; - this.hSlider_Adapt.PositionFloat = 0.0f; - this.hSlider_Adapt.Size = new Size(185, 31); - this.hSlider_Adapt.TabIndex = 10; - this.hSlider_Adapt.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Adapt_PositionChangeNotify); - this.label_Crest.AutoSize = true; - this.label_Crest.Location = new Point(297, 20); - this.label_Crest.Name = "label_Crest"; - this.label_Crest.Size = new Size(131, 12); - this.label_Crest.TabIndex = 9; - this.label_Crest.Text = "$COMPRESSOR_CRESTTIME"; - this.label_CrestValue.AutoSize = true; - this.label_CrestValue.Location = new Point(475, 44); - this.label_CrestValue.Name = "label_CrestValue"; - this.label_CrestValue.Size = new Size(41, 12); - this.label_CrestValue.TabIndex = 8; - this.label_CrestValue.Text = "0.00ms"; - this.hSlider_Crest.BackColor = SystemColors.Control; - this.hSlider_Crest.Location = new Point(284, 35); - this.hSlider_Crest.MoveDelta = 1U; - this.hSlider_Crest.Name = "hSlider_Crest"; - this.hSlider_Crest.Position = 0U; - this.hSlider_Crest.PositionFloat = 0.0f; - this.hSlider_Crest.Size = new Size(185, 31); - this.hSlider_Crest.TabIndex = 7; - this.hSlider_Crest.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Crest_PositionChangeNotify); - this.label_KneeMult.AutoSize = true; - this.label_KneeMult.Location = new Point(20, 43); - this.label_KneeMult.Name = "label_KneeMult"; - this.label_KneeMult.Size = new Size(125, 12); - this.label_KneeMult.TabIndex = 6; - this.label_KneeMult.Text = "$COMPRESSOR_KNEEMULT"; - this.label_KneeMultValue.AutoSize = true; - this.label_KneeMultValue.Location = new Point(198, 67); - this.label_KneeMultValue.Name = "label_KneeMultValue"; - this.label_KneeMultValue.Size = new Size(35, 12); - this.label_KneeMultValue.TabIndex = 5; - this.label_KneeMultValue.Text = "2.00x"; - this.hSlider_KneeMult.BackColor = SystemColors.Control; - this.hSlider_KneeMult.Location = new Point(7, 58); - this.hSlider_KneeMult.MoveDelta = 1U; - this.hSlider_KneeMult.Name = "hSlider_KneeMult"; - this.hSlider_KneeMult.Position = 0U; - this.hSlider_KneeMult.PositionFloat = 0.0f; - this.hSlider_KneeMult.Size = new Size(185, 31); - this.hSlider_KneeMult.TabIndex = 5; - this.hSlider_KneeMult.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_KneeMult_PositionChangeNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(574, 637); - this.Controls.Add((Control) this.groupBox_Misc); - this.Controls.Add((Control) this.onOffSwitch_NoClip); - this.Controls.Add((Control) this.label_NoClip); - this.Controls.Add((Control) this.groupBox_MakeUpGain); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.groupBox_Release); - this.Controls.Add((Control) this.groupBox_Attack); - this.Controls.Add((Control) this.groupBox_Ratio); - this.Controls.Add((Control) this.groupBox_Knee); - this.Controls.Add((Control) this.groupBox_Threshold); - this.Controls.Add((Control) this.onOffSwitch_Compressor); - this.Controls.Add((Control) this.label_Compressor_Enable); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.Name = nameof (frmCompressor); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$COMPRESSOR"; - this.groupBox_Threshold.ResumeLayout(false); - this.groupBox_Threshold.PerformLayout(); - this.groupBox_Knee.ResumeLayout(false); - this.groupBox_Knee.PerformLayout(); - this.groupBox_Ratio.ResumeLayout(false); - this.groupBox_Ratio.PerformLayout(); - this.groupBox_Release.ResumeLayout(false); - this.groupBox_Release.PerformLayout(); - this.groupBox_Attack.ResumeLayout(false); - this.groupBox_Attack.PerformLayout(); - this.groupBox_MakeUpGain.ResumeLayout(false); - this.groupBox_MakeUpGain.PerformLayout(); - this.groupBox_Misc.ResumeLayout(false); - this.groupBox_Misc.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - } - - public bool CompressorEnabled - { - get => this.m_bCompressorEnabled; - set - { - this.m_bCompressorEnabled = value; - this.UpdateUI(); - } - } - - public float Threshold - { - get => this.m_rThreshold; - set - { - this.m_rThreshold = value; - this.UpdateUI(); - } - } - - public float KneeWidth - { - get => this.m_rKneewidth; - set - { - this.m_rKneewidth = value; - this.UpdateUI(); - } - } - - public bool AutoKnee - { - get => this.m_bAutoKnee; - set - { - this.m_bAutoKnee = value; - this.UpdateUI(); - } - } - - public float Ratio - { - get => this.m_rRatio; - set - { - this.m_rRatio = value; - this.UpdateUI(); - } - } - - public float AttackTime - { - get => this.m_rAttack; - set - { - this.m_rAttack = value; - this.UpdateUI(); - } - } - - public bool AutoAttack - { - get => this.m_bAutoAttack; - set - { - this.m_bAutoAttack = value; - this.UpdateUI(); - } - } - - public float ReleaseTime - { - get => this.m_rRelease; - set - { - this.m_rRelease = value; - this.UpdateUI(); - } - } - - public bool AutoRelease - { - get => this.m_bAutoRelease; - set - { - this.m_bAutoRelease = value; - this.UpdateUI(); - } - } - - public float MakeupGain - { - get => this.m_rMakeupGain; - set - { - this.m_rMakeupGain = value; - this.UpdateUI(); - } - } - - public bool AutoGain - { - get => this.m_bAutoGain; - set - { - this.m_bAutoGain = value; - this.UpdateUI(); - } - } - - public bool NoClip - { - get => this.m_bNoClip; - set - { - this.m_bNoClip = value; - this.UpdateUI(); - } - } - - public float KneeMult - { - get => this.m_rKneeMult; - set - { - this.m_rKneeMult = value; - this.UpdateUI(); - } - } - - public float CrestTime - { - get => this.m_rCrestTime; - set - { - this.m_rCrestTime = value; - this.UpdateUI(); - } - } - - public float AdaptTime - { - get => this.m_rAdaptTime; - set - { - this.m_rAdaptTime = value; - this.UpdateUI(); - } - } - - public frmCompressor() - { - this.InitializeComponent(); - this.Text = GlobalMessages.COMPRESSOR; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.label_Compressor_Enable.Text = GlobalMessages.ENABLE; - this.label_NoClip.Text = GlobalMessages.COMPRESSOR_NOCLIP; - this.groupBox_Threshold.Text = GlobalMessages.COMPRESSOR_THRESHOLD; - this.groupBox_Knee.Text = GlobalMessages.COMPRESSOR_KNEEWIDTH; - this.label_AutoKnee.Text = GlobalMessages.COMPRESSOR_AUTOKNEE; - this.groupBox_Ratio.Text = GlobalMessages.COMPRESSOR_RATIO; - this.groupBox_Attack.Text = GlobalMessages.COMPRESSOR_ATTACK; - this.label_AutoAttack.Text = GlobalMessages.COMPRESSOR_AUTOATTACK; - this.groupBox_Release.Text = GlobalMessages.COMPRESSOR_RELEASE; - this.label_AutoRelease.Text = GlobalMessages.COMPRESSOR_AUTORELEASE; - this.groupBox_Misc.Text = GlobalMessages.COMPRESSOR_MISC; - this.label_KneeMult.Text = GlobalMessages.COMPRESSOR_KNEEMULT; - this.label_Crest.Text = GlobalMessages.COMPRESSOR_CRESTTIME; - this.label_Adapt.Text = GlobalMessages.COMPRESSOR_ADAPTTIME; - this.groupBox_MakeUpGain.Text = GlobalMessages.COMPRESSOR_MAKEUPGAIN; - this.label_AutoGain.Text = GlobalMessages.COMPRESSOR_AUTOGAIN; - this.UpdateUI(); - } - - private void UpdateUI() - { - this.onOffSwitch_Compressor.SwitchedOn = this.m_bCompressorEnabled; - this.onOffSwitch_NoClip.SwitchedOn = this.m_bNoClip; - this.onOffSwitch_AutoKnee.SwitchedOn = this.m_bAutoKnee; - this.onOffSwitch_AutoAttack.SwitchedOn = this.m_bAutoAttack; - this.onOffSwitch_AutoRelease.SwitchedOn = this.m_bAutoRelease; - this.onOffSwitch_AutoGain.SwitchedOn = this.m_bAutoGain; - this.hSlider_Threshold.Position = (uint) ((double) this.m_rThreshold * 100.0); - this.hSlider_Knee.Position = (uint) ((double) this.m_rKneewidth * 100.0); - this.hSlider_Ratio.Position = (uint) ((double) this.m_rRatio * 100.0); - this.hSlider_Attack.Position = (uint) ((double) this.m_rAttack * 100.0); - this.hSlider_Release.Position = (uint) ((double) this.m_rRelease * 100.0); - this.hSlider_KneeMult.Position = (uint) ((double) this.m_rKneeMult * 100.0); - this.hSlider_Crest.Position = (uint) ((double) this.m_rCrestTime * 100.0); - this.hSlider_Adapt.Position = (uint) ((double) this.m_rAdaptTime * 100.0); - this.hSlider_Gain.Position = (uint) ((double) this.m_rMakeupGain * 100.0); - } - - private void onOffSwitch_Compressor_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bCompressorEnabled = bSwitchedOn; - - private void onOffSwitch_NoClip_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bNoClip = bSwitchedOn; - - private void onOffSwitch_AutoKnee_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoKnee = bSwitchedOn; - - private void onOffSwitch_AutoAttack_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoAttack = bSwitchedOn; - - private void onOffSwitch_AutoRelease_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoRelease = bSwitchedOn; - - private void onOffSwitch_AutoGain_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoGain = bSwitchedOn; - - private void hSlider_Threshold_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rThreshold = fPercent; - this.label_Threshold.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * -60.0 / 20.0))).ToString("F02") + "dB"; - } - - private void hSlider_Knee_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rKneewidth = fPercent; - this.label_Knee.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; - } - - private void hSlider_Ratio_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rRatio = fPercent; - if ((double) fPercent > 0.99000000953674316) - this.label_Ratio.Text = "oo:1"; - else - this.label_Ratio.Text = (1.0 / (1.0 - (double) fPercent)).ToString("F02") + ":1"; - } - - private void hSlider_Attack_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rAttack = fPercent; - this.label_Attack.Text = ((double) Parameters.PARAM2LOG(fPercent, 0.0001f, 0.2f) * 1000.0).ToString("F02") + "ms"; - } - - private void hSlider_Release_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rRelease = fPercent; - this.label_Release.Text = ((double) Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; - } - - private void hSlider_KneeMult_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rKneeMult = fPercent; - this.label_KneeMultValue.Text = Parameters.PARAM2LIN(fPercent, 0.0f, 4f).ToString("F02") + "x"; - } - - private void hSlider_Crest_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rCrestTime = fPercent; - this.label_CrestValue.Text = ((double) Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; - } - - private void hSlider_Adapt_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rAdaptTime = fPercent; - this.label_AdaptValue.Text = ((double) Parameters.PARAM2LOG(fPercent, 1f, 4f) * 1000.0).ToString("F02") + "ms"; - } - - private void hSlider_Gain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rMakeupGain = fPercent; - this.label_Gain.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; - } - - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; - - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; - } } diff --git a/frmCompressorLite.cs b/frmCompressorLite.cs index 3539727..1ff05d4 100644 --- a/frmCompressorLite.cs +++ b/frmCompressorLite.cs @@ -7,555 +7,576 @@ namespace ViPER4WindowsBin { - public class frmCompressorLite : Form - { - private IContainer components; - private OnOffSwitch onOffSwitch_Compressor; - private Label label_Compressor_Enable; - private GroupBox groupBox_Threshold; - private HSlider hSlider_Threshold; - private Label label_Threshold; - private GroupBox groupBox_Knee; - private Label label_Knee; - private HSlider hSlider_Knee; - private Label label_AutoKnee; - private OnOffSwitch onOffSwitch_AutoKnee; - private GroupBox groupBox_Ratio; - private Label label_Ratio; - private HSlider hSlider_Ratio; - private GroupBox groupBox_Release; - private OnOffSwitch onOffSwitch_AutoRelease; - private Label label_AutoRelease; - private Label label_Release; - private HSlider hSlider_Release; - private GroupBox groupBox_Attack; - private OnOffSwitch onOffSwitch_AutoAttack; - private Label label_AutoAttack; - private Label label_Attack; - private HSlider hSlider_Attack; - private SingleButton singleButton_Cancel; - private SingleButton singleButton_OK; - private GroupBox groupBox_MakeUpGain; - private Label label_Gain; - private HSlider hSlider_Gain; - private OnOffSwitch onOffSwitch_AutoGain; - private Label label_AutoGain; - private bool m_bCompressorEnabled; - private float m_rThreshold; - private float m_rKneewidth; - private bool m_bAutoKnee = true; - private float m_rRatio; - private float m_rAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); - private bool m_bAutoAttack = true; - private float m_rRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); - private bool m_bAutoRelease = true; - private float m_rMakeupGain; - private bool m_bAutoGain = true; - - protected override void Dispose(bool disposing) + public class FrmCompressorLite : Form { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private OnOffSwitch onOffSwitch_Compressor; + private Label label_Compressor_Enable; + private GroupBox groupBox_Threshold; + private HSlider hSlider_Threshold; + private Label label_Threshold; + private GroupBox groupBox_Knee; + private Label label_Knee; + private HSlider hSlider_Knee; + private Label label_AutoKnee; + private OnOffSwitch onOffSwitch_AutoKnee; + private GroupBox groupBox_Ratio; + private Label label_Ratio; + private HSlider hSlider_Ratio; + private GroupBox groupBox_Release; + private OnOffSwitch onOffSwitch_AutoRelease; + private Label label_AutoRelease; + private Label label_Release; + private HSlider hSlider_Release; + private GroupBox groupBox_Attack; + private OnOffSwitch onOffSwitch_AutoAttack; + private Label label_AutoAttack; + private Label label_Attack; + private HSlider hSlider_Attack; + private SingleButton singleButton_Cancel; + private SingleButton singleButton_OK; + private GroupBox groupBox_MakeUpGain; + private Label label_Gain; + private HSlider hSlider_Gain; + private OnOffSwitch onOffSwitch_AutoGain; + private Label label_AutoGain; + private bool m_bCompressorEnabled; + private float m_rThreshold; + private float m_rKneewidth; + private bool m_bAutoKnee = true; + private float m_rRatio; + private float m_rAttack = Parameters.LOG2PARAM(0.005f, 0.0001f, 0.2f); + private bool m_bAutoAttack = true; + private float m_rRelease = Parameters.LOG2PARAM(0.05f, 0.005f, 2f); + private bool m_bAutoRelease = true; + private float m_rMakeupGain; + private bool m_bAutoGain = true; - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmCompressorLite)); - this.onOffSwitch_Compressor = new OnOffSwitch(); - this.label_Compressor_Enable = new Label(); - this.groupBox_Threshold = new GroupBox(); - this.label_Threshold = new Label(); - this.hSlider_Threshold = new HSlider(); - this.groupBox_Knee = new GroupBox(); - this.onOffSwitch_AutoKnee = new OnOffSwitch(); - this.label_AutoKnee = new Label(); - this.label_Knee = new Label(); - this.hSlider_Knee = new HSlider(); - this.groupBox_Ratio = new GroupBox(); - this.label_Ratio = new Label(); - this.hSlider_Ratio = new HSlider(); - this.groupBox_Release = new GroupBox(); - this.onOffSwitch_AutoRelease = new OnOffSwitch(); - this.label_AutoRelease = new Label(); - this.label_Release = new Label(); - this.hSlider_Release = new HSlider(); - this.groupBox_Attack = new GroupBox(); - this.onOffSwitch_AutoAttack = new OnOffSwitch(); - this.label_AutoAttack = new Label(); - this.label_Attack = new Label(); - this.hSlider_Attack = new HSlider(); - this.singleButton_Cancel = new SingleButton(); - this.singleButton_OK = new SingleButton(); - this.groupBox_MakeUpGain = new GroupBox(); - this.onOffSwitch_AutoGain = new OnOffSwitch(); - this.label_AutoGain = new Label(); - this.label_Gain = new Label(); - this.hSlider_Gain = new HSlider(); - this.groupBox_Threshold.SuspendLayout(); - this.groupBox_Knee.SuspendLayout(); - this.groupBox_Ratio.SuspendLayout(); - this.groupBox_Release.SuspendLayout(); - this.groupBox_Attack.SuspendLayout(); - this.groupBox_MakeUpGain.SuspendLayout(); - this.SuspendLayout(); - this.onOffSwitch_Compressor.BackColor = Color.Transparent; - this.onOffSwitch_Compressor.Location = new Point(12, 29); - this.onOffSwitch_Compressor.Name = "onOffSwitch_Compressor"; - this.onOffSwitch_Compressor.Size = new Size(107, 28); - this.onOffSwitch_Compressor.SwitchedOn = false; - this.onOffSwitch_Compressor.TabIndex = 3; - this.onOffSwitch_Compressor.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_Compressor_SwitchChangeNotify); - this.label_Compressor_Enable.AutoSize = true; - this.label_Compressor_Enable.Location = new Point(12, 14); - this.label_Compressor_Enable.Name = "label_Compressor_Enable"; - this.label_Compressor_Enable.Size = new Size(47, 12); - this.label_Compressor_Enable.TabIndex = 2; - this.label_Compressor_Enable.Text = "$ENABLE"; - this.groupBox_Threshold.Controls.Add((Control) this.label_Threshold); - this.groupBox_Threshold.Controls.Add((Control) this.hSlider_Threshold); - this.groupBox_Threshold.Location = new Point(12, 73); - this.groupBox_Threshold.Name = "groupBox_Threshold"; - this.groupBox_Threshold.Size = new Size(548, 82); - this.groupBox_Threshold.TabIndex = 4; - this.groupBox_Threshold.TabStop = false; - this.groupBox_Threshold.Text = "$COMPRESSOR_THRESHOLD"; - this.label_Threshold.AutoSize = true; - this.label_Threshold.Location = new Point(475, 37); - this.label_Threshold.Name = "label_Threshold"; - this.label_Threshold.Size = new Size(23, 12); - this.label_Threshold.TabIndex = 5; - this.label_Threshold.Text = "0dB"; - this.hSlider_Threshold.BackColor = SystemColors.Control; - this.hSlider_Threshold.Location = new Point(6, 20); - this.hSlider_Threshold.MoveDelta = 1U; - this.hSlider_Threshold.Name = "hSlider_Threshold"; - this.hSlider_Threshold.Position = 0U; - this.hSlider_Threshold.PositionFloat = 0.0f; - this.hSlider_Threshold.Size = new Size(463, 47); - this.hSlider_Threshold.TabIndex = 5; - this.hSlider_Threshold.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Threshold_PositionChangeNotify); - this.groupBox_Knee.Controls.Add((Control) this.onOffSwitch_AutoKnee); - this.groupBox_Knee.Controls.Add((Control) this.label_AutoKnee); - this.groupBox_Knee.Controls.Add((Control) this.label_Knee); - this.groupBox_Knee.Controls.Add((Control) this.hSlider_Knee); - this.groupBox_Knee.Location = new Point(12, 173); - this.groupBox_Knee.Name = "groupBox_Knee"; - this.groupBox_Knee.Size = new Size(271, 115); - this.groupBox_Knee.TabIndex = 5; - this.groupBox_Knee.TabStop = false; - this.groupBox_Knee.Text = "$COMPRESSOR_KNEEWIDTH"; - this.onOffSwitch_AutoKnee.BackColor = Color.Transparent; - this.onOffSwitch_AutoKnee.Location = new Point(22, 41); - this.onOffSwitch_AutoKnee.Name = "onOffSwitch_AutoKnee"; - this.onOffSwitch_AutoKnee.Size = new Size(49, 22); - this.onOffSwitch_AutoKnee.SwitchedOn = false; - this.onOffSwitch_AutoKnee.TabIndex = 6; - this.onOffSwitch_AutoKnee.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoKnee_SwitchChangeNotify); - this.label_AutoKnee.AutoSize = true; - this.label_AutoKnee.Location = new Point(20, 26); - this.label_AutoKnee.Name = "label_AutoKnee"; - this.label_AutoKnee.Size = new Size(125, 12); - this.label_AutoKnee.TabIndex = 6; - this.label_AutoKnee.Text = "$COMPRESSOR_AUTOKNEE"; - this.label_Knee.AutoSize = true; - this.label_Knee.Location = new Point(198, 81); - this.label_Knee.Name = "label_Knee"; - this.label_Knee.Size = new Size(23, 12); - this.label_Knee.TabIndex = 5; - this.label_Knee.Text = "0dB"; - this.hSlider_Knee.BackColor = SystemColors.Control; - this.hSlider_Knee.Location = new Point(7, 72); - this.hSlider_Knee.MoveDelta = 1U; - this.hSlider_Knee.Name = "hSlider_Knee"; - this.hSlider_Knee.Position = 0U; - this.hSlider_Knee.PositionFloat = 0.0f; - this.hSlider_Knee.Size = new Size(185, 31); - this.hSlider_Knee.TabIndex = 5; - this.hSlider_Knee.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Knee_PositionChangeNotify); - this.groupBox_Ratio.Controls.Add((Control) this.label_Ratio); - this.groupBox_Ratio.Controls.Add((Control) this.hSlider_Ratio); - this.groupBox_Ratio.Location = new Point(289, 173); - this.groupBox_Ratio.Name = "groupBox_Ratio"; - this.groupBox_Ratio.Size = new Size(271, 115); - this.groupBox_Ratio.TabIndex = 6; - this.groupBox_Ratio.TabStop = false; - this.groupBox_Ratio.Text = "$COMPRESSOR_RATIO"; - this.label_Ratio.AutoSize = true; - this.label_Ratio.Location = new Point(198, 52); - this.label_Ratio.Name = "label_Ratio"; - this.label_Ratio.Size = new Size(41, 12); - this.label_Ratio.TabIndex = 5; - this.label_Ratio.Text = "1.00:1"; - this.hSlider_Ratio.BackColor = SystemColors.Control; - this.hSlider_Ratio.Location = new Point(7, 43); - this.hSlider_Ratio.MoveDelta = 1U; - this.hSlider_Ratio.Name = "hSlider_Ratio"; - this.hSlider_Ratio.Position = 0U; - this.hSlider_Ratio.PositionFloat = 0.0f; - this.hSlider_Ratio.Size = new Size(185, 31); - this.hSlider_Ratio.TabIndex = 5; - this.hSlider_Ratio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Ratio_PositionChangeNotify); - this.groupBox_Release.Controls.Add((Control) this.onOffSwitch_AutoRelease); - this.groupBox_Release.Controls.Add((Control) this.label_AutoRelease); - this.groupBox_Release.Controls.Add((Control) this.label_Release); - this.groupBox_Release.Controls.Add((Control) this.hSlider_Release); - this.groupBox_Release.Location = new Point(289, 294); - this.groupBox_Release.Name = "groupBox_Release"; - this.groupBox_Release.Size = new Size(271, 115); - this.groupBox_Release.TabIndex = 8; - this.groupBox_Release.TabStop = false; - this.groupBox_Release.Text = "$COMPRESSOR_RELEASE"; - this.onOffSwitch_AutoRelease.BackColor = Color.Transparent; - this.onOffSwitch_AutoRelease.Location = new Point(22, 41); - this.onOffSwitch_AutoRelease.Name = "onOffSwitch_AutoRelease"; - this.onOffSwitch_AutoRelease.Size = new Size(49, 22); - this.onOffSwitch_AutoRelease.SwitchedOn = false; - this.onOffSwitch_AutoRelease.TabIndex = 6; - this.onOffSwitch_AutoRelease.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoRelease_SwitchChangeNotify); - this.label_AutoRelease.AutoSize = true; - this.label_AutoRelease.Location = new Point(20, 26); - this.label_AutoRelease.Name = "label_AutoRelease"; - this.label_AutoRelease.Size = new Size(143, 12); - this.label_AutoRelease.TabIndex = 6; - this.label_AutoRelease.Text = "$COMPRESSOR_AUTORELEASE"; - this.label_Release.AutoSize = true; - this.label_Release.Location = new Point(198, 81); - this.label_Release.Name = "label_Release"; - this.label_Release.Size = new Size(41, 12); - this.label_Release.TabIndex = 5; - this.label_Release.Text = "5.00ms"; - this.hSlider_Release.BackColor = SystemColors.Control; - this.hSlider_Release.Location = new Point(7, 72); - this.hSlider_Release.MoveDelta = 1U; - this.hSlider_Release.Name = "hSlider_Release"; - this.hSlider_Release.Position = 0U; - this.hSlider_Release.PositionFloat = 0.0f; - this.hSlider_Release.Size = new Size(185, 31); - this.hSlider_Release.TabIndex = 5; - this.hSlider_Release.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Release_PositionChangeNotify); - this.groupBox_Attack.Controls.Add((Control) this.onOffSwitch_AutoAttack); - this.groupBox_Attack.Controls.Add((Control) this.label_AutoAttack); - this.groupBox_Attack.Controls.Add((Control) this.label_Attack); - this.groupBox_Attack.Controls.Add((Control) this.hSlider_Attack); - this.groupBox_Attack.Location = new Point(12, 294); - this.groupBox_Attack.Name = "groupBox_Attack"; - this.groupBox_Attack.Size = new Size(271, 115); - this.groupBox_Attack.TabIndex = 7; - this.groupBox_Attack.TabStop = false; - this.groupBox_Attack.Text = "$COMPRESSOR_ATTACK"; - this.onOffSwitch_AutoAttack.BackColor = Color.Transparent; - this.onOffSwitch_AutoAttack.Location = new Point(22, 41); - this.onOffSwitch_AutoAttack.Name = "onOffSwitch_AutoAttack"; - this.onOffSwitch_AutoAttack.Size = new Size(49, 22); - this.onOffSwitch_AutoAttack.SwitchedOn = false; - this.onOffSwitch_AutoAttack.TabIndex = 6; - this.onOffSwitch_AutoAttack.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoAttack_SwitchChangeNotify); - this.label_AutoAttack.AutoSize = true; - this.label_AutoAttack.Location = new Point(20, 26); - this.label_AutoAttack.Name = "label_AutoAttack"; - this.label_AutoAttack.Size = new Size(137, 12); - this.label_AutoAttack.TabIndex = 6; - this.label_AutoAttack.Text = "$COMPRESSOR_AUTOATTACK"; - this.label_Attack.AutoSize = true; - this.label_Attack.Location = new Point(198, 81); - this.label_Attack.Name = "label_Attack"; - this.label_Attack.Size = new Size(41, 12); - this.label_Attack.TabIndex = 5; - this.label_Attack.Text = "0.10ms"; - this.hSlider_Attack.BackColor = SystemColors.Control; - this.hSlider_Attack.Location = new Point(7, 72); - this.hSlider_Attack.MoveDelta = 1U; - this.hSlider_Attack.Name = "hSlider_Attack"; - this.hSlider_Attack.Position = 0U; - this.hSlider_Attack.PositionFloat = 0.0f; - this.hSlider_Attack.Size = new Size(185, 31); - this.hSlider_Attack.TabIndex = 5; - this.hSlider_Attack.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Attack_PositionChangeNotify); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(448, 20); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(112, 40); - this.singleButton_Cancel.TabIndex = 9; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(328, 20); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(112, 40); - this.singleButton_OK.TabIndex = 10; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.groupBox_MakeUpGain.Controls.Add((Control) this.onOffSwitch_AutoGain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.label_AutoGain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.label_Gain); - this.groupBox_MakeUpGain.Controls.Add((Control) this.hSlider_Gain); - this.groupBox_MakeUpGain.Location = new Point(12, 415); - this.groupBox_MakeUpGain.Name = "groupBox_MakeUpGain"; - this.groupBox_MakeUpGain.Size = new Size(548, 121); - this.groupBox_MakeUpGain.TabIndex = 11; - this.groupBox_MakeUpGain.TabStop = false; - this.groupBox_MakeUpGain.Text = "$COMPRESSOR_MAKEUPGAIN"; - this.onOffSwitch_AutoGain.BackColor = Color.Transparent; - this.onOffSwitch_AutoGain.Location = new Point(22, 41); - this.onOffSwitch_AutoGain.Name = "onOffSwitch_AutoGain"; - this.onOffSwitch_AutoGain.Size = new Size(49, 22); - this.onOffSwitch_AutoGain.SwitchedOn = false; - this.onOffSwitch_AutoGain.TabIndex = 8; - this.onOffSwitch_AutoGain.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_AutoGain_SwitchChangeNotify); - this.label_AutoGain.AutoSize = true; - this.label_AutoGain.Location = new Point(20, 26); - this.label_AutoGain.Name = "label_AutoGain"; - this.label_AutoGain.Size = new Size(125, 12); - this.label_AutoGain.TabIndex = 7; - this.label_AutoGain.Text = "$COMPRESSOR_AUTOGAIN"; - this.label_Gain.AutoSize = true; - this.label_Gain.Location = new Point(475, 88); - this.label_Gain.Name = "label_Gain"; - this.label_Gain.Size = new Size(23, 12); - this.label_Gain.TabIndex = 5; - this.label_Gain.Text = "0dB"; - this.hSlider_Gain.BackColor = SystemColors.Control; - this.hSlider_Gain.Location = new Point(7, 71); - this.hSlider_Gain.MoveDelta = 1U; - this.hSlider_Gain.Name = "hSlider_Gain"; - this.hSlider_Gain.Position = 0U; - this.hSlider_Gain.PositionFloat = 0.0f; - this.hSlider_Gain.Size = new Size(462, 47); - this.hSlider_Gain.TabIndex = 5; - this.hSlider_Gain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.hSlider_Gain_PositionChangeNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(574, 556); - this.Controls.Add((Control) this.groupBox_MakeUpGain); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.groupBox_Release); - this.Controls.Add((Control) this.groupBox_Attack); - this.Controls.Add((Control) this.groupBox_Ratio); - this.Controls.Add((Control) this.groupBox_Knee); - this.Controls.Add((Control) this.groupBox_Threshold); - this.Controls.Add((Control) this.onOffSwitch_Compressor); - this.Controls.Add((Control) this.label_Compressor_Enable); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.Name = nameof (frmCompressorLite); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$COMPRESSOR"; - this.groupBox_Threshold.ResumeLayout(false); - this.groupBox_Threshold.PerformLayout(); - this.groupBox_Knee.ResumeLayout(false); - this.groupBox_Knee.PerformLayout(); - this.groupBox_Ratio.ResumeLayout(false); - this.groupBox_Ratio.PerformLayout(); - this.groupBox_Release.ResumeLayout(false); - this.groupBox_Release.PerformLayout(); - this.groupBox_Attack.ResumeLayout(false); - this.groupBox_Attack.PerformLayout(); - this.groupBox_MakeUpGain.ResumeLayout(false); - this.groupBox_MakeUpGain.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public bool CompressorEnabled - { - get => this.m_bCompressorEnabled; - set - { - this.m_bCompressorEnabled = value; - this.UpdateUI(); - } - } + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmCompressorLite)); + onOffSwitch_Compressor = new OnOffSwitch(); + label_Compressor_Enable = new Label(); + groupBox_Threshold = new GroupBox(); + label_Threshold = new Label(); + hSlider_Threshold = new HSlider(); + groupBox_Knee = new GroupBox(); + onOffSwitch_AutoKnee = new OnOffSwitch(); + label_AutoKnee = new Label(); + label_Knee = new Label(); + hSlider_Knee = new HSlider(); + groupBox_Ratio = new GroupBox(); + label_Ratio = new Label(); + hSlider_Ratio = new HSlider(); + groupBox_Release = new GroupBox(); + onOffSwitch_AutoRelease = new OnOffSwitch(); + label_AutoRelease = new Label(); + label_Release = new Label(); + hSlider_Release = new HSlider(); + groupBox_Attack = new GroupBox(); + onOffSwitch_AutoAttack = new OnOffSwitch(); + label_AutoAttack = new Label(); + label_Attack = new Label(); + hSlider_Attack = new HSlider(); + singleButton_Cancel = new SingleButton(); + singleButton_OK = new SingleButton(); + groupBox_MakeUpGain = new GroupBox(); + onOffSwitch_AutoGain = new OnOffSwitch(); + label_AutoGain = new Label(); + label_Gain = new Label(); + hSlider_Gain = new HSlider(); + groupBox_Threshold.SuspendLayout(); + groupBox_Knee.SuspendLayout(); + groupBox_Ratio.SuspendLayout(); + groupBox_Release.SuspendLayout(); + groupBox_Attack.SuspendLayout(); + groupBox_MakeUpGain.SuspendLayout(); + SuspendLayout(); + onOffSwitch_Compressor.BackColor = Color.Transparent; + onOffSwitch_Compressor.Location = new Point(12, 29); + onOffSwitch_Compressor.Name = "onOffSwitch_Compressor"; + onOffSwitch_Compressor.Size = new Size(107, 28); + onOffSwitch_Compressor.SwitchedOn = false; + onOffSwitch_Compressor.TabIndex = 3; + onOffSwitch_Compressor.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_Compressor_SwitchChangeNotify); + label_Compressor_Enable.AutoSize = true; + label_Compressor_Enable.Location = new Point(12, 14); + label_Compressor_Enable.Name = "label_Compressor_Enable"; + label_Compressor_Enable.Size = new Size(47, 12); + label_Compressor_Enable.TabIndex = 2; + label_Compressor_Enable.Text = "$ENABLE"; + groupBox_Threshold.Controls.Add(label_Threshold); + groupBox_Threshold.Controls.Add(hSlider_Threshold); + groupBox_Threshold.Location = new Point(12, 73); + groupBox_Threshold.Name = "groupBox_Threshold"; + groupBox_Threshold.Size = new Size(548, 82); + groupBox_Threshold.TabIndex = 4; + groupBox_Threshold.TabStop = false; + groupBox_Threshold.Text = "$COMPRESSOR_THRESHOLD"; + label_Threshold.AutoSize = true; + label_Threshold.Location = new Point(475, 37); + label_Threshold.Name = "label_Threshold"; + label_Threshold.Size = new Size(23, 12); + label_Threshold.TabIndex = 5; + label_Threshold.Text = "0dB"; + hSlider_Threshold.BackColor = SystemColors.Control; + hSlider_Threshold.Location = new Point(6, 20); + hSlider_Threshold.MoveDelta = 1U; + hSlider_Threshold.Name = "hSlider_Threshold"; + hSlider_Threshold.Position = 0U; + hSlider_Threshold.PositionFloat = 0.0f; + hSlider_Threshold.Size = new Size(463, 47); + hSlider_Threshold.TabIndex = 5; + hSlider_Threshold.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Threshold_PositionChangeNotify); + groupBox_Knee.Controls.Add(onOffSwitch_AutoKnee); + groupBox_Knee.Controls.Add(label_AutoKnee); + groupBox_Knee.Controls.Add(label_Knee); + groupBox_Knee.Controls.Add(hSlider_Knee); + groupBox_Knee.Location = new Point(12, 173); + groupBox_Knee.Name = "groupBox_Knee"; + groupBox_Knee.Size = new Size(271, 115); + groupBox_Knee.TabIndex = 5; + groupBox_Knee.TabStop = false; + groupBox_Knee.Text = "$COMPRESSOR_KNEEWIDTH"; + onOffSwitch_AutoKnee.BackColor = Color.Transparent; + onOffSwitch_AutoKnee.Location = new Point(22, 41); + onOffSwitch_AutoKnee.Name = "onOffSwitch_AutoKnee"; + onOffSwitch_AutoKnee.Size = new Size(49, 22); + onOffSwitch_AutoKnee.SwitchedOn = false; + onOffSwitch_AutoKnee.TabIndex = 6; + onOffSwitch_AutoKnee.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoKnee_SwitchChangeNotify); + label_AutoKnee.AutoSize = true; + label_AutoKnee.Location = new Point(20, 26); + label_AutoKnee.Name = "label_AutoKnee"; + label_AutoKnee.Size = new Size(125, 12); + label_AutoKnee.TabIndex = 6; + label_AutoKnee.Text = "$COMPRESSOR_AUTOKNEE"; + label_Knee.AutoSize = true; + label_Knee.Location = new Point(198, 81); + label_Knee.Name = "label_Knee"; + label_Knee.Size = new Size(23, 12); + label_Knee.TabIndex = 5; + label_Knee.Text = "0dB"; + hSlider_Knee.BackColor = SystemColors.Control; + hSlider_Knee.Location = new Point(7, 72); + hSlider_Knee.MoveDelta = 1U; + hSlider_Knee.Name = "hSlider_Knee"; + hSlider_Knee.Position = 0U; + hSlider_Knee.PositionFloat = 0.0f; + hSlider_Knee.Size = new Size(185, 31); + hSlider_Knee.TabIndex = 5; + hSlider_Knee.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Knee_PositionChangeNotify); + groupBox_Ratio.Controls.Add(label_Ratio); + groupBox_Ratio.Controls.Add(hSlider_Ratio); + groupBox_Ratio.Location = new Point(289, 173); + groupBox_Ratio.Name = "groupBox_Ratio"; + groupBox_Ratio.Size = new Size(271, 115); + groupBox_Ratio.TabIndex = 6; + groupBox_Ratio.TabStop = false; + groupBox_Ratio.Text = "$COMPRESSOR_RATIO"; + label_Ratio.AutoSize = true; + label_Ratio.Location = new Point(198, 52); + label_Ratio.Name = "label_Ratio"; + label_Ratio.Size = new Size(41, 12); + label_Ratio.TabIndex = 5; + label_Ratio.Text = "1.00:1"; + hSlider_Ratio.BackColor = SystemColors.Control; + hSlider_Ratio.Location = new Point(7, 43); + hSlider_Ratio.MoveDelta = 1U; + hSlider_Ratio.Name = "hSlider_Ratio"; + hSlider_Ratio.Position = 0U; + hSlider_Ratio.PositionFloat = 0.0f; + hSlider_Ratio.Size = new Size(185, 31); + hSlider_Ratio.TabIndex = 5; + hSlider_Ratio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Ratio_PositionChangeNotify); + groupBox_Release.Controls.Add(onOffSwitch_AutoRelease); + groupBox_Release.Controls.Add(label_AutoRelease); + groupBox_Release.Controls.Add(label_Release); + groupBox_Release.Controls.Add(hSlider_Release); + groupBox_Release.Location = new Point(289, 294); + groupBox_Release.Name = "groupBox_Release"; + groupBox_Release.Size = new Size(271, 115); + groupBox_Release.TabIndex = 8; + groupBox_Release.TabStop = false; + groupBox_Release.Text = "$COMPRESSOR_RELEASE"; + onOffSwitch_AutoRelease.BackColor = Color.Transparent; + onOffSwitch_AutoRelease.Location = new Point(22, 41); + onOffSwitch_AutoRelease.Name = "onOffSwitch_AutoRelease"; + onOffSwitch_AutoRelease.Size = new Size(49, 22); + onOffSwitch_AutoRelease.SwitchedOn = false; + onOffSwitch_AutoRelease.TabIndex = 6; + onOffSwitch_AutoRelease.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoRelease_SwitchChangeNotify); + label_AutoRelease.AutoSize = true; + label_AutoRelease.Location = new Point(20, 26); + label_AutoRelease.Name = "label_AutoRelease"; + label_AutoRelease.Size = new Size(143, 12); + label_AutoRelease.TabIndex = 6; + label_AutoRelease.Text = "$COMPRESSOR_AUTORELEASE"; + label_Release.AutoSize = true; + label_Release.Location = new Point(198, 81); + label_Release.Name = "label_Release"; + label_Release.Size = new Size(41, 12); + label_Release.TabIndex = 5; + label_Release.Text = "5.00ms"; + hSlider_Release.BackColor = SystemColors.Control; + hSlider_Release.Location = new Point(7, 72); + hSlider_Release.MoveDelta = 1U; + hSlider_Release.Name = "hSlider_Release"; + hSlider_Release.Position = 0U; + hSlider_Release.PositionFloat = 0.0f; + hSlider_Release.Size = new Size(185, 31); + hSlider_Release.TabIndex = 5; + hSlider_Release.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Release_PositionChangeNotify); + groupBox_Attack.Controls.Add(onOffSwitch_AutoAttack); + groupBox_Attack.Controls.Add(label_AutoAttack); + groupBox_Attack.Controls.Add(label_Attack); + groupBox_Attack.Controls.Add(hSlider_Attack); + groupBox_Attack.Location = new Point(12, 294); + groupBox_Attack.Name = "groupBox_Attack"; + groupBox_Attack.Size = new Size(271, 115); + groupBox_Attack.TabIndex = 7; + groupBox_Attack.TabStop = false; + groupBox_Attack.Text = "$COMPRESSOR_ATTACK"; + onOffSwitch_AutoAttack.BackColor = Color.Transparent; + onOffSwitch_AutoAttack.Location = new Point(22, 41); + onOffSwitch_AutoAttack.Name = "onOffSwitch_AutoAttack"; + onOffSwitch_AutoAttack.Size = new Size(49, 22); + onOffSwitch_AutoAttack.SwitchedOn = false; + onOffSwitch_AutoAttack.TabIndex = 6; + onOffSwitch_AutoAttack.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoAttack_SwitchChangeNotify); + label_AutoAttack.AutoSize = true; + label_AutoAttack.Location = new Point(20, 26); + label_AutoAttack.Name = "label_AutoAttack"; + label_AutoAttack.Size = new Size(137, 12); + label_AutoAttack.TabIndex = 6; + label_AutoAttack.Text = "$COMPRESSOR_AUTOATTACK"; + label_Attack.AutoSize = true; + label_Attack.Location = new Point(198, 81); + label_Attack.Name = "label_Attack"; + label_Attack.Size = new Size(41, 12); + label_Attack.TabIndex = 5; + label_Attack.Text = "0.10ms"; + hSlider_Attack.BackColor = SystemColors.Control; + hSlider_Attack.Location = new Point(7, 72); + hSlider_Attack.MoveDelta = 1U; + hSlider_Attack.Name = "hSlider_Attack"; + hSlider_Attack.Position = 0U; + hSlider_Attack.PositionFloat = 0.0f; + hSlider_Attack.Size = new Size(185, 31); + hSlider_Attack.TabIndex = 5; + hSlider_Attack.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Attack_PositionChangeNotify); + singleButton_Cancel.BackColor = SystemColors.Control; + singleButton_Cancel.ButtonText = "$CANCEL"; + singleButton_Cancel.Location = new Point(448, 20); + singleButton_Cancel.Name = "singleButton_Cancel"; + singleButton_Cancel.Size = new Size(112, 40); + singleButton_Cancel.TabIndex = 9; + singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + singleButton_OK.BackColor = SystemColors.Control; + singleButton_OK.ButtonText = "$OK"; + singleButton_OK.Location = new Point(328, 20); + singleButton_OK.Name = "singleButton_OK"; + singleButton_OK.Size = new Size(112, 40); + singleButton_OK.TabIndex = 10; + singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + groupBox_MakeUpGain.Controls.Add(onOffSwitch_AutoGain); + groupBox_MakeUpGain.Controls.Add(label_AutoGain); + groupBox_MakeUpGain.Controls.Add(label_Gain); + groupBox_MakeUpGain.Controls.Add(hSlider_Gain); + groupBox_MakeUpGain.Location = new Point(12, 415); + groupBox_MakeUpGain.Name = "groupBox_MakeUpGain"; + groupBox_MakeUpGain.Size = new Size(548, 121); + groupBox_MakeUpGain.TabIndex = 11; + groupBox_MakeUpGain.TabStop = false; + groupBox_MakeUpGain.Text = "$COMPRESSOR_MAKEUPGAIN"; + onOffSwitch_AutoGain.BackColor = Color.Transparent; + onOffSwitch_AutoGain.Location = new Point(22, 41); + onOffSwitch_AutoGain.Name = "onOffSwitch_AutoGain"; + onOffSwitch_AutoGain.Size = new Size(49, 22); + onOffSwitch_AutoGain.SwitchedOn = false; + onOffSwitch_AutoGain.TabIndex = 8; + onOffSwitch_AutoGain.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_AutoGain_SwitchChangeNotify); + label_AutoGain.AutoSize = true; + label_AutoGain.Location = new Point(20, 26); + label_AutoGain.Name = "label_AutoGain"; + label_AutoGain.Size = new Size(125, 12); + label_AutoGain.TabIndex = 7; + label_AutoGain.Text = "$COMPRESSOR_AUTOGAIN"; + label_Gain.AutoSize = true; + label_Gain.Location = new Point(475, 88); + label_Gain.Name = "label_Gain"; + label_Gain.Size = new Size(23, 12); + label_Gain.TabIndex = 5; + label_Gain.Text = "0dB"; + hSlider_Gain.BackColor = SystemColors.Control; + hSlider_Gain.Location = new Point(7, 71); + hSlider_Gain.MoveDelta = 1U; + hSlider_Gain.Name = "hSlider_Gain"; + hSlider_Gain.Position = 0U; + hSlider_Gain.PositionFloat = 0.0f; + hSlider_Gain.Size = new Size(462, 47); + hSlider_Gain.TabIndex = 5; + hSlider_Gain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(HSlider_Gain_PositionChangeNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(574, 556); + Controls.Add(groupBox_MakeUpGain); + Controls.Add(singleButton_OK); + Controls.Add(singleButton_Cancel); + Controls.Add(groupBox_Release); + Controls.Add(groupBox_Attack); + Controls.Add(groupBox_Ratio); + Controls.Add(groupBox_Knee); + Controls.Add(groupBox_Threshold); + Controls.Add(onOffSwitch_Compressor); + Controls.Add(label_Compressor_Enable); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + Name = nameof(FrmCompressorLite); + StartPosition = FormStartPosition.CenterScreen; + Text = "$COMPRESSOR"; + groupBox_Threshold.ResumeLayout(false); + groupBox_Threshold.PerformLayout(); + groupBox_Knee.ResumeLayout(false); + groupBox_Knee.PerformLayout(); + groupBox_Ratio.ResumeLayout(false); + groupBox_Ratio.PerformLayout(); + groupBox_Release.ResumeLayout(false); + groupBox_Release.PerformLayout(); + groupBox_Attack.ResumeLayout(false); + groupBox_Attack.PerformLayout(); + groupBox_MakeUpGain.ResumeLayout(false); + groupBox_MakeUpGain.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } - public float Threshold - { - get => this.m_rThreshold; - set - { - this.m_rThreshold = value; - this.UpdateUI(); - } - } + public bool CompressorEnabled + { + get => m_bCompressorEnabled; + set + { + m_bCompressorEnabled = value; + UpdateUI(); + } + } - public float KneeWidth - { - get => this.m_rKneewidth; - set - { - this.m_rKneewidth = value; - this.UpdateUI(); - } - } + public float Threshold + { + get => m_rThreshold; + set + { + m_rThreshold = value; + UpdateUI(); + } + } - public bool AutoKnee - { - get => this.m_bAutoKnee; - set - { - this.m_bAutoKnee = value; - this.UpdateUI(); - } - } + public float KneeWidth + { + get => m_rKneewidth; + set + { + m_rKneewidth = value; + UpdateUI(); + } + } - public float Ratio - { - get => this.m_rRatio; - set - { - this.m_rRatio = value; - this.UpdateUI(); - } - } + public bool AutoKnee + { + get => m_bAutoKnee; + set + { + m_bAutoKnee = value; + UpdateUI(); + } + } - public float AttackTime - { - get => this.m_rAttack; - set - { - this.m_rAttack = value; - this.UpdateUI(); - } - } + public float Ratio + { + get => m_rRatio; + set + { + m_rRatio = value; + UpdateUI(); + } + } - public bool AutoAttack - { - get => this.m_bAutoAttack; - set - { - this.m_bAutoAttack = value; - this.UpdateUI(); - } - } + public float AttackTime + { + get => m_rAttack; + set + { + m_rAttack = value; + UpdateUI(); + } + } - public float ReleaseTime - { - get => this.m_rRelease; - set - { - this.m_rRelease = value; - this.UpdateUI(); - } - } + public bool AutoAttack + { + get => m_bAutoAttack; + set + { + m_bAutoAttack = value; + UpdateUI(); + } + } - public bool AutoRelease - { - get => this.m_bAutoRelease; - set - { - this.m_bAutoRelease = value; - this.UpdateUI(); - } - } + public float ReleaseTime + { + get => m_rRelease; + set + { + m_rRelease = value; + UpdateUI(); + } + } - public float MakeupGain - { - get => this.m_rMakeupGain; - set - { - this.m_rMakeupGain = value; - this.UpdateUI(); - } - } + public bool AutoRelease + { + get => m_bAutoRelease; + set + { + m_bAutoRelease = value; + UpdateUI(); + } + } - public bool AutoGain - { - get => this.m_bAutoGain; - set - { - this.m_bAutoGain = value; - this.UpdateUI(); - } - } + public float MakeupGain + { + get => m_rMakeupGain; + set + { + m_rMakeupGain = value; + UpdateUI(); + } + } - public frmCompressorLite() - { - this.InitializeComponent(); - this.Text = GlobalMessages.COMPRESSOR; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.label_Compressor_Enable.Text = GlobalMessages.ENABLE; - this.groupBox_Threshold.Text = GlobalMessages.COMPRESSOR_THRESHOLD; - this.groupBox_Knee.Text = GlobalMessages.COMPRESSOR_KNEEWIDTH; - this.label_AutoKnee.Text = GlobalMessages.COMPRESSOR_AUTOKNEE; - this.groupBox_Ratio.Text = GlobalMessages.COMPRESSOR_RATIO; - this.groupBox_Attack.Text = GlobalMessages.COMPRESSOR_ATTACK; - this.label_AutoAttack.Text = GlobalMessages.COMPRESSOR_AUTOATTACK; - this.groupBox_Release.Text = GlobalMessages.COMPRESSOR_RELEASE; - this.label_AutoRelease.Text = GlobalMessages.COMPRESSOR_AUTORELEASE; - this.groupBox_MakeUpGain.Text = GlobalMessages.COMPRESSOR_MAKEUPGAIN; - this.label_AutoGain.Text = GlobalMessages.COMPRESSOR_AUTOGAIN; - this.UpdateUI(); - } + public bool AutoGain + { + get => m_bAutoGain; + set + { + m_bAutoGain = value; + UpdateUI(); + } + } - private void UpdateUI() - { - this.onOffSwitch_Compressor.SwitchedOn = this.m_bCompressorEnabled; - this.onOffSwitch_AutoKnee.SwitchedOn = this.m_bAutoKnee; - this.onOffSwitch_AutoAttack.SwitchedOn = this.m_bAutoAttack; - this.onOffSwitch_AutoRelease.SwitchedOn = this.m_bAutoRelease; - this.onOffSwitch_AutoGain.SwitchedOn = this.m_bAutoGain; - this.hSlider_Threshold.Position = (uint) ((double) this.m_rThreshold * 100.0); - this.hSlider_Knee.Position = (uint) ((double) this.m_rKneewidth * 100.0); - this.hSlider_Ratio.Position = (uint) ((double) this.m_rRatio * 100.0); - this.hSlider_Attack.Position = (uint) ((double) this.m_rAttack * 100.0); - this.hSlider_Release.Position = (uint) ((double) this.m_rRelease * 100.0); - this.hSlider_Gain.Position = (uint) ((double) this.m_rMakeupGain * 100.0); - } + public FrmCompressorLite() + { + InitializeComponent(); + Text = GlobalMessages.COMPRESSOR; + singleButton_OK.ButtonText = GlobalMessages.OK; + singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + label_Compressor_Enable.Text = GlobalMessages.ENABLE; + groupBox_Threshold.Text = GlobalMessages.COMPRESSOR_THRESHOLD; + groupBox_Knee.Text = GlobalMessages.COMPRESSOR_KNEEWIDTH; + label_AutoKnee.Text = GlobalMessages.COMPRESSOR_AUTOKNEE; + groupBox_Ratio.Text = GlobalMessages.COMPRESSOR_RATIO; + groupBox_Attack.Text = GlobalMessages.COMPRESSOR_ATTACK; + label_AutoAttack.Text = GlobalMessages.COMPRESSOR_AUTOATTACK; + groupBox_Release.Text = GlobalMessages.COMPRESSOR_RELEASE; + label_AutoRelease.Text = GlobalMessages.COMPRESSOR_AUTORELEASE; + groupBox_MakeUpGain.Text = GlobalMessages.COMPRESSOR_MAKEUPGAIN; + label_AutoGain.Text = GlobalMessages.COMPRESSOR_AUTOGAIN; + UpdateUI(); + } - private void onOffSwitch_Compressor_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bCompressorEnabled = bSwitchedOn; + private void UpdateUI() + { + onOffSwitch_Compressor.SwitchedOn = m_bCompressorEnabled; + onOffSwitch_AutoKnee.SwitchedOn = m_bAutoKnee; + onOffSwitch_AutoAttack.SwitchedOn = m_bAutoAttack; + onOffSwitch_AutoRelease.SwitchedOn = m_bAutoRelease; + onOffSwitch_AutoGain.SwitchedOn = m_bAutoGain; + hSlider_Threshold.Position = (uint)(m_rThreshold * 100.0); + hSlider_Knee.Position = (uint)(m_rKneewidth * 100.0); + hSlider_Ratio.Position = (uint)(m_rRatio * 100.0); + hSlider_Attack.Position = (uint)(m_rAttack * 100.0); + hSlider_Release.Position = (uint)(m_rRelease * 100.0); + hSlider_Gain.Position = (uint)(m_rMakeupGain * 100.0); + } - private void onOffSwitch_AutoKnee_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoKnee = bSwitchedOn; + private void OnOffSwitch_Compressor_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bCompressorEnabled = bSwitchedOn; + } - private void onOffSwitch_AutoAttack_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoAttack = bSwitchedOn; + private void OnOffSwitch_AutoKnee_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoKnee = bSwitchedOn; + } - private void onOffSwitch_AutoRelease_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoRelease = bSwitchedOn; + private void OnOffSwitch_AutoAttack_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoAttack = bSwitchedOn; + } - private void onOffSwitch_AutoGain_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bAutoGain = bSwitchedOn; + private void OnOffSwitch_AutoRelease_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoRelease = bSwitchedOn; + } - private void hSlider_Threshold_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rThreshold = fPercent; - this.label_Threshold.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * -60.0 / 20.0))).ToString("F02") + "dB"; - } + private void OnOffSwitch_AutoGain_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bAutoGain = bSwitchedOn; + } - private void hSlider_Knee_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rKneewidth = fPercent; - this.label_Knee.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; - } + private void HSlider_Threshold_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rThreshold = fPercent; + label_Threshold.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * -60.0 / 20.0))).ToString("F02") + "dB"; + } - private void hSlider_Ratio_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rRatio = fPercent; - if ((double) fPercent > 0.99000000953674316) - this.label_Ratio.Text = "oo:1"; - else - this.label_Ratio.Text = (1.0 / (1.0 - (double) fPercent)).ToString("F02") + ":1"; - } + private void HSlider_Knee_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rKneewidth = fPercent; + label_Knee.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; + } - private void hSlider_Attack_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rAttack = fPercent; - this.label_Attack.Text = ((double) Parameters.PARAM2LOG(fPercent, 0.0001f, 0.2f) * 1000.0).ToString("F02") + "ms"; - } + private void HSlider_Ratio_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rRatio = fPercent; + if ((double)fPercent > 0.99000000953674316) + label_Ratio.Text = "oo:1"; + else + label_Ratio.Text = (1.0 / (1.0 - (double)fPercent)).ToString("F02") + ":1"; + } - private void hSlider_Release_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rRelease = fPercent; - this.label_Release.Text = ((double) Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; - } + private void HSlider_Attack_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rAttack = fPercent; + label_Attack.Text = ((double)Parameters.PARAM2LOG(fPercent, 0.0001f, 0.2f) * 1000.0).ToString("F02") + "ms"; + } - private void hSlider_Gain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_rMakeupGain = fPercent; - this.label_Gain.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double) fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; - } + private void HSlider_Release_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rRelease = fPercent; + label_Release.Text = ((double)Parameters.PARAM2LOG(fPercent, 0.005f, 2f) * 1000.0).ToString("F02") + "ms"; + } - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void HSlider_Gain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_rMakeupGain = fPercent; + label_Gain.Text = (20.0 * Math.Log10(Math.Pow(10.0, (double)fPercent * 60.0 / 20.0))).ToString("F02") + "dB"; + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; - } + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } + + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } + } } diff --git a/frmEQPreset.cs b/frmEQPreset.cs index 352af75..c12a238 100644 --- a/frmEQPreset.cs +++ b/frmEQPreset.cs @@ -6,10 +6,10 @@ namespace ViPER4WindowsBin { - public class frmEQPreset : Form - { - private readonly float[] m_faEQPreset_Flat = new float[18] + public class FrmEQPreset : Form { + private readonly float[] m_faEQPreset_Flat = new float[18] + { 1f, 1f, 1f, @@ -28,9 +28,9 @@ public class frmEQPreset : Form 1f, 1f, 1f - }; - private readonly float[] m_faEQPreset_SuperBass = new float[18] - { + }; + private readonly float[] m_faEQPreset_SuperBass = new float[18] + { 3.5f, 2.5f, 1f, @@ -49,9 +49,9 @@ public class frmEQPreset : Form 1f, 1f, 1f - }; - private readonly float[] m_faEQPreset_SoftBass = new float[18] - { + }; + private readonly float[] m_faEQPreset_SoftBass = new float[18] + { 3.5f, 1f, 0.5f, @@ -70,9 +70,9 @@ public class frmEQPreset : Form 1.3f, 1.4f, 1f - }; - private readonly float[] m_faEQPreset_Rock = new float[18] - { + }; + private readonly float[] m_faEQPreset_Rock = new float[18] + { 2f, 3f, 2f, @@ -91,9 +91,9 @@ public class frmEQPreset : Form 1.5f, 1f, 1f - }; - private readonly float[] m_faEQPreset_RandB = new float[18] - { + }; + private readonly float[] m_faEQPreset_RandB = new float[18] + { 1f, 1.5f, 2f, @@ -112,9 +112,9 @@ public class frmEQPreset : Form 1f, 1.4f, 1.4f - }; - private readonly float[] m_faEQPreset_Classic = new float[18] - { + }; + private readonly float[] m_faEQPreset_Classic = new float[18] + { 1f, 1.2f, 1.8f, @@ -133,9 +133,9 @@ public class frmEQPreset : Form 1.8f, 2f, 2f - }; - private readonly float[] m_faEQPreset_Pop = new float[18] - { + }; + private readonly float[] m_faEQPreset_Pop = new float[18] + { 2f, 1.8f, 1.7f, @@ -154,9 +154,9 @@ public class frmEQPreset : Form 1.6f, 1.8f, 1.8f - }; - private readonly float[] m_faEQPreset_Jazz = new float[18] - { + }; + private readonly float[] m_faEQPreset_Jazz = new float[18] + { 1f, 1f, 1f, @@ -175,9 +175,9 @@ public class frmEQPreset : Form 1.2f, 1.3f, 1.3f - }; - private readonly float[] m_faEQPreset_Blues = new float[18] - { + }; + private readonly float[] m_faEQPreset_Blues = new float[18] + { 0.7f, 0.8f, 0.9f, @@ -196,9 +196,9 @@ public class frmEQPreset : Form 0.7f, 0.65f, 0.5f - }; - private readonly float[] m_faEQPreset_Electronic = new float[18] - { + }; + private readonly float[] m_faEQPreset_Electronic = new float[18] + { 1.8f, 1f, 0.8f, @@ -217,9 +217,9 @@ public class frmEQPreset : Form 1.6f, 1.6f, 1.6f - }; - private readonly float[] m_faEQPreset_Vocal = new float[18] - { + }; + private readonly float[] m_faEQPreset_Vocal = new float[18] + { 0.8f, 0.8f, 0.8f, @@ -238,148 +238,156 @@ public class frmEQPreset : Form 0.8f, 0.6f, 0.6f - }; - private float[] m_faEQPreset = new float[18]; - private IContainer components; - private ButtonBox buttonBox_Preset; - private SingleButton singleButton_Load; - private SingleButton singleButton_Cancel; + }; + private readonly float[] m_faEQPreset = new float[18]; + private readonly IContainer components; + private ButtonBox buttonBox_Preset; + private SingleButton singleButton_Load; + private SingleButton singleButton_Cancel; - public frmEQPreset() - { - this.InitializeComponent(); - this.Text = GlobalMessages.EQUALIZER_PRESET; - this.singleButton_Load.ButtonText = GlobalMessages.LOAD_PRESET; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_FLAT, (object) "0")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_SUPERBASS, (object) "1")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_SOFTBASS, (object) "2")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_ROCK, (object) "3")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_RANDB, (object) "4")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_CLASSIC, (object) "5")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_POP, (object) "6")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_JAZZ, (object) "7")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_BLUES, (object) "8")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_ELECTRONIC, (object) "9")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_VOCAL, (object) "10")); - this.buttonBox_Preset.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.PresetSelected); - for (int index = 0; index < this.m_faEQPreset.Length; ++index) - this.m_faEQPreset[index] = 1f; - } + public FrmEQPreset() + { + InitializeComponent(); + Text = GlobalMessages.EQUALIZER_PRESET; + singleButton_Load.ButtonText = GlobalMessages.LOAD_PRESET; + singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_FLAT, "0")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_SUPERBASS, "1")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_SOFTBASS, "2")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_ROCK, "3")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_RANDB, "4")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_CLASSIC, "5")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_POP, "6")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_JAZZ, "7")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_BLUES, "8")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_ELECTRONIC, "9")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.EQUALIZER_PRESET_VOCAL, "10")); + buttonBox_Preset.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(PresetSelected); + for (int index = 0; index < m_faEQPreset.Length; ++index) + m_faEQPreset[index] = 1f; + } - private void PresetSelected( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem.Tag == null || !(itCurrItem.Tag is string)) - return; - string tag = itCurrItem.Tag as string; - if (tag == "") - return; - int result = -1; - if (!int.TryParse(tag, out result)) - return; - switch (result) - { - case 0: - Array.Copy((Array) this.m_faEQPreset_Flat, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 1: - Array.Copy((Array) this.m_faEQPreset_SuperBass, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 2: - Array.Copy((Array) this.m_faEQPreset_SoftBass, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 3: - Array.Copy((Array) this.m_faEQPreset_Rock, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 4: - Array.Copy((Array) this.m_faEQPreset_RandB, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 5: - Array.Copy((Array) this.m_faEQPreset_Classic, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 6: - Array.Copy((Array) this.m_faEQPreset_Pop, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 7: - Array.Copy((Array) this.m_faEQPreset_Jazz, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 8: - Array.Copy((Array) this.m_faEQPreset_Blues, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 9: - Array.Copy((Array) this.m_faEQPreset_Electronic, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - case 10: - Array.Copy((Array) this.m_faEQPreset_Vocal, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - break; - } - } + private void PresetSelected( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem.Tag == null || !(itCurrItem.Tag is string)) + return; + string tag = itCurrItem.Tag as string; + if (tag == "") + return; + if (!int.TryParse(tag, out int result)) + return; + switch (result) + { + case 0: + Array.Copy(m_faEQPreset_Flat, m_faEQPreset, m_faEQPreset.Length); + break; + case 1: + Array.Copy(m_faEQPreset_SuperBass, m_faEQPreset, m_faEQPreset.Length); + break; + case 2: + Array.Copy(m_faEQPreset_SoftBass, m_faEQPreset, m_faEQPreset.Length); + break; + case 3: + Array.Copy(m_faEQPreset_Rock, m_faEQPreset, m_faEQPreset.Length); + break; + case 4: + Array.Copy(m_faEQPreset_RandB, m_faEQPreset, m_faEQPreset.Length); + break; + case 5: + Array.Copy(m_faEQPreset_Classic, m_faEQPreset, m_faEQPreset.Length); + break; + case 6: + Array.Copy(m_faEQPreset_Pop, m_faEQPreset, m_faEQPreset.Length); + break; + case 7: + Array.Copy(m_faEQPreset_Jazz, m_faEQPreset, m_faEQPreset.Length); + break; + case 8: + Array.Copy(m_faEQPreset_Blues, m_faEQPreset, m_faEQPreset.Length); + break; + case 9: + Array.Copy(m_faEQPreset_Electronic, m_faEQPreset, m_faEQPreset.Length); + break; + case 10: + Array.Copy(m_faEQPreset_Vocal, m_faEQPreset, m_faEQPreset.Length); + break; + } + } - public void SetPreset(float[] faPreset) - { - if (faPreset == null || faPreset.Length != this.m_faEQPreset.Length) - return; - Array.Copy((Array) faPreset, (Array) this.m_faEQPreset, this.m_faEQPreset.Length); - } + public void SetPreset(float[] faPreset) + { + if (faPreset == null || faPreset.Length != m_faEQPreset.Length) + return; + Array.Copy(faPreset, m_faEQPreset, m_faEQPreset.Length); + } - public float[] GetPreset() => this.m_faEQPreset; + public float[] GetPreset() + { + return m_faEQPreset; + } - private void singleButton_Load_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void SingleButton_Load_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmEQPreset)); - this.buttonBox_Preset = new ButtonBox(); - this.singleButton_Load = new SingleButton(); - this.singleButton_Cancel = new SingleButton(); - this.SuspendLayout(); - this.buttonBox_Preset.BackColor = SystemColors.Control; - this.buttonBox_Preset.Location = new Point(12, 12); - this.buttonBox_Preset.Name = "buttonBox_Preset"; - this.buttonBox_Preset.Size = new Size(175, 331); - this.buttonBox_Preset.TabIndex = 0; - this.singleButton_Load.BackColor = SystemColors.Control; - this.singleButton_Load.ButtonText = "$LOAD_PRESET"; - this.singleButton_Load.Location = new Point(193, 12); - this.singleButton_Load.Name = "singleButton_Load"; - this.singleButton_Load.Size = new Size(112, 40); - this.singleButton_Load.TabIndex = 1; - this.singleButton_Load.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Load_ButtonClickNotify); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(193, 303); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(112, 40); - this.singleButton_Cancel.TabIndex = 2; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(318, 355); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.singleButton_Load); - this.Controls.Add((Control) this.buttonBox_Preset); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmEQPreset); - this.ShowInTaskbar = false; - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$EQUALIZER_PRESET"; - this.ResumeLayout(false); + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmEQPreset)); + buttonBox_Preset = new ButtonBox(); + singleButton_Load = new SingleButton(); + singleButton_Cancel = new SingleButton(); + SuspendLayout(); + buttonBox_Preset.BackColor = SystemColors.Control; + buttonBox_Preset.Location = new Point(12, 12); + buttonBox_Preset.Name = "buttonBox_Preset"; + buttonBox_Preset.Size = new Size(175, 331); + buttonBox_Preset.TabIndex = 0; + singleButton_Load.BackColor = SystemColors.Control; + singleButton_Load.ButtonText = "$LOAD_PRESET"; + singleButton_Load.Location = new Point(193, 12); + singleButton_Load.Name = "singleButton_Load"; + singleButton_Load.Size = new Size(112, 40); + singleButton_Load.TabIndex = 1; + singleButton_Load.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Load_ButtonClickNotify); + singleButton_Cancel.BackColor = SystemColors.Control; + singleButton_Cancel.ButtonText = "$CANCEL"; + singleButton_Cancel.Location = new Point(193, 303); + singleButton_Cancel.Name = "singleButton_Cancel"; + singleButton_Cancel.Size = new Size(112, 40); + singleButton_Cancel.TabIndex = 2; + singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(318, 355); + Controls.Add(singleButton_Cancel); + Controls.Add(singleButton_Load); + Controls.Add(buttonBox_Preset); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmEQPreset); + ShowInTaskbar = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "$EQUALIZER_PRESET"; + ResumeLayout(false); + } } - } } diff --git a/frmEqualizer.cs b/frmEqualizer.cs index c3f10d6..4249fb3 100644 --- a/frmEqualizer.cs +++ b/frmEqualizer.cs @@ -8,652 +8,660 @@ namespace ViPER4WindowsBin { - public class frmEqualizer : Form - { - private IContainer components; - private Label label_Equalizer_Enable; - private OnOffSwitch onOffSwitch_Equalizer; - private VSlider vSlider1; - private VSlider vSlider2; - private VSlider vSlider3; - private VSlider vSlider4; - private VSlider vSlider5; - private VSlider vSlider6; - private VSlider vSlider7; - private VSlider vSlider8; - private VSlider vSlider9; - private VSlider vSlider10; - private VSlider vSlider11; - private VSlider vSlider12; - private VSlider vSlider13; - private VSlider vSlider14; - private VSlider vSlider15; - private VSlider vSlider16; - private VSlider vSlider17; - private VSlider vSlider18; - private Label label1; - private Label label2; - private Label label3; - private Label label4; - private Label label5; - private Label label6; - private Label label7; - private Label label8; - private Label label9; - private Label label10; - private Label label11; - private Label label12; - private Label label13; - private Label label14; - private Label label15; - private Label label16; - private Label label17; - private Label label18; - private SingleButton singleButton_Preset; - private SingleButton singleButton_OK; - private Label label_dB_Max; - private Label label_dB_Min; - private Label label_dB_Zero; - private CheckBox checkBox_RealtimeAdjust; - private bool m_bEQEnabled; - private float[] m_faEQBands = new float[18]; - private List m_ctlEQBandList = new List(); - private RuntimeUtils.ConfigProxy._ParamOfBaseSystem m_paramBaseSystem; - private RuntimeUtils.ConfigProxy._ParamOfMusicMode m_paramMusicMode; - private RuntimeUtils.ConfigProxy._ParamOfMovieMode m_paramMovieMode; - private RuntimeUtils.ConfigProxy._ParamOfFreestyle m_paramFreestyle; - private RuntimeUtils.ConfigProxy m_cpConfigProxy; - - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } - - private void InitializeComponent() + public class FrmEqualizer : Form { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmEqualizer)); - this.label_Equalizer_Enable = new Label(); - this.onOffSwitch_Equalizer = new OnOffSwitch(); - this.vSlider1 = new VSlider(); - this.vSlider2 = new VSlider(); - this.vSlider3 = new VSlider(); - this.vSlider4 = new VSlider(); - this.vSlider5 = new VSlider(); - this.vSlider6 = new VSlider(); - this.vSlider7 = new VSlider(); - this.vSlider8 = new VSlider(); - this.vSlider9 = new VSlider(); - this.vSlider10 = new VSlider(); - this.vSlider11 = new VSlider(); - this.vSlider12 = new VSlider(); - this.vSlider13 = new VSlider(); - this.vSlider14 = new VSlider(); - this.vSlider15 = new VSlider(); - this.vSlider16 = new VSlider(); - this.vSlider17 = new VSlider(); - this.vSlider18 = new VSlider(); - this.label1 = new Label(); - this.label2 = new Label(); - this.label3 = new Label(); - this.label4 = new Label(); - this.label5 = new Label(); - this.label6 = new Label(); - this.label7 = new Label(); - this.label8 = new Label(); - this.label9 = new Label(); - this.label10 = new Label(); - this.label11 = new Label(); - this.label12 = new Label(); - this.label13 = new Label(); - this.label14 = new Label(); - this.label15 = new Label(); - this.label16 = new Label(); - this.label17 = new Label(); - this.label18 = new Label(); - this.singleButton_Preset = new SingleButton(); - this.singleButton_OK = new SingleButton(); - this.label_dB_Max = new Label(); - this.label_dB_Min = new Label(); - this.label_dB_Zero = new Label(); - this.checkBox_RealtimeAdjust = new CheckBox(); - this.SuspendLayout(); - this.label_Equalizer_Enable.AutoSize = true; - this.label_Equalizer_Enable.Location = new Point(24, 22); - this.label_Equalizer_Enable.Name = "label_Equalizer_Enable"; - this.label_Equalizer_Enable.Size = new Size(47, 12); - this.label_Equalizer_Enable.TabIndex = 0; - this.label_Equalizer_Enable.Text = "$ENABLE"; - this.onOffSwitch_Equalizer.BackColor = Color.Transparent; - this.onOffSwitch_Equalizer.Location = new Point(24, 37); - this.onOffSwitch_Equalizer.Name = "onOffSwitch_Equalizer"; - this.onOffSwitch_Equalizer.Size = new Size(107, 28); - this.onOffSwitch_Equalizer.SwitchedOn = false; - this.onOffSwitch_Equalizer.TabIndex = 1; - this.vSlider1.BackColor = SystemColors.Control; - this.vSlider1.Location = new Point(53, 83); - this.vSlider1.MoveDelta = 1U; - this.vSlider1.Name = "vSlider1"; - this.vSlider1.Position = 50U; - this.vSlider1.Size = new Size(47, 204); - this.vSlider1.TabIndex = 2; - this.vSlider2.BackColor = SystemColors.Control; - this.vSlider2.Location = new Point(106, 83); - this.vSlider2.MoveDelta = 1U; - this.vSlider2.Name = "vSlider2"; - this.vSlider2.Position = 50U; - this.vSlider2.Size = new Size(47, 204); - this.vSlider2.TabIndex = 3; - this.vSlider3.BackColor = SystemColors.Control; - this.vSlider3.Location = new Point(159, 83); - this.vSlider3.MoveDelta = 1U; - this.vSlider3.Name = "vSlider3"; - this.vSlider3.Position = 50U; - this.vSlider3.Size = new Size(47, 204); - this.vSlider3.TabIndex = 4; - this.vSlider4.BackColor = SystemColors.Control; - this.vSlider4.Location = new Point(212, 83); - this.vSlider4.MoveDelta = 1U; - this.vSlider4.Name = "vSlider4"; - this.vSlider4.Position = 50U; - this.vSlider4.Size = new Size(47, 204); - this.vSlider4.TabIndex = 5; - this.vSlider5.BackColor = SystemColors.Control; - this.vSlider5.Location = new Point(265, 83); - this.vSlider5.MoveDelta = 1U; - this.vSlider5.Name = "vSlider5"; - this.vSlider5.Position = 50U; - this.vSlider5.Size = new Size(47, 204); - this.vSlider5.TabIndex = 6; - this.vSlider6.BackColor = SystemColors.Control; - this.vSlider6.Location = new Point(318, 83); - this.vSlider6.MoveDelta = 1U; - this.vSlider6.Name = "vSlider6"; - this.vSlider6.Position = 50U; - this.vSlider6.Size = new Size(47, 204); - this.vSlider6.TabIndex = 7; - this.vSlider7.BackColor = SystemColors.Control; - this.vSlider7.Location = new Point(371, 83); - this.vSlider7.MoveDelta = 1U; - this.vSlider7.Name = "vSlider7"; - this.vSlider7.Position = 50U; - this.vSlider7.Size = new Size(47, 204); - this.vSlider7.TabIndex = 8; - this.vSlider8.BackColor = SystemColors.Control; - this.vSlider8.Location = new Point(424, 83); - this.vSlider8.MoveDelta = 1U; - this.vSlider8.Name = "vSlider8"; - this.vSlider8.Position = 50U; - this.vSlider8.Size = new Size(47, 204); - this.vSlider8.TabIndex = 9; - this.vSlider9.BackColor = SystemColors.Control; - this.vSlider9.Location = new Point(477, 83); - this.vSlider9.MoveDelta = 1U; - this.vSlider9.Name = "vSlider9"; - this.vSlider9.Position = 50U; - this.vSlider9.Size = new Size(47, 204); - this.vSlider9.TabIndex = 10; - this.vSlider10.BackColor = SystemColors.Control; - this.vSlider10.Location = new Point(530, 83); - this.vSlider10.MoveDelta = 1U; - this.vSlider10.Name = "vSlider10"; - this.vSlider10.Position = 50U; - this.vSlider10.Size = new Size(47, 204); - this.vSlider10.TabIndex = 11; - this.vSlider11.BackColor = SystemColors.Control; - this.vSlider11.Location = new Point(583, 83); - this.vSlider11.MoveDelta = 1U; - this.vSlider11.Name = "vSlider11"; - this.vSlider11.Position = 50U; - this.vSlider11.Size = new Size(47, 204); - this.vSlider11.TabIndex = 12; - this.vSlider12.BackColor = SystemColors.Control; - this.vSlider12.Location = new Point(636, 83); - this.vSlider12.MoveDelta = 1U; - this.vSlider12.Name = "vSlider12"; - this.vSlider12.Position = 50U; - this.vSlider12.Size = new Size(47, 204); - this.vSlider12.TabIndex = 13; - this.vSlider13.BackColor = SystemColors.Control; - this.vSlider13.Location = new Point(689, 83); - this.vSlider13.MoveDelta = 1U; - this.vSlider13.Name = "vSlider13"; - this.vSlider13.Position = 50U; - this.vSlider13.Size = new Size(47, 204); - this.vSlider13.TabIndex = 14; - this.vSlider14.BackColor = SystemColors.Control; - this.vSlider14.Location = new Point(742, 83); - this.vSlider14.MoveDelta = 1U; - this.vSlider14.Name = "vSlider14"; - this.vSlider14.Position = 50U; - this.vSlider14.Size = new Size(47, 204); - this.vSlider14.TabIndex = 15; - this.vSlider15.BackColor = SystemColors.Control; - this.vSlider15.Location = new Point(795, 83); - this.vSlider15.MoveDelta = 1U; - this.vSlider15.Name = "vSlider15"; - this.vSlider15.Position = 50U; - this.vSlider15.Size = new Size(47, 204); - this.vSlider15.TabIndex = 16; - this.vSlider16.BackColor = SystemColors.Control; - this.vSlider16.Location = new Point(848, 83); - this.vSlider16.MoveDelta = 1U; - this.vSlider16.Name = "vSlider16"; - this.vSlider16.Position = 50U; - this.vSlider16.Size = new Size(47, 204); - this.vSlider16.TabIndex = 17; - this.vSlider17.BackColor = SystemColors.Control; - this.vSlider17.Location = new Point(901, 83); - this.vSlider17.MoveDelta = 1U; - this.vSlider17.Name = "vSlider17"; - this.vSlider17.Position = 50U; - this.vSlider17.Size = new Size(47, 204); - this.vSlider17.TabIndex = 18; - this.vSlider18.BackColor = SystemColors.Control; - this.vSlider18.Location = new Point(954, 83); - this.vSlider18.MoveDelta = 1U; - this.vSlider18.Name = "vSlider18"; - this.vSlider18.Position = 50U; - this.vSlider18.Size = new Size(47, 204); - this.vSlider18.TabIndex = 19; - this.label1.AutoSize = true; - this.label1.Location = new Point(69, 290); - this.label1.Name = "label1"; - this.label1.Size = new Size(17, 12); - this.label1.TabIndex = 20; - this.label1.Text = "65"; - this.label2.AutoSize = true; - this.label2.Location = new Point(121, 290); - this.label2.Name = "label2"; - this.label2.Size = new Size(17, 12); - this.label2.TabIndex = 21; - this.label2.Text = "93"; - this.label3.AutoSize = true; - this.label3.Location = new Point(173, 290); - this.label3.Name = "label3"; - this.label3.Size = new Size(23, 12); - this.label3.TabIndex = 22; - this.label3.Text = "131"; - this.label4.AutoSize = true; - this.label4.Location = new Point(225, 290); - this.label4.Name = "label4"; - this.label4.Size = new Size(23, 12); - this.label4.TabIndex = 23; - this.label4.Text = "185"; - this.label5.AutoSize = true; - this.label5.Location = new Point(279, 290); - this.label5.Name = "label5"; - this.label5.Size = new Size(23, 12); - this.label5.TabIndex = 24; - this.label5.Text = "262"; - this.label6.AutoSize = true; - this.label6.Location = new Point(332, 290); - this.label6.Name = "label6"; - this.label6.Size = new Size(23, 12); - this.label6.TabIndex = 25; - this.label6.Text = "370"; - this.label7.AutoSize = true; - this.label7.Location = new Point(384, 290); - this.label7.Name = "label7"; - this.label7.Size = new Size(23, 12); - this.label7.TabIndex = 26; - this.label7.Text = "523"; - this.label8.AutoSize = true; - this.label8.Location = new Point(437, 290); - this.label8.Name = "label8"; - this.label8.Size = new Size(23, 12); - this.label8.TabIndex = 27; - this.label8.Text = "740"; - this.label9.AutoSize = true; - this.label9.Location = new Point(487, 290); - this.label9.Name = "label9"; - this.label9.Size = new Size(29, 12); - this.label9.TabIndex = 28; - this.label9.Text = "1.0k"; - this.label10.AutoSize = true; - this.label10.Location = new Point(540, 290); - this.label10.Name = "label10"; - this.label10.Size = new Size(29, 12); - this.label10.TabIndex = 29; - this.label10.Text = "1.5k"; - this.label11.AutoSize = true; - this.label11.Location = new Point(593, 290); - this.label11.Name = "label11"; - this.label11.Size = new Size(29, 12); - this.label11.TabIndex = 30; - this.label11.Text = "2.1k"; - this.label12.AutoSize = true; - this.label12.Location = new Point(646, 290); - this.label12.Name = "label12"; - this.label12.Size = new Size(29, 12); - this.label12.TabIndex = 31; - this.label12.Text = "3.0k"; - this.label13.AutoSize = true; - this.label13.Location = new Point(699, 290); - this.label13.Name = "label13"; - this.label13.Size = new Size(29, 12); - this.label13.TabIndex = 32; - this.label13.Text = "4.2k"; - this.label14.AutoSize = true; - this.label14.Location = new Point(752, 290); - this.label14.Name = "label14"; - this.label14.Size = new Size(29, 12); - this.label14.TabIndex = 33; - this.label14.Text = "6.0k"; - this.label15.AutoSize = true; - this.label15.Location = new Point(806, 290); - this.label15.Name = "label15"; - this.label15.Size = new Size(29, 12); - this.label15.TabIndex = 34; - this.label15.Text = "8.4k"; - this.label16.AutoSize = true; - this.label16.Location = new Point(857, 290); - this.label16.Name = "label16"; - this.label16.Size = new Size(35, 12); - this.label16.TabIndex = 35; - this.label16.Text = "11.8k"; - this.label17.AutoSize = true; - this.label17.Location = new Point(910, 290); - this.label17.Name = "label17"; - this.label17.Size = new Size(35, 12); - this.label17.TabIndex = 36; - this.label17.Text = "16.7k"; - this.label18.AutoSize = true; - this.label18.Location = new Point(967, 290); - this.label18.Name = "label18"; - this.label18.Size = new Size(23, 12); - this.label18.TabIndex = 37; - this.label18.Text = "20k"; - this.singleButton_Preset.BackColor = SystemColors.Control; - this.singleButton_Preset.ButtonText = "$PRESET"; - this.singleButton_Preset.Location = new Point(171, 25); - this.singleButton_Preset.Name = "singleButton_Preset"; - this.singleButton_Preset.Size = new Size(143, 40); - this.singleButton_Preset.TabIndex = 38; - this.singleButton_Preset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Preset_ButtonClickNotify); - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(878, 25); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(112, 40); - this.singleButton_OK.TabIndex = 40; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.label_dB_Max.AutoSize = true; - this.label_dB_Max.Location = new Point(12, 101); - this.label_dB_Max.Name = "label_dB_Max"; - this.label_dB_Max.Size = new Size(29, 12); - this.label_dB_Max.TabIndex = 41; - this.label_dB_Max.Text = "13dB"; - this.label_dB_Min.AutoSize = true; - this.label_dB_Min.Location = new Point(12, 256); - this.label_dB_Min.Name = "label_dB_Min"; - this.label_dB_Min.Size = new Size(41, 12); - this.label_dB_Min.TabIndex = 42; - this.label_dB_Min.Text = "-120dB"; - this.label_dB_Zero.AutoSize = true; - this.label_dB_Zero.Location = new Point(12, 179); - this.label_dB_Zero.Name = "label_dB_Zero"; - this.label_dB_Zero.Size = new Size(23, 12); - this.label_dB_Zero.TabIndex = 43; - this.label_dB_Zero.Text = "0dB"; - this.checkBox_RealtimeAdjust.AutoSize = true; - this.checkBox_RealtimeAdjust.Location = new Point(386, 37); - this.checkBox_RealtimeAdjust.Name = "checkBox_RealtimeAdjust"; - this.checkBox_RealtimeAdjust.Size = new Size(180, 16); - this.checkBox_RealtimeAdjust.TabIndex = 44; - this.checkBox_RealtimeAdjust.Text = "$EQUALIZER_REALTIME_ADJUST"; - this.checkBox_RealtimeAdjust.UseVisualStyleBackColor = true; - this.checkBox_RealtimeAdjust.CheckedChanged += new EventHandler(this.checkBox_RealtimeAdjust_CheckedChanged); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(1013, 324); - this.Controls.Add((Control) this.checkBox_RealtimeAdjust); - this.Controls.Add((Control) this.label_dB_Zero); - this.Controls.Add((Control) this.label_dB_Min); - this.Controls.Add((Control) this.label_dB_Max); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.singleButton_Preset); - this.Controls.Add((Control) this.label18); - this.Controls.Add((Control) this.label17); - this.Controls.Add((Control) this.label16); - this.Controls.Add((Control) this.label15); - this.Controls.Add((Control) this.label14); - this.Controls.Add((Control) this.label13); - this.Controls.Add((Control) this.label12); - this.Controls.Add((Control) this.label11); - this.Controls.Add((Control) this.label10); - this.Controls.Add((Control) this.label9); - this.Controls.Add((Control) this.label8); - this.Controls.Add((Control) this.label7); - this.Controls.Add((Control) this.label6); - this.Controls.Add((Control) this.label5); - this.Controls.Add((Control) this.label4); - this.Controls.Add((Control) this.label3); - this.Controls.Add((Control) this.label2); - this.Controls.Add((Control) this.label1); - this.Controls.Add((Control) this.vSlider18); - this.Controls.Add((Control) this.vSlider17); - this.Controls.Add((Control) this.vSlider16); - this.Controls.Add((Control) this.vSlider15); - this.Controls.Add((Control) this.vSlider14); - this.Controls.Add((Control) this.vSlider13); - this.Controls.Add((Control) this.vSlider12); - this.Controls.Add((Control) this.vSlider11); - this.Controls.Add((Control) this.vSlider10); - this.Controls.Add((Control) this.vSlider9); - this.Controls.Add((Control) this.vSlider8); - this.Controls.Add((Control) this.vSlider7); - this.Controls.Add((Control) this.vSlider6); - this.Controls.Add((Control) this.vSlider5); - this.Controls.Add((Control) this.vSlider4); - this.Controls.Add((Control) this.vSlider3); - this.Controls.Add((Control) this.vSlider2); - this.Controls.Add((Control) this.vSlider1); - this.Controls.Add((Control) this.onOffSwitch_Equalizer); - this.Controls.Add((Control) this.label_Equalizer_Enable); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.Name = nameof (frmEqualizer); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$EQUALIZER"; - this.ResumeLayout(false); - this.PerformLayout(); - } + private readonly IContainer components; + private Label label_Equalizer_Enable; + private OnOffSwitch onOffSwitch_Equalizer; + private VSlider vSlider1; + private VSlider vSlider2; + private VSlider vSlider3; + private VSlider vSlider4; + private VSlider vSlider5; + private VSlider vSlider6; + private VSlider vSlider7; + private VSlider vSlider8; + private VSlider vSlider9; + private VSlider vSlider10; + private VSlider vSlider11; + private VSlider vSlider12; + private VSlider vSlider13; + private VSlider vSlider14; + private VSlider vSlider15; + private VSlider vSlider16; + private VSlider vSlider17; + private VSlider vSlider18; + private Label label1; + private Label label2; + private Label label3; + private Label label4; + private Label label5; + private Label label6; + private Label label7; + private Label label8; + private Label label9; + private Label label10; + private Label label11; + private Label label12; + private Label label13; + private Label label14; + private Label label15; + private Label label16; + private Label label17; + private Label label18; + private SingleButton singleButton_Preset; + private SingleButton singleButton_OK; + private Label label_dB_Max; + private Label label_dB_Min; + private Label label_dB_Zero; + private CheckBox checkBox_RealtimeAdjust; + private bool m_bEQEnabled; + private readonly float[] m_faEQBands = new float[18]; + private readonly List m_ctlEQBandList = new List(); + private RuntimeUtils.ConfigProxy.ParamOfBaseSystem m_paramBaseSystem; + private RuntimeUtils.ConfigProxy.ParamOfMusicMode m_paramMusicMode; + private RuntimeUtils.ConfigProxy.ParamOfMovieMode m_paramMovieMode; + private RuntimeUtils.ConfigProxy.ParamOfFreestyle m_paramFreestyle; + private RuntimeUtils.ConfigProxy m_cpConfigProxy; - public void SetRealtimeParameters( - RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramBaseSystem, - RuntimeUtils.ConfigProxy._ParamOfMusicMode paramMusicMode, - RuntimeUtils.ConfigProxy._ParamOfMovieMode paramMovieMode, - RuntimeUtils.ConfigProxy._ParamOfFreestyle paramFreestyle, - RuntimeUtils.ConfigProxy cpConfigProxy) - { - this.m_paramBaseSystem = paramBaseSystem; - this.m_paramMusicMode = paramMusicMode; - this.m_paramMovieMode = paramMovieMode; - this.m_paramFreestyle = paramFreestyle; - this.m_cpConfigProxy = cpConfigProxy; - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public frmEqualizer() - { - this.InitializeComponent(); - this.Text = GlobalMessages.EQUALIZER; - this.label_Equalizer_Enable.Text = GlobalMessages.ENABLE; - this.checkBox_RealtimeAdjust.Text = GlobalMessages.EQUALIZER_REALTIME_ADJUST; - this.singleButton_Preset.ButtonText = GlobalMessages.PRESET; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.m_ctlEQBandList.Add(this.vSlider1); - this.m_ctlEQBandList.Add(this.vSlider2); - this.m_ctlEQBandList.Add(this.vSlider3); - this.m_ctlEQBandList.Add(this.vSlider4); - this.m_ctlEQBandList.Add(this.vSlider5); - this.m_ctlEQBandList.Add(this.vSlider6); - this.m_ctlEQBandList.Add(this.vSlider7); - this.m_ctlEQBandList.Add(this.vSlider8); - this.m_ctlEQBandList.Add(this.vSlider9); - this.m_ctlEQBandList.Add(this.vSlider10); - this.m_ctlEQBandList.Add(this.vSlider11); - this.m_ctlEQBandList.Add(this.vSlider12); - this.m_ctlEQBandList.Add(this.vSlider13); - this.m_ctlEQBandList.Add(this.vSlider14); - this.m_ctlEQBandList.Add(this.vSlider15); - this.m_ctlEQBandList.Add(this.vSlider16); - this.m_ctlEQBandList.Add(this.vSlider17); - this.m_ctlEQBandList.Add(this.vSlider18); - for (int index = 0; index < this.m_ctlEQBandList.Count; ++index) - this.m_ctlEQBandList[index].Tag = (object) index.ToString(); - for (int index = 0; index < this.m_faEQBands.Length; ++index) - this.m_faEQBands[index] = 1f; - this.m_bEQEnabled = false; - this.UpdateUI(); - foreach (VSlider ctlEqBand in this.m_ctlEQBandList) - ctlEqBand.PositionChangeNotify += new VSlider.PositionChangeEventDelegate(this.EQBandChanged); - this.onOffSwitch_Equalizer.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.EQSwitchChange); - } + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmEqualizer)); + label_Equalizer_Enable = new Label(); + onOffSwitch_Equalizer = new OnOffSwitch(); + vSlider1 = new VSlider(); + vSlider2 = new VSlider(); + vSlider3 = new VSlider(); + vSlider4 = new VSlider(); + vSlider5 = new VSlider(); + vSlider6 = new VSlider(); + vSlider7 = new VSlider(); + vSlider8 = new VSlider(); + vSlider9 = new VSlider(); + vSlider10 = new VSlider(); + vSlider11 = new VSlider(); + vSlider12 = new VSlider(); + vSlider13 = new VSlider(); + vSlider14 = new VSlider(); + vSlider15 = new VSlider(); + vSlider16 = new VSlider(); + vSlider17 = new VSlider(); + vSlider18 = new VSlider(); + label1 = new Label(); + label2 = new Label(); + label3 = new Label(); + label4 = new Label(); + label5 = new Label(); + label6 = new Label(); + label7 = new Label(); + label8 = new Label(); + label9 = new Label(); + label10 = new Label(); + label11 = new Label(); + label12 = new Label(); + label13 = new Label(); + label14 = new Label(); + label15 = new Label(); + label16 = new Label(); + label17 = new Label(); + label18 = new Label(); + singleButton_Preset = new SingleButton(); + singleButton_OK = new SingleButton(); + label_dB_Max = new Label(); + label_dB_Min = new Label(); + label_dB_Zero = new Label(); + checkBox_RealtimeAdjust = new CheckBox(); + SuspendLayout(); + label_Equalizer_Enable.AutoSize = true; + label_Equalizer_Enable.Location = new Point(24, 22); + label_Equalizer_Enable.Name = "label_Equalizer_Enable"; + label_Equalizer_Enable.Size = new Size(47, 12); + label_Equalizer_Enable.TabIndex = 0; + label_Equalizer_Enable.Text = "$ENABLE"; + onOffSwitch_Equalizer.BackColor = Color.Transparent; + onOffSwitch_Equalizer.Location = new Point(24, 37); + onOffSwitch_Equalizer.Name = "onOffSwitch_Equalizer"; + onOffSwitch_Equalizer.Size = new Size(107, 28); + onOffSwitch_Equalizer.SwitchedOn = false; + onOffSwitch_Equalizer.TabIndex = 1; + vSlider1.BackColor = SystemColors.Control; + vSlider1.Location = new Point(53, 83); + vSlider1.MoveDelta = 1U; + vSlider1.Name = "vSlider1"; + vSlider1.Position = 50U; + vSlider1.Size = new Size(47, 204); + vSlider1.TabIndex = 2; + vSlider2.BackColor = SystemColors.Control; + vSlider2.Location = new Point(106, 83); + vSlider2.MoveDelta = 1U; + vSlider2.Name = "vSlider2"; + vSlider2.Position = 50U; + vSlider2.Size = new Size(47, 204); + vSlider2.TabIndex = 3; + vSlider3.BackColor = SystemColors.Control; + vSlider3.Location = new Point(159, 83); + vSlider3.MoveDelta = 1U; + vSlider3.Name = "vSlider3"; + vSlider3.Position = 50U; + vSlider3.Size = new Size(47, 204); + vSlider3.TabIndex = 4; + vSlider4.BackColor = SystemColors.Control; + vSlider4.Location = new Point(212, 83); + vSlider4.MoveDelta = 1U; + vSlider4.Name = "vSlider4"; + vSlider4.Position = 50U; + vSlider4.Size = new Size(47, 204); + vSlider4.TabIndex = 5; + vSlider5.BackColor = SystemColors.Control; + vSlider5.Location = new Point(265, 83); + vSlider5.MoveDelta = 1U; + vSlider5.Name = "vSlider5"; + vSlider5.Position = 50U; + vSlider5.Size = new Size(47, 204); + vSlider5.TabIndex = 6; + vSlider6.BackColor = SystemColors.Control; + vSlider6.Location = new Point(318, 83); + vSlider6.MoveDelta = 1U; + vSlider6.Name = "vSlider6"; + vSlider6.Position = 50U; + vSlider6.Size = new Size(47, 204); + vSlider6.TabIndex = 7; + vSlider7.BackColor = SystemColors.Control; + vSlider7.Location = new Point(371, 83); + vSlider7.MoveDelta = 1U; + vSlider7.Name = "vSlider7"; + vSlider7.Position = 50U; + vSlider7.Size = new Size(47, 204); + vSlider7.TabIndex = 8; + vSlider8.BackColor = SystemColors.Control; + vSlider8.Location = new Point(424, 83); + vSlider8.MoveDelta = 1U; + vSlider8.Name = "vSlider8"; + vSlider8.Position = 50U; + vSlider8.Size = new Size(47, 204); + vSlider8.TabIndex = 9; + vSlider9.BackColor = SystemColors.Control; + vSlider9.Location = new Point(477, 83); + vSlider9.MoveDelta = 1U; + vSlider9.Name = "vSlider9"; + vSlider9.Position = 50U; + vSlider9.Size = new Size(47, 204); + vSlider9.TabIndex = 10; + vSlider10.BackColor = SystemColors.Control; + vSlider10.Location = new Point(530, 83); + vSlider10.MoveDelta = 1U; + vSlider10.Name = "vSlider10"; + vSlider10.Position = 50U; + vSlider10.Size = new Size(47, 204); + vSlider10.TabIndex = 11; + vSlider11.BackColor = SystemColors.Control; + vSlider11.Location = new Point(583, 83); + vSlider11.MoveDelta = 1U; + vSlider11.Name = "vSlider11"; + vSlider11.Position = 50U; + vSlider11.Size = new Size(47, 204); + vSlider11.TabIndex = 12; + vSlider12.BackColor = SystemColors.Control; + vSlider12.Location = new Point(636, 83); + vSlider12.MoveDelta = 1U; + vSlider12.Name = "vSlider12"; + vSlider12.Position = 50U; + vSlider12.Size = new Size(47, 204); + vSlider12.TabIndex = 13; + vSlider13.BackColor = SystemColors.Control; + vSlider13.Location = new Point(689, 83); + vSlider13.MoveDelta = 1U; + vSlider13.Name = "vSlider13"; + vSlider13.Position = 50U; + vSlider13.Size = new Size(47, 204); + vSlider13.TabIndex = 14; + vSlider14.BackColor = SystemColors.Control; + vSlider14.Location = new Point(742, 83); + vSlider14.MoveDelta = 1U; + vSlider14.Name = "vSlider14"; + vSlider14.Position = 50U; + vSlider14.Size = new Size(47, 204); + vSlider14.TabIndex = 15; + vSlider15.BackColor = SystemColors.Control; + vSlider15.Location = new Point(795, 83); + vSlider15.MoveDelta = 1U; + vSlider15.Name = "vSlider15"; + vSlider15.Position = 50U; + vSlider15.Size = new Size(47, 204); + vSlider15.TabIndex = 16; + vSlider16.BackColor = SystemColors.Control; + vSlider16.Location = new Point(848, 83); + vSlider16.MoveDelta = 1U; + vSlider16.Name = "vSlider16"; + vSlider16.Position = 50U; + vSlider16.Size = new Size(47, 204); + vSlider16.TabIndex = 17; + vSlider17.BackColor = SystemColors.Control; + vSlider17.Location = new Point(901, 83); + vSlider17.MoveDelta = 1U; + vSlider17.Name = "vSlider17"; + vSlider17.Position = 50U; + vSlider17.Size = new Size(47, 204); + vSlider17.TabIndex = 18; + vSlider18.BackColor = SystemColors.Control; + vSlider18.Location = new Point(954, 83); + vSlider18.MoveDelta = 1U; + vSlider18.Name = "vSlider18"; + vSlider18.Position = 50U; + vSlider18.Size = new Size(47, 204); + vSlider18.TabIndex = 19; + label1.AutoSize = true; + label1.Location = new Point(69, 290); + label1.Name = "label1"; + label1.Size = new Size(17, 12); + label1.TabIndex = 20; + label1.Text = "65"; + label2.AutoSize = true; + label2.Location = new Point(121, 290); + label2.Name = "label2"; + label2.Size = new Size(17, 12); + label2.TabIndex = 21; + label2.Text = "93"; + label3.AutoSize = true; + label3.Location = new Point(173, 290); + label3.Name = "label3"; + label3.Size = new Size(23, 12); + label3.TabIndex = 22; + label3.Text = "131"; + label4.AutoSize = true; + label4.Location = new Point(225, 290); + label4.Name = "label4"; + label4.Size = new Size(23, 12); + label4.TabIndex = 23; + label4.Text = "185"; + label5.AutoSize = true; + label5.Location = new Point(279, 290); + label5.Name = "label5"; + label5.Size = new Size(23, 12); + label5.TabIndex = 24; + label5.Text = "262"; + label6.AutoSize = true; + label6.Location = new Point(332, 290); + label6.Name = "label6"; + label6.Size = new Size(23, 12); + label6.TabIndex = 25; + label6.Text = "370"; + label7.AutoSize = true; + label7.Location = new Point(384, 290); + label7.Name = "label7"; + label7.Size = new Size(23, 12); + label7.TabIndex = 26; + label7.Text = "523"; + label8.AutoSize = true; + label8.Location = new Point(437, 290); + label8.Name = "label8"; + label8.Size = new Size(23, 12); + label8.TabIndex = 27; + label8.Text = "740"; + label9.AutoSize = true; + label9.Location = new Point(487, 290); + label9.Name = "label9"; + label9.Size = new Size(29, 12); + label9.TabIndex = 28; + label9.Text = "1.0k"; + label10.AutoSize = true; + label10.Location = new Point(540, 290); + label10.Name = "label10"; + label10.Size = new Size(29, 12); + label10.TabIndex = 29; + label10.Text = "1.5k"; + label11.AutoSize = true; + label11.Location = new Point(593, 290); + label11.Name = "label11"; + label11.Size = new Size(29, 12); + label11.TabIndex = 30; + label11.Text = "2.1k"; + label12.AutoSize = true; + label12.Location = new Point(646, 290); + label12.Name = "label12"; + label12.Size = new Size(29, 12); + label12.TabIndex = 31; + label12.Text = "3.0k"; + label13.AutoSize = true; + label13.Location = new Point(699, 290); + label13.Name = "label13"; + label13.Size = new Size(29, 12); + label13.TabIndex = 32; + label13.Text = "4.2k"; + label14.AutoSize = true; + label14.Location = new Point(752, 290); + label14.Name = "label14"; + label14.Size = new Size(29, 12); + label14.TabIndex = 33; + label14.Text = "6.0k"; + label15.AutoSize = true; + label15.Location = new Point(806, 290); + label15.Name = "label15"; + label15.Size = new Size(29, 12); + label15.TabIndex = 34; + label15.Text = "8.4k"; + label16.AutoSize = true; + label16.Location = new Point(857, 290); + label16.Name = "label16"; + label16.Size = new Size(35, 12); + label16.TabIndex = 35; + label16.Text = "11.8k"; + label17.AutoSize = true; + label17.Location = new Point(910, 290); + label17.Name = "label17"; + label17.Size = new Size(35, 12); + label17.TabIndex = 36; + label17.Text = "16.7k"; + label18.AutoSize = true; + label18.Location = new Point(967, 290); + label18.Name = "label18"; + label18.Size = new Size(23, 12); + label18.TabIndex = 37; + label18.Text = "20k"; + singleButton_Preset.BackColor = SystemColors.Control; + singleButton_Preset.ButtonText = "$PRESET"; + singleButton_Preset.Location = new Point(171, 25); + singleButton_Preset.Name = "singleButton_Preset"; + singleButton_Preset.Size = new Size(143, 40); + singleButton_Preset.TabIndex = 38; + singleButton_Preset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Preset_ButtonClickNotify); + singleButton_OK.BackColor = SystemColors.Control; + singleButton_OK.ButtonText = "$OK"; + singleButton_OK.Location = new Point(878, 25); + singleButton_OK.Name = "singleButton_OK"; + singleButton_OK.Size = new Size(112, 40); + singleButton_OK.TabIndex = 40; + singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + label_dB_Max.AutoSize = true; + label_dB_Max.Location = new Point(12, 101); + label_dB_Max.Name = "label_dB_Max"; + label_dB_Max.Size = new Size(29, 12); + label_dB_Max.TabIndex = 41; + label_dB_Max.Text = "13dB"; + label_dB_Min.AutoSize = true; + label_dB_Min.Location = new Point(12, 256); + label_dB_Min.Name = "label_dB_Min"; + label_dB_Min.Size = new Size(41, 12); + label_dB_Min.TabIndex = 42; + label_dB_Min.Text = "-120dB"; + label_dB_Zero.AutoSize = true; + label_dB_Zero.Location = new Point(12, 179); + label_dB_Zero.Name = "label_dB_Zero"; + label_dB_Zero.Size = new Size(23, 12); + label_dB_Zero.TabIndex = 43; + label_dB_Zero.Text = "0dB"; + checkBox_RealtimeAdjust.AutoSize = true; + checkBox_RealtimeAdjust.Location = new Point(386, 37); + checkBox_RealtimeAdjust.Name = "checkBox_RealtimeAdjust"; + checkBox_RealtimeAdjust.Size = new Size(180, 16); + checkBox_RealtimeAdjust.TabIndex = 44; + checkBox_RealtimeAdjust.Text = "$EQUALIZER_REALTIME_ADJUST"; + checkBox_RealtimeAdjust.UseVisualStyleBackColor = true; + checkBox_RealtimeAdjust.CheckedChanged += new EventHandler(CheckBox_RealtimeAdjust_CheckedChanged); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1013, 324); + Controls.Add(checkBox_RealtimeAdjust); + Controls.Add(label_dB_Zero); + Controls.Add(label_dB_Min); + Controls.Add(label_dB_Max); + Controls.Add(singleButton_OK); + Controls.Add(singleButton_Preset); + Controls.Add(label18); + Controls.Add(label17); + Controls.Add(label16); + Controls.Add(label15); + Controls.Add(label14); + Controls.Add(label13); + Controls.Add(label12); + Controls.Add(label11); + Controls.Add(label10); + Controls.Add(label9); + Controls.Add(label8); + Controls.Add(label7); + Controls.Add(label6); + Controls.Add(label5); + Controls.Add(label4); + Controls.Add(label3); + Controls.Add(label2); + Controls.Add(label1); + Controls.Add(vSlider18); + Controls.Add(vSlider17); + Controls.Add(vSlider16); + Controls.Add(vSlider15); + Controls.Add(vSlider14); + Controls.Add(vSlider13); + Controls.Add(vSlider12); + Controls.Add(vSlider11); + Controls.Add(vSlider10); + Controls.Add(vSlider9); + Controls.Add(vSlider8); + Controls.Add(vSlider7); + Controls.Add(vSlider6); + Controls.Add(vSlider5); + Controls.Add(vSlider4); + Controls.Add(vSlider3); + Controls.Add(vSlider2); + Controls.Add(vSlider1); + Controls.Add(onOffSwitch_Equalizer); + Controls.Add(label_Equalizer_Enable); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + Name = nameof(FrmEqualizer); + StartPosition = FormStartPosition.CenterScreen; + Text = "$EQUALIZER"; + ResumeLayout(false); + PerformLayout(); + } - private void UpdateUI() - { - this.onOffSwitch_Equalizer.SwitchedOn = this.m_bEQEnabled; - for (int index = 0; index < this.m_faEQBands.Length; ++index) - { - float faEqBand = this.m_faEQBands[index]; - uint num = (uint) (((double) faEqBand > 1.0 ? (double) ((faEqBand - 1f) / 4f * 0.5f + 0.5f) : (double) (faEqBand * 0.5f)) * 100.0); - if (num > 100U) - num = 100U; - this.m_ctlEQBandList[index].Position = num; - } - } + public void SetRealtimeParameters( + RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramBaseSystem, + RuntimeUtils.ConfigProxy.ParamOfMusicMode paramMusicMode, + RuntimeUtils.ConfigProxy.ParamOfMovieMode paramMovieMode, + RuntimeUtils.ConfigProxy.ParamOfFreestyle paramFreestyle, + RuntimeUtils.ConfigProxy cpConfigProxy) + { + m_paramBaseSystem = paramBaseSystem; + m_paramMusicMode = paramMusicMode; + m_paramMovieMode = paramMovieMode; + m_paramFreestyle = paramFreestyle; + m_cpConfigProxy = cpConfigProxy; + } - private void EQBandChanged(float fPercent, VSlider objSender) - { - if (objSender == null || objSender.Tag == null || !(objSender.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result >= this.m_faEQBands.Length) - return; - float num = (double) fPercent >= 0.5 ? (float) (((double) fPercent - 0.5) / 0.5 * 4.0 + 1.0) : fPercent / 0.5f; - this.m_faEQBands[result] = num; - if (!this.checkBox_RealtimeAdjust.Checked) - return; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - { - this.m_paramMusicMode.m_rpEqualizerBands[result] = num; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode == 1U) - { - this.m_paramMovieMode.m_rpEqualizerBands[result] = num; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode != 2U) - return; - this.m_paramFreestyle.m_rpEqualizerBands[result] = num; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + public FrmEqualizer() + { + InitializeComponent(); + Text = GlobalMessages.EQUALIZER; + label_Equalizer_Enable.Text = GlobalMessages.ENABLE; + checkBox_RealtimeAdjust.Text = GlobalMessages.EQUALIZER_REALTIME_ADJUST; + singleButton_Preset.ButtonText = GlobalMessages.PRESET; + singleButton_OK.ButtonText = GlobalMessages.OK; + m_ctlEQBandList.Add(vSlider1); + m_ctlEQBandList.Add(vSlider2); + m_ctlEQBandList.Add(vSlider3); + m_ctlEQBandList.Add(vSlider4); + m_ctlEQBandList.Add(vSlider5); + m_ctlEQBandList.Add(vSlider6); + m_ctlEQBandList.Add(vSlider7); + m_ctlEQBandList.Add(vSlider8); + m_ctlEQBandList.Add(vSlider9); + m_ctlEQBandList.Add(vSlider10); + m_ctlEQBandList.Add(vSlider11); + m_ctlEQBandList.Add(vSlider12); + m_ctlEQBandList.Add(vSlider13); + m_ctlEQBandList.Add(vSlider14); + m_ctlEQBandList.Add(vSlider15); + m_ctlEQBandList.Add(vSlider16); + m_ctlEQBandList.Add(vSlider17); + m_ctlEQBandList.Add(vSlider18); + for (int index = 0; index < m_ctlEQBandList.Count; ++index) + m_ctlEQBandList[index].Tag = index.ToString(); + for (int index = 0; index < m_faEQBands.Length; ++index) + m_faEQBands[index] = 1f; + m_bEQEnabled = false; + UpdateUI(); + foreach (VSlider ctlEqBand in m_ctlEQBandList) + ctlEqBand.PositionChangeNotify += new VSlider.PositionChangeEventDelegate(EQBandChanged); + onOffSwitch_Equalizer.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(EQSwitchChange); + } - private void EQSwitchChange(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_bEQEnabled = bSwitchedOn; - if (!this.checkBox_RealtimeAdjust.Checked) - return; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - { - this.m_paramMusicMode.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode == 1U) - { - this.m_paramMovieMode.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode != 2U) - return; - this.m_paramFreestyle.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void UpdateUI() + { + onOffSwitch_Equalizer.SwitchedOn = m_bEQEnabled; + for (int index = 0; index < m_faEQBands.Length; ++index) + { + float faEqBand = m_faEQBands[index]; + uint num = (uint)(((double)faEqBand > 1.0 ? (double)((faEqBand - 1f) / 4f * 0.5f + 0.5f) : (double)(faEqBand * 0.5f)) * 100.0); + if (num > 100U) + num = 100U; + m_ctlEQBandList[index].Position = num; + } + } - public void SetParameters(float[] faEQBands, bool bEQEnabled) - { - if (faEQBands == null || faEQBands.Length != this.m_faEQBands.Length) - return; - Array.Copy((Array) faEQBands, (Array) this.m_faEQBands, this.m_faEQBands.Length); - this.m_bEQEnabled = bEQEnabled; - this.UpdateUI(); - } + private void EQBandChanged(float fPercent, VSlider objSender) + { + if (objSender == null || objSender.Tag == null || !(objSender.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result >= m_faEQBands.Length) + return; + float num = (double)fPercent >= 0.5 ? (float)(((double)fPercent - 0.5) / 0.5 * 4.0 + 1.0) : fPercent / 0.5f; + m_faEQBands[result] = num; + if (!checkBox_RealtimeAdjust.Checked) + return; + if (m_paramBaseSystem.m_nEffectMode == 0U) + { + m_paramMusicMode.m_rpEqualizerBands[result] = num; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode == 1U) + { + m_paramMovieMode.m_rpEqualizerBands[result] = num; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode != 2U) + return; + m_paramFreestyle.m_rpEqualizerBands[result] = num; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - public float[] GetParameter() => this.m_faEQBands; + private void EQSwitchChange(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bEQEnabled = bSwitchedOn; + if (!checkBox_RealtimeAdjust.Checked) + return; + if (m_paramBaseSystem.m_nEffectMode == 0U) + { + m_paramMusicMode.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode == 1U) + { + m_paramMovieMode.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode != 2U) + return; + m_paramFreestyle.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - public bool GetEQEnabled() => this.m_bEQEnabled; + public void SetParameters(float[] faEQBands, bool bEQEnabled) + { + if (faEQBands == null || faEQBands.Length != m_faEQBands.Length) + return; + Array.Copy(faEQBands, m_faEQBands, m_faEQBands.Length); + m_bEQEnabled = bEQEnabled; + UpdateUI(); + } - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + public float[] GetParameter() + { + return m_faEQBands; + } - private void singleButton_Preset_ButtonClickNotify(SingleButton objSender) - { - frmEQPreset frmEqPreset = new frmEQPreset(); - frmEqPreset.SetPreset(this.m_faEQBands); - if (frmEqPreset.ShowDialog() == DialogResult.Cancel) - return; - float[] preset = frmEqPreset.GetPreset(); - if (preset == null || preset.Length != this.m_faEQBands.Length) - return; - Array.Copy((Array) preset, (Array) this.m_faEQBands, this.m_faEQBands.Length); - if (this.checkBox_RealtimeAdjust.Checked) - { - if (this.m_paramBaseSystem.m_nEffectMode == 0U) + public bool GetEQEnabled() { - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramMusicMode.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); + return m_bEQEnabled; } - if (this.m_paramBaseSystem.m_nEffectMode == 1U) + + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) { - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramMovieMode.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); + DialogResult = DialogResult.OK; } - if (this.m_paramBaseSystem.m_nEffectMode == 2U) + + private void SingleButton_Preset_ButtonClickNotify(SingleButton objSender) { - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramFreestyle.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); + FrmEQPreset frmEqPreset = new FrmEQPreset(); + frmEqPreset.SetPreset(m_faEQBands); + if (frmEqPreset.ShowDialog() == DialogResult.Cancel) + return; + float[] preset = frmEqPreset.GetPreset(); + if (preset == null || preset.Length != m_faEQBands.Length) + return; + Array.Copy(preset, m_faEQBands, m_faEQBands.Length); + if (checkBox_RealtimeAdjust.Checked) + { + if (m_paramBaseSystem.m_nEffectMode == 0U) + { + Array.Copy(m_faEQBands, m_paramMusicMode.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode == 1U) + { + Array.Copy(m_faEQBands, m_paramMovieMode.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode == 2U) + { + Array.Copy(m_faEQBands, m_paramFreestyle.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } + } + UpdateUI(); } - } - this.UpdateUI(); - } - private void checkBox_RealtimeAdjust_CheckedChanged(object sender, EventArgs e) - { - if (!this.checkBox_RealtimeAdjust.Checked) - return; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - { - this.m_paramMusicMode.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramMusicMode.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode == 1U) - { - this.m_paramMovieMode.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramMovieMode.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } - if (this.m_paramBaseSystem.m_nEffectMode != 2U) - return; - this.m_paramFreestyle.m_bEqualizerEnabled = !this.m_bEQEnabled ? 0 : 1; - Array.Copy((Array) this.m_faEQBands, (Array) this.m_paramFreestyle.m_rpEqualizerBands, this.m_faEQBands.Length); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); + private void CheckBox_RealtimeAdjust_CheckedChanged(object sender, EventArgs e) + { + if (!checkBox_RealtimeAdjust.Checked) + return; + if (m_paramBaseSystem.m_nEffectMode == 0U) + { + m_paramMusicMode.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + Array.Copy(m_faEQBands, m_paramMusicMode.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode == 1U) + { + m_paramMovieMode.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + Array.Copy(m_faEQBands, m_paramMovieMode.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } + if (m_paramBaseSystem.m_nEffectMode != 2U) + return; + m_paramFreestyle.m_bEqualizerEnabled = !m_bEQEnabled ? 0 : 1; + Array.Copy(m_faEQBands, m_paramFreestyle.m_rpEqualizerBands, m_faEQBands.Length); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } } - } } diff --git a/frmLatency.cs b/frmLatency.cs index c936e24..734eb9b 100644 --- a/frmLatency.cs +++ b/frmLatency.cs @@ -5,212 +5,227 @@ namespace ViPER4WindowsBin { - public class frmLatency : Form - { - private IContainer components; - private Label label_CurrentLatency; - private Label label_DesiredLatency; - private ButtonBox buttonBox_Latency; - private Label label_LowLatencyNote; - private SingleButton singleButton_OK; - private SingleButton singleButton_Cancel; - private int m_iShortLen = 4096; - private int m_iMiddleLen; - private int m_iLongLen; - - protected override void Dispose(bool disposing) + public class FrmLatency : Form { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private readonly IContainer components; + private Label label_CurrentLatency; + private Label label_DesiredLatency; + private ButtonBox buttonBox_Latency; + private Label label_LowLatencyNote; + private SingleButton singleButton_OK; + private SingleButton singleButton_Cancel; + private int m_iShortLen = 4096; + private int m_iMiddleLen; + private int m_iLongLen; - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmLatency)); - this.label_CurrentLatency = new Label(); - this.label_DesiredLatency = new Label(); - this.buttonBox_Latency = new ButtonBox(); - this.label_LowLatencyNote = new Label(); - this.singleButton_OK = new SingleButton(); - this.singleButton_Cancel = new SingleButton(); - this.SuspendLayout(); - this.label_CurrentLatency.AutoSize = true; - this.label_CurrentLatency.Location = new Point(12, 9); - this.label_CurrentLatency.Name = "label_CurrentLatency"; - this.label_CurrentLatency.Size = new Size(137, 12); - this.label_CurrentLatency.TabIndex = 0; - this.label_CurrentLatency.Text = "$CURRENT_LATENCY : 0ms"; - this.label_DesiredLatency.AutoSize = true; - this.label_DesiredLatency.Location = new Point(12, 41); - this.label_DesiredLatency.Name = "label_DesiredLatency"; - this.label_DesiredLatency.Size = new Size(101, 12); - this.label_DesiredLatency.TabIndex = 1; - this.label_DesiredLatency.Text = "$DESIRED_LATENCY"; - this.buttonBox_Latency.BackColor = SystemColors.Control; - this.buttonBox_Latency.Location = new Point(12, 74); - this.buttonBox_Latency.Name = "buttonBox_Latency"; - this.buttonBox_Latency.Size = new Size(137, 190); - this.buttonBox_Latency.TabIndex = 2; - this.buttonBox_Latency.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.buttonBox_Latency_ItemSelectedNotify); - this.label_LowLatencyNote.AutoSize = true; - this.label_LowLatencyNote.ForeColor = Color.Red; - this.label_LowLatencyNote.Location = new Point(12, 59); - this.label_LowLatencyNote.Name = "label_LowLatencyNote"; - this.label_LowLatencyNote.Size = new Size(107, 12); - this.label_LowLatencyNote.TabIndex = 3; - this.label_LowLatencyNote.Text = "$LOW_LATENCY_NOTE"; - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(155, 182); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(88, 38); - this.singleButton_OK.TabIndex = 4; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(155, 226); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(88, 38); - this.singleButton_Cancel.TabIndex = 5; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(254, 279); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.label_LowLatencyNote); - this.Controls.Add((Control) this.buttonBox_Latency); - this.Controls.Add((Control) this.label_DesiredLatency); - this.Controls.Add((Control) this.label_CurrentLatency); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmLatency); - this.ShowInTaskbar = false; - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$LATENCY_SETTING"; - this.ResumeLayout(false); - this.PerformLayout(); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public int ShortFilterLen - { - get => this.m_iShortLen; - set - { - this.m_iShortLen = value; - this.UpdateUI(); - } - } + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmLatency)); + label_CurrentLatency = new Label(); + label_DesiredLatency = new Label(); + buttonBox_Latency = new ButtonBox(); + label_LowLatencyNote = new Label(); + singleButton_OK = new SingleButton(); + singleButton_Cancel = new SingleButton(); + SuspendLayout(); + label_CurrentLatency.AutoSize = true; + label_CurrentLatency.Location = new Point(12, 9); + label_CurrentLatency.Name = "label_CurrentLatency"; + label_CurrentLatency.Size = new Size(137, 12); + label_CurrentLatency.TabIndex = 0; + label_CurrentLatency.Text = "$CURRENT_LATENCY : 0ms"; + label_DesiredLatency.AutoSize = true; + label_DesiredLatency.Location = new Point(12, 41); + label_DesiredLatency.Name = "label_DesiredLatency"; + label_DesiredLatency.Size = new Size(101, 12); + label_DesiredLatency.TabIndex = 1; + label_DesiredLatency.Text = "$DESIRED_LATENCY"; + buttonBox_Latency.BackColor = SystemColors.Control; + buttonBox_Latency.Location = new Point(12, 74); + buttonBox_Latency.Name = "buttonBox_Latency"; + buttonBox_Latency.Size = new Size(137, 190); + buttonBox_Latency.TabIndex = 2; + buttonBox_Latency.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(ButtonBox_Latency_ItemSelectedNotify); + label_LowLatencyNote.AutoSize = true; + label_LowLatencyNote.ForeColor = Color.Red; + label_LowLatencyNote.Location = new Point(12, 59); + label_LowLatencyNote.Name = "label_LowLatencyNote"; + label_LowLatencyNote.Size = new Size(107, 12); + label_LowLatencyNote.TabIndex = 3; + label_LowLatencyNote.Text = "$LOW_LATENCY_NOTE"; + singleButton_OK.BackColor = SystemColors.Control; + singleButton_OK.ButtonText = "$OK"; + singleButton_OK.Location = new Point(155, 182); + singleButton_OK.Name = "singleButton_OK"; + singleButton_OK.Size = new Size(88, 38); + singleButton_OK.TabIndex = 4; + singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + singleButton_Cancel.BackColor = SystemColors.Control; + singleButton_Cancel.ButtonText = "$CANCEL"; + singleButton_Cancel.Location = new Point(155, 226); + singleButton_Cancel.Name = "singleButton_Cancel"; + singleButton_Cancel.Size = new Size(88, 38); + singleButton_Cancel.TabIndex = 5; + singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(254, 279); + Controls.Add(singleButton_Cancel); + Controls.Add(singleButton_OK); + Controls.Add(label_LowLatencyNote); + Controls.Add(buttonBox_Latency); + Controls.Add(label_DesiredLatency); + Controls.Add(label_CurrentLatency); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmLatency); + ShowInTaskbar = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "$LATENCY_SETTING"; + ResumeLayout(false); + PerformLayout(); + } - public int MiddleFilterLen - { - get => this.m_iMiddleLen; - set - { - this.m_iMiddleLen = value; - this.UpdateUI(); - } - } + public int ShortFilterLen + { + get => m_iShortLen; + set + { + m_iShortLen = value; + UpdateUI(); + } + } - public int LongFilterLen - { - get => this.m_iLongLen; - set - { - this.m_iLongLen = value; - this.UpdateUI(); - } - } + public int MiddleFilterLen + { + get => m_iMiddleLen; + set + { + m_iMiddleLen = value; + UpdateUI(); + } + } - public frmLatency() - { - this.InitializeComponent(); - this.Text = GlobalMessages.LATENCY_SETTING; - this.label_CurrentLatency.Text = GlobalMessages.CURRENT_LATENCY + " : " + (this.GetLatency() * 1000f).ToString("F04") + " ms"; - this.label_DesiredLatency.Text = GlobalMessages.DESIRED_LATENCY; - this.label_LowLatencyNote.Text = GlobalMessages.LOW_LATENCY_NOTE; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(16384) * 1000f).ToString("F04") + " ms", (object) "16384")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(8192) * 1000f).ToString("F04") + " ms", (object) "8192")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(4096) * 1000f).ToString("F04") + " ms", (object) "4096")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(2048) * 1000f).ToString("F04") + " ms", (object) "2048")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(1024) * 1000f).ToString("F04") + " ms", (object) "1024")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(512) * 1000f).ToString("F04") + " ms", (object) "512")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(256) * 1000f).ToString("F04") + " ms", (object) "256")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(128) * 1000f).ToString("F04") + " ms", (object) "128")); - this.buttonBox_Latency.AddItem(new ButtonBox.Item((this.GetLatency(64) * 1000f).ToString("F04") + " ms", (object) "64")); - } + public int LongFilterLen + { + get => m_iLongLen; + set + { + m_iLongLen = value; + UpdateUI(); + } + } - private float GetLatency() => (float) this.m_iShortLen / 44100f; + public FrmLatency() + { + InitializeComponent(); + Text = GlobalMessages.LATENCY_SETTING; + label_CurrentLatency.Text = GlobalMessages.CURRENT_LATENCY + " : " + (GetLatency() * 1000f).ToString("F04") + " ms"; + label_DesiredLatency.Text = GlobalMessages.DESIRED_LATENCY; + label_LowLatencyNote.Text = GlobalMessages.LOW_LATENCY_NOTE; + singleButton_OK.ButtonText = GlobalMessages.OK; + singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(16384) * 1000f).ToString("F04") + " ms", "16384")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(8192) * 1000f).ToString("F04") + " ms", "8192")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(4096) * 1000f).ToString("F04") + " ms", "4096")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(2048) * 1000f).ToString("F04") + " ms", "2048")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(1024) * 1000f).ToString("F04") + " ms", "1024")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(512) * 1000f).ToString("F04") + " ms", "512")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(256) * 1000f).ToString("F04") + " ms", "256")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(128) * 1000f).ToString("F04") + " ms", "128")); + buttonBox_Latency.AddItem(new ButtonBox.Item((GetLatency(64) * 1000f).ToString("F04") + " ms", "64")); + } - private float GetLatency(int nLength) => (float) nLength / 44100f; + private float GetLatency() + { + return m_iShortLen / 44100f; + } - private void UpdateUI() => this.label_CurrentLatency.Text = GlobalMessages.CURRENT_LATENCY + " : " + (this.GetLatency() * 1000f).ToString("F04") + " ms"; + private float GetLatency(int nLength) + { + return nLength / 44100f; + } - private void buttonBox_Latency_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag) || tag == "") - return; - switch (tag) - { - case "64": - this.m_iShortLen = 64; - this.m_iMiddleLen = 2048; - this.m_iLongLen = 16384; - break; - case "128": - this.m_iShortLen = 128; - this.m_iMiddleLen = 2048; - this.m_iLongLen = 8192; - break; - case "256": - this.m_iShortLen = 256; - this.m_iMiddleLen = 8192; - this.m_iLongLen = 0; - break; - case "512": - this.m_iShortLen = 512; - this.m_iMiddleLen = 4096; - this.m_iLongLen = 0; - break; - case "1024": - this.m_iShortLen = 1024; - this.m_iMiddleLen = 2048; - this.m_iLongLen = 0; - break; - case "2048": - this.m_iShortLen = 2048; - this.m_iMiddleLen = 0; - this.m_iLongLen = 0; - break; - case "4096": - this.m_iShortLen = 4096; - this.m_iMiddleLen = 0; - this.m_iLongLen = 0; - break; - case "8192": - this.m_iShortLen = 8192; - this.m_iMiddleLen = 0; - this.m_iLongLen = 0; - break; - case "16384": - this.m_iShortLen = 16384; - this.m_iMiddleLen = 0; - this.m_iLongLen = 0; - break; - } - } + private void UpdateUI() + { + label_CurrentLatency.Text = GlobalMessages.CURRENT_LATENCY + " : " + (GetLatency() * 1000f).ToString("F04") + " ms"; + } - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void ButtonBox_Latency_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag) || tag == "") + return; + switch (tag) + { + case "64": + m_iShortLen = 64; + m_iMiddleLen = 2048; + m_iLongLen = 16384; + break; + case "128": + m_iShortLen = 128; + m_iMiddleLen = 2048; + m_iLongLen = 8192; + break; + case "256": + m_iShortLen = 256; + m_iMiddleLen = 8192; + m_iLongLen = 0; + break; + case "512": + m_iShortLen = 512; + m_iMiddleLen = 4096; + m_iLongLen = 0; + break; + case "1024": + m_iShortLen = 1024; + m_iMiddleLen = 2048; + m_iLongLen = 0; + break; + case "2048": + m_iShortLen = 2048; + m_iMiddleLen = 0; + m_iLongLen = 0; + break; + case "4096": + m_iShortLen = 4096; + m_iMiddleLen = 0; + m_iLongLen = 0; + break; + case "8192": + m_iShortLen = 8192; + m_iMiddleLen = 0; + m_iLongLen = 0; + break; + case "16384": + m_iShortLen = 16384; + m_iMiddleLen = 0; + m_iLongLen = 0; + break; + } + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; - } + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } + + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } + } } diff --git a/frmMain.cs b/frmMain.cs index 0551651..a3fddf9 100644 --- a/frmMain.cs +++ b/frmMain.cs @@ -11,4064 +11,4118 @@ namespace ViPER4WindowsBin { - public class frmMain : Form - { - private static string m_szLanguagePath = ""; - private static string m_szLanguageFile = ""; - private static string m_szLanguageName = ""; - private readonly string m_szLocalPresetFileName = "LocalPreset.bin"; - private readonly string m_szImpulseResponsePath = "ImpulseResponse"; - private readonly string m_szUserPresetPath = "Presets"; - private bool m_bArgvStartupToMinimized; - private string m_szLocalPreset = ""; - private string m_szIRSPath = ""; - private string m_szPresetsPath = ""; - private bool m_bCloseToTray; - private RuntimeUtils.ConfigProxy._ParamOfBaseSystem m_paramBaseSystem = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - private RuntimeUtils.ConfigProxy._ParamOfMusicMode m_paramMusicMode = new RuntimeUtils.ConfigProxy._ParamOfMusicMode(); - private RuntimeUtils.ConfigProxy._ParamOfMovieMode m_paramMovieMode = new RuntimeUtils.ConfigProxy._ParamOfMovieMode(); - private RuntimeUtils.ConfigProxy._ParamOfFreestyle m_paramFreestyle = new RuntimeUtils.ConfigProxy._ParamOfFreestyle(); - private RuntimeUtils.ConfigProxy m_cpConfigProxy; - private List m_lstTrayMenuPreset = new List(); - private IContainer components; - private PictureBox pictureBox_Logo; - private Label label_MasterPower; - private OnOffSwitch onOffSwitch_Master; - private ButtonBox buttonBox_Mode; - private MenuStrip menuStrip_Main; - private ToolStripMenuItem toolStripMenuItem_Language; - private ToolStripMenuItem toolStripMenuItem_Setting; - private ToolStripMenuItem toolStripMenuItem_Help; - private ToolStripMenuItem toolStripMenuItem_CheckUpdate; - private ToolStripMenuItem toolStripMenuItem_AboutV4W; - private GroupBox groupBox_Main; - private Label label_Copyright; - private ToolStripMenuItem toolStripMenuItem_LatencySetting; - private ToolStripMenuItem toolStripMenuItem_ResetEffect; - private Panel panel_MusicMode; - private ToolStripMenuItem toolStripMenuItem_ChannelPan; - private Label Music_label_PreVolume; - private HSlider Music_hSlider_PreVolume; - private HSlider Music_hSlider_PostVolume; - private Label Music_label_PostVolume; - private OnOffSwitch Music_onOffSwitch_Convolver; - private HSlider Music_hSlider_ConvIRGain; - private Label Music_label_ConvolverIRGain; - private OpenFileBox Music_openFileBox_ConvIRS; - private GroupBox Music_groupBox_Convolver; - private IRShape Music_irShape_ConvIR; - private GroupBox Music_groupBox_Surround; - private OnOffSwitch Music_onOffSwitch_Surround; - private ButtonBox Music_buttonBox_SurroundRoomSize; - private Label Music_label_Tube; - private OnOffSwitch Music_onOffSwitch_Tube; - private GroupBox Music_groupBox_Bass; - private OnOffSwitch Music_onOffSwitch_Bass; - private HSlider Music_hSlider_BassSpkSize; - private Label Music_label_Bass_SpkSize; - private HSlider Music_hSlider_BassGain; - private Label Music_label_Bass_Gain; - private GroupBox Music_groupBox_Clarity; - private HSlider Music_hSlider_Clarity; - private Label Music_label_Clarity; - private OnOffSwitch Music_onOffSwitch_Clarity; - private ButtonBox Music_buttonBox_ClarityMode; - private GroupBox Music_groupBox_Cure; - private ButtonBox Music_buttonBox_CureLevel; - private OnOffSwitch Music_onOffSwitch_Cure; - private GroupBox Music_groupBox_Reverb; - private OnOffSwitch Music_onOffSwitch_Reverb; - private HSlider Music_hSlider_ReverbDensity; - private Label Music_label_Reverb_Density; - private HSlider Music_hSlider_ReverbDamping; - private Label Music_label_Reverb_Damping; - private HSlider Music_hSlider_ReverbSize; - private Label Music_label_Reverb_Size; - private HSlider Music_hSlider_ReverbMix; - private Label Music_label_Reverb_Mix; - private HSlider Music_hSlider_ReverbEarlyMix; - private Label Music_label_Reverb_EarlyMix; - private HSlider Music_hSlider_ReverbPreDelay; - private Label Music_label_Reverb_PreDelay; - private HSlider Music_hSlider_ReverbDecay; - private Label Music_label_Reverb_Decay; - private HSlider Music_hSlider_ReverbBandWidth; - private Label Music_label_Reverb_BandWidth; - private SingleButton Music_singleButton_ReverbPreset; - private SingleButton Music_singleButton_Equalizer; - private SingleButton Music_singleButton_Compressor; - private SingleButton singleButton_LoadPreset; - private SingleButton singleButton_SavePreset; - private Panel panel_MovieMode; - private SingleButton Movie_singleButton_Compressor; - private SingleButton Movie_singleButton_Equalizer; - private GroupBox Movie_groupBox_Reverb; - private SingleButton Movie_singleButton_ReverbPreset; - private HSlider Movie_hSlider_ReverbMix; - private Label Movie_label_Reverb_Mix; - private HSlider Movie_hSlider_ReverbEarlyMix; - private Label Movie_label_Reverb_EarlyMix; - private HSlider Movie_hSlider_ReverbPreDelay; - private Label Movie_label_Reverb_PreDelay; - private HSlider Movie_hSlider_ReverbDecay; - private Label Movie_label_Reverb_Decay; - private HSlider Movie_hSlider_ReverbBandWidth; - private Label Movie_label_Reverb_BandWidth; - private HSlider Movie_hSlider_ReverbDensity; - private Label Movie_label_Reverb_Density; - private HSlider Movie_hSlider_ReverbDamping; - private Label Movie_label_Reverb_Damping; - private HSlider Movie_hSlider_ReverbSize; - private Label Movie_label_Reverb_Size; - private OnOffSwitch Movie_onOffSwitch_Reverb; - private GroupBox Movie_groupBox_Clarity; - private HSlider Movie_hSlider_Clarity; - private Label Movie_label_Clarity; - private OnOffSwitch Movie_onOffSwitch_Clarity; - private GroupBox Movie_groupBox_Bass; - private HSlider Movie_hSlider_BassGain; - private Label Movie_label_Bass_Gain; - private HSlider Movie_hSlider_BassSpkSize; - private Label Movie_label_Bass_SpkSize; - private OnOffSwitch Movie_onOffSwitch_Bass; - private GroupBox Movie_groupBox_Surround; - private OnOffSwitch Movie_onOffSwitch_Surround; - private GroupBox Movie_groupBox_Convolver; - private IRShape Movie_irShape_ConvIR; - private OnOffSwitch Movie_onOffSwitch_Convolver; - private HSlider Movie_hSlider_ConvIRGain; - private OpenFileBox Movie_openFileBox_ConvIRS; - private Label Movie_label_ConvolverIRGain; - private HSlider Movie_hSlider_PostVolume; - private Label Movie_label_PostVolume; - private HSlider Movie_hSlider_PreVolume; - private Label Movie_label_PreVolume; - private HSlider Movie_hSlider_SurroundImage; - private Label Movie_label_Surround_Image; - private HSlider Movie_hSlider_Surround3D; - private Label Movie_label_Surround_3D; - private GroupBox Movie_groupBox_SmartVolume; - private HSlider Movie_hSlider_SmartVolumeMaxLevel; - private Label Movie_label_SmartVolume_MaxLevel; - private HSlider Movie_hSlider_SmartVolumeRatio; - private Label Movie_label_SmartVolume_ControlStrength; - private OnOffSwitch Movie_onOffSwitch_SmartVolume; - private HSlider Movie_hSlider_SmartVolumeLevel; - private Label Movie_label_SmartVolume_Level; - private Panel panel_Freestyle; - private SingleButton Freestyle_singleButton_Compressor; - private SingleButton Freestyle_singleButton_Equalizer; - private GroupBox Freestyle_groupBox_Reverb; - private SingleButton Freestyle_singleButton_ReverbPreset; - private HSlider Freestyle_hSlider_ReverbMix; - private Label Freestyle_label_Reverb_Mix; - private HSlider Freestyle_hSlider_ReverbEarlyMix; - private Label Freestyle_label_Reverb_EarlyMix; - private HSlider Freestyle_hSlider_ReverbPreDelay; - private Label Freestyle_label_Reverb_PreDelay; - private HSlider Freestyle_hSlider_ReverbDecay; - private Label Freestyle_label_Reverb_Decay; - private HSlider Freestyle_hSlider_ReverbBandWidth; - private Label Freestyle_label_Reverb_BandWidth; - private HSlider Freestyle_hSlider_ReverbDensity; - private Label Freestyle_label_Reverb_Density; - private HSlider Freestyle_hSlider_ReverbDamping; - private Label Freestyle_label_Reverb_Damping; - private HSlider Freestyle_hSlider_ReverbSize; - private Label Freestyle_label_Reverb_Size; - private OnOffSwitch Freestyle_onOffSwitch_Reverb; - private GroupBox Freestyle_groupBox_Cure; - private ButtonBox Freestyle_buttonBox_CureLevel; - private OnOffSwitch Freestyle_onOffSwitch_Cure; - private Label Freestyle_label_Tube; - private OnOffSwitch Freestyle_onOffSwitch_Tube; - private GroupBox Freestyle_groupBox_Clarity; - private ButtonBox Freestyle_buttonBox_ClarityMode; - private HSlider Freestyle_hSlider_Clarity; - private Label Freestyle_label_Clarity; - private OnOffSwitch Freestyle_onOffSwitch_Clarity; - private GroupBox Freestyle_groupBox_Bass; - private HSlider Freestyle_hSlider_BassGain; - private Label Freestyle_label_Bass_Gain; - private HSlider Freestyle_hSlider_BassSpkSize; - private Label Freestyle_label_Bass_SpkSize; - private OnOffSwitch Freestyle_onOffSwitch_Bass; - private GroupBox Freestyle_groupBox_VHESurround; - private ButtonBox Freestyle_buttonBox_SurroundVHERoomSize; - private OnOffSwitch Freestyle_onOffSwitch_SurroundVHE; - private GroupBox Freestyle_groupBox_Convolver; - private IRShape Freestyle_irShape_ConvIR; - private OnOffSwitch Freestyle_onOffSwitch_Convolver; - private HSlider Freestyle_hSlider_ConvIRGain; - private OpenFileBox Freestyle_openFileBox_ConvIRS; - private Label Freestyle_label_ConvolverIRGain; - private HSlider Freestyle_hSlider_PostVolume; - private Label Freestyle_label_PostVolume; - private HSlider Freestyle_hSlider_PreVolume; - private Label Freestyle_label_PreVolume; - private GroupBox Freestyle_groupBox_3DSurround; - private HSlider Freestyle_hSlider_SurroundImage; - private Label Freestyle_label_Surround_Image; - private HSlider Freestyle_hSlider_Surround3D; - private Label Freestyle_label_Surround_3D; - private OnOffSwitch Freestyle_onOffSwitch_Surround3D; - private ButtonBox Freestyle_buttonBox_BassMode; - private GroupBox Freestyle_groupBox_SmartVolume; - private HSlider Freestyle_hSlider_SmartVolumeLevel; - private Label Freestyle_label_SmartVolume_Level; - private HSlider Freestyle_hSlider_SmartVolumeMaxLevel; - private Label Freestyle_label_SmartVolume_MaxLevel; - private HSlider Freestyle_hSlider_SmartVolumeRatio; - private Label Freestyle_label_SmartVolume_ControlStrength; - private OnOffSwitch Freestyle_onOffSwitch_SmartVolume; - private ToolStripMenuItem toolStripMenuItem_Virtualization; - private NotifyIcon notifyIcon_Main; - private ToolStripMenuItem toolStripMenuItem_Settings; - private ContextMenuStrip contextMenuStrip_TrayMenu; - - public static void SetLanguage(string szLanguagePath, string szLanguageFile) + public class FrmMain : Form { - frmMain.m_szLanguagePath = szLanguagePath; - frmMain.m_szLanguageFile = szLanguageFile; - if (frmMain.m_szLanguagePath == "" || frmMain.m_szLanguageFile == "") - frmMain.m_szLanguageName = ""; - else - frmMain.m_szLanguageName = new ConfigFile(szLanguageFile).ReadConfig("$LANGUAGE_NAME"); - } + private static string m_szLanguagePath = ""; + private static string m_szLanguageFile = ""; + private static string m_szLanguageName = ""; + private readonly string m_szLocalPresetFileName = "LocalPreset.bin"; + private readonly string m_szImpulseResponsePath = "ImpulseResponse"; + private readonly string m_szUserPresetPath = "Presets"; + private readonly bool m_bArgvStartupToMinimized; + private readonly string m_szLocalPreset = ""; + private string m_szIRSPath = ""; + private string m_szPresetsPath = ""; + private bool m_bCloseToTray; + private RuntimeUtils.ConfigProxy.ParamOfBaseSystem m_paramBaseSystem = new RuntimeUtils.ConfigProxy.ParamOfBaseSystem(); + private RuntimeUtils.ConfigProxy.ParamOfMusicMode m_paramMusicMode = new RuntimeUtils.ConfigProxy.ParamOfMusicMode(); + private RuntimeUtils.ConfigProxy.ParamOfMovieMode m_paramMovieMode = new RuntimeUtils.ConfigProxy.ParamOfMovieMode(); + private RuntimeUtils.ConfigProxy.ParamOfFreestyle m_paramFreestyle = new RuntimeUtils.ConfigProxy.ParamOfFreestyle(); + private readonly RuntimeUtils.ConfigProxy m_cpConfigProxy; + private readonly List m_lstTrayMenuPreset = new List(); + private IContainer components; + private PictureBox pictureBox_Logo; + private Label label_MasterPower; + private OnOffSwitch onOffSwitch_Master; + private ButtonBox ButtonBox_Mode; + private MenuStrip menuStrip_Main; + private ToolStripMenuItem ToolStripMenuItem_Language; + private ToolStripMenuItem ToolStripMenuItem_Setting; + private ToolStripMenuItem ToolStripMenuItem_Help; + private ToolStripMenuItem ToolStripMenuItem_CheckUpdate; + private ToolStripMenuItem ToolStripMenuItem_AboutV4W; + private GroupBox groupBox_Main; + private Label label_Copyright; + private ToolStripMenuItem ToolStripMenuItem_LatencySetting; + private ToolStripMenuItem ToolStripMenuItem_ResetEffect; + private Panel panel_MusicMode; + private ToolStripMenuItem ToolStripMenuItem_ChannelPan; + private Label Music_label_PreVolume; + private HSlider Music_hSlider_PreVolume; + private HSlider Music_hSlider_PostVolume; + private Label Music_label_PostVolume; + private OnOffSwitch Music_onOffSwitch_Convolver; + private HSlider Music_hSlider_ConvIRGain; + private Label Music_label_ConvolverIRGain; + private OpenFileBox Music_openFileBox_ConvIRS; + private GroupBox Music_groupBox_Convolver; + private IRShape Music_irShape_ConvIR; + private GroupBox Music_groupBox_Surround; + private OnOffSwitch Music_onOffSwitch_Surround; + private ButtonBox Music_ButtonBox_SurroundRoomSize; + private Label Music_label_Tube; + private OnOffSwitch Music_onOffSwitch_Tube; + private GroupBox Music_groupBox_Bass; + private OnOffSwitch Music_onOffSwitch_Bass; + private HSlider Music_hSlider_BassSpkSize; + private Label Music_label_Bass_SpkSize; + private HSlider Music_hSlider_BassGain; + private Label Music_label_Bass_Gain; + private GroupBox Music_groupBox_Clarity; + private HSlider Music_hSlider_Clarity; + private Label Music_label_Clarity; + private OnOffSwitch Music_onOffSwitch_Clarity; + private ButtonBox Music_ButtonBox_ClarityMode; + private GroupBox Music_groupBox_Cure; + private ButtonBox Music_ButtonBox_CureLevel; + private OnOffSwitch Music_onOffSwitch_Cure; + private GroupBox Music_groupBox_Reverb; + private OnOffSwitch Music_onOffSwitch_Reverb; + private HSlider Music_hSlider_ReverbDensity; + private Label Music_label_Reverb_Density; + private HSlider Music_hSlider_ReverbDamping; + private Label Music_label_Reverb_Damping; + private HSlider Music_hSlider_ReverbSize; + private Label Music_label_Reverb_Size; + private HSlider Music_hSlider_ReverbMix; + private Label Music_label_Reverb_Mix; + private HSlider Music_hSlider_ReverbEarlyMix; + private Label Music_label_Reverb_EarlyMix; + private HSlider Music_hSlider_ReverbPreDelay; + private Label Music_label_Reverb_PreDelay; + private HSlider Music_hSlider_ReverbDecay; + private Label Music_label_Reverb_Decay; + private HSlider Music_hSlider_ReverbBandWidth; + private Label Music_label_Reverb_BandWidth; + private SingleButton Music_SingleButton_ReverbPreset; + private SingleButton Music_SingleButton_Equalizer; + private SingleButton Music_SingleButton_Compressor; + private SingleButton SingleButton_LoadPreset; + private SingleButton SingleButton_SavePreset; + private Panel panel_MovieMode; + private SingleButton Movie_SingleButton_Compressor; + private SingleButton Movie_SingleButton_Equalizer; + private GroupBox Movie_groupBox_Reverb; + private SingleButton Movie_SingleButton_ReverbPreset; + private HSlider Movie_hSlider_ReverbMix; + private Label Movie_label_Reverb_Mix; + private HSlider Movie_hSlider_ReverbEarlyMix; + private Label Movie_label_Reverb_EarlyMix; + private HSlider Movie_hSlider_ReverbPreDelay; + private Label Movie_label_Reverb_PreDelay; + private HSlider Movie_hSlider_ReverbDecay; + private Label Movie_label_Reverb_Decay; + private HSlider Movie_hSlider_ReverbBandWidth; + private Label Movie_label_Reverb_BandWidth; + private HSlider Movie_hSlider_ReverbDensity; + private Label Movie_label_Reverb_Density; + private HSlider Movie_hSlider_ReverbDamping; + private Label Movie_label_Reverb_Damping; + private HSlider Movie_hSlider_ReverbSize; + private Label Movie_label_Reverb_Size; + private OnOffSwitch Movie_onOffSwitch_Reverb; + private GroupBox Movie_groupBox_Clarity; + private HSlider Movie_hSlider_Clarity; + private Label Movie_label_Clarity; + private OnOffSwitch Movie_onOffSwitch_Clarity; + private GroupBox Movie_groupBox_Bass; + private HSlider Movie_hSlider_BassGain; + private Label Movie_label_Bass_Gain; + private HSlider Movie_hSlider_BassSpkSize; + private Label Movie_label_Bass_SpkSize; + private OnOffSwitch Movie_onOffSwitch_Bass; + private GroupBox Movie_groupBox_Surround; + private OnOffSwitch Movie_onOffSwitch_Surround; + private GroupBox Movie_groupBox_Convolver; + private IRShape Movie_irShape_ConvIR; + private OnOffSwitch Movie_onOffSwitch_Convolver; + private HSlider Movie_hSlider_ConvIRGain; + private OpenFileBox Movie_openFileBox_ConvIRS; + private Label Movie_label_ConvolverIRGain; + private HSlider Movie_hSlider_PostVolume; + private Label Movie_label_PostVolume; + private HSlider Movie_hSlider_PreVolume; + private Label Movie_label_PreVolume; + private HSlider Movie_hSlider_SurroundImage; + private Label Movie_label_Surround_Image; + private HSlider Movie_hSlider_Surround3D; + private Label Movie_label_Surround_3D; + private GroupBox Movie_groupBox_SmartVolume; + private HSlider Movie_hSlider_SmartVolumeMaxLevel; + private Label Movie_label_SmartVolume_MaxLevel; + private HSlider Movie_hSlider_SmartVolumeRatio; + private Label Movie_label_SmartVolume_ControlStrength; + private OnOffSwitch Movie_onOffSwitch_SmartVolume; + private HSlider Movie_hSlider_SmartVolumeLevel; + private Label Movie_label_SmartVolume_Level; + private Panel panel_Freestyle; + private SingleButton Freestyle_SingleButton_Compressor; + private SingleButton Freestyle_SingleButton_Equalizer; + private GroupBox Freestyle_groupBox_Reverb; + private SingleButton Freestyle_SingleButton_ReverbPreset; + private HSlider Freestyle_hSlider_ReverbMix; + private Label Freestyle_label_Reverb_Mix; + private HSlider Freestyle_hSlider_ReverbEarlyMix; + private Label Freestyle_label_Reverb_EarlyMix; + private HSlider Freestyle_hSlider_ReverbPreDelay; + private Label Freestyle_label_Reverb_PreDelay; + private HSlider Freestyle_hSlider_ReverbDecay; + private Label Freestyle_label_Reverb_Decay; + private HSlider Freestyle_hSlider_ReverbBandWidth; + private Label Freestyle_label_Reverb_BandWidth; + private HSlider Freestyle_hSlider_ReverbDensity; + private Label Freestyle_label_Reverb_Density; + private HSlider Freestyle_hSlider_ReverbDamping; + private Label Freestyle_label_Reverb_Damping; + private HSlider Freestyle_hSlider_ReverbSize; + private Label Freestyle_label_Reverb_Size; + private OnOffSwitch Freestyle_onOffSwitch_Reverb; + private GroupBox Freestyle_groupBox_Cure; + private ButtonBox Freestyle_ButtonBox_CureLevel; + private OnOffSwitch Freestyle_onOffSwitch_Cure; + private Label Freestyle_label_Tube; + private OnOffSwitch Freestyle_onOffSwitch_Tube; + private GroupBox Freestyle_groupBox_Clarity; + private ButtonBox Freestyle_ButtonBox_ClarityMode; + private HSlider Freestyle_hSlider_Clarity; + private Label Freestyle_label_Clarity; + private OnOffSwitch Freestyle_onOffSwitch_Clarity; + private GroupBox Freestyle_groupBox_Bass; + private HSlider Freestyle_hSlider_BassGain; + private Label Freestyle_label_Bass_Gain; + private HSlider Freestyle_hSlider_BassSpkSize; + private Label Freestyle_label_Bass_SpkSize; + private OnOffSwitch Freestyle_onOffSwitch_Bass; + private GroupBox Freestyle_groupBox_VHESurround; + private ButtonBox Freestyle_ButtonBox_SurroundVHERoomSize; + private OnOffSwitch Freestyle_onOffSwitch_SurroundVHE; + private GroupBox Freestyle_groupBox_Convolver; + private IRShape Freestyle_irShape_ConvIR; + private OnOffSwitch Freestyle_onOffSwitch_Convolver; + private HSlider Freestyle_hSlider_ConvIRGain; + private OpenFileBox Freestyle_openFileBox_ConvIRS; + private Label Freestyle_label_ConvolverIRGain; + private HSlider Freestyle_hSlider_PostVolume; + private Label Freestyle_label_PostVolume; + private HSlider Freestyle_hSlider_PreVolume; + private Label Freestyle_label_PreVolume; + private GroupBox Freestyle_groupBox_3DSurround; + private HSlider Freestyle_hSlider_SurroundImage; + private Label Freestyle_label_Surround_Image; + private HSlider Freestyle_hSlider_Surround3D; + private Label Freestyle_label_Surround_3D; + private OnOffSwitch Freestyle_onOffSwitch_Surround3D; + private ButtonBox Freestyle_ButtonBox_BassMode; + private GroupBox Freestyle_groupBox_SmartVolume; + private HSlider Freestyle_hSlider_SmartVolumeLevel; + private Label Freestyle_label_SmartVolume_Level; + private HSlider Freestyle_hSlider_SmartVolumeMaxLevel; + private Label Freestyle_label_SmartVolume_MaxLevel; + private HSlider Freestyle_hSlider_SmartVolumeRatio; + private Label Freestyle_label_SmartVolume_ControlStrength; + private OnOffSwitch Freestyle_onOffSwitch_SmartVolume; + private ToolStripMenuItem ToolStripMenuItem_Virtualization; + private NotifyIcon notifyIcon_Main; + private ToolStripMenuItem ToolStripMenuItem_Settings; + private ContextMenuStrip contextMenuStrip_TrayMenu; + + public static void SetLanguage(string szLanguagePath, string szLanguageFile) + { + m_szLanguagePath = szLanguagePath; + m_szLanguageFile = szLanguageFile; + if (m_szLanguagePath == "" || m_szLanguageFile == "") + m_szLanguageName = ""; + else + m_szLanguageName = new ConfigFile(szLanguageFile).ReadConfig("$LANGUAGE_NAME"); + } - public frmMain(string[] szArgs) - { - this.InitializeComponent(); - this.m_bArgvStartupToMinimized = false; - if (szArgs != null) - { - int length = szArgs.Length; - } - this.m_szLocalPreset = AppDomain.CurrentDomain.BaseDirectory; - if (!this.m_szLocalPreset.EndsWith("\\")) - this.m_szLocalPreset += "\\"; - this.m_szLocalPreset += this.m_szLocalPresetFileName; - this.m_szIRSPath = AppDomain.CurrentDomain.BaseDirectory; - if (!this.m_szIRSPath.EndsWith("\\")) - this.m_szIRSPath += "\\"; - frmMain frmMain1 = this; - frmMain1.m_szIRSPath = frmMain1.m_szIRSPath + this.m_szImpulseResponsePath + "\\"; - if (!Directory.Exists(this.m_szIRSPath)) - { - try - { - Directory.CreateDirectory(this.m_szIRSPath); - } - catch - { - } - } - this.m_szPresetsPath = AppDomain.CurrentDomain.BaseDirectory; - if (!this.m_szPresetsPath.EndsWith("\\")) - this.m_szPresetsPath += "\\"; - frmMain frmMain2 = this; - frmMain2.m_szPresetsPath = frmMain2.m_szPresetsPath + this.m_szUserPresetPath + "\\"; - if (!Directory.Exists(this.m_szPresetsPath)) - { - try - { - Directory.CreateDirectory(this.m_szPresetsPath); - } - catch - { - } - } - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; - if (!baseDirectory.EndsWith("\\")) - baseDirectory += "\\"; - ConfigFile configFile = new ConfigFile(baseDirectory + "Config.ini"); - string str1 = configFile.ReadConfig("$CLOSE_APP_TO_TRAY"); - this.m_bCloseToTray = !string.IsNullOrEmpty(str1) && str1.ToUpper() == "TRUE"; - this.m_lstTrayMenuPreset.Clear(); - string s = configFile.ReadConfig("$TRAY_MENU_PRESET_COUNT"); - if (!string.IsNullOrEmpty(s)) - { - int result = 0; - try - { - if (int.TryParse(s, out result)) - { - for (int index = 0; index < result; ++index) + public FrmMain(string[] szArgs) + { + InitializeComponent(); + m_bArgvStartupToMinimized = false; + if (szArgs != null) { - string szName = configFile.ReadConfig("$TRAY_MENU_PRESET_NAME_" + index.ToString()); - string str2 = configFile.ReadConfig("$TRAY_MENU_PRESET_MODE_" + index.ToString()); - string szFile = configFile.ReadConfig("$TRAY_MENU_PRESET_FILE_" + index.ToString()); - if (string.IsNullOrEmpty(szName)) - szName = GlobalMessages.UNNAMED; - if (!string.IsNullOrEmpty(str2)) - { - int nMode = -1; - if (str2 == "EFFECT_MODE_MUSIC") - nMode = 0; - if (str2 == "EFFECT_MODE_MOVIE") - nMode = 1; - if (str2 == "EFFECT_MODE_FREESTYLE") - nMode = 2; - if (nMode != -1) - this.m_lstTrayMenuPreset.Add(new TrayMenuPreset(szName, nMode, szFile)); - } + int length = szArgs.Length; } - } - } - catch - { - this.m_lstTrayMenuPreset.Clear(); - } - } - string config = RegHelper.GetConfig(); - if (!RuntimeUtils.ConfigProxy.CheckConfigVersion(config)) - RuntimeUtils.ConfigProxy.UpdateConfigToCurrent(config); - this.m_cpConfigProxy = new RuntimeUtils.ConfigProxy(config); - Parameters.LoadDefaultParameter(ref this.m_paramBaseSystem); - Parameters.LoadDefaultParameter(ref this.m_paramMusicMode); - Parameters.LoadDefaultParameter(ref this.m_paramMovieMode); - Parameters.LoadDefaultParameter(ref this.m_paramFreestyle); - bool bPBaseSystem = false; - bool bPMusicMode = false; - bool bPMovieMode = false; - bool bPFreestyle = false; - if (!Parameters.ReadPreset(this.m_szLocalPreset, ref this.m_paramBaseSystem, ref this.m_paramMusicMode, ref this.m_paramMovieMode, ref this.m_paramFreestyle, out bPBaseSystem, out bPMusicMode, out bPMovieMode, out bPFreestyle)) - { - Parameters.LoadDefaultParameter(ref this.m_paramBaseSystem); - Parameters.LoadDefaultParameter(ref this.m_paramMusicMode); - Parameters.LoadDefaultParameter(ref this.m_paramMovieMode); - Parameters.LoadDefaultParameter(ref this.m_paramFreestyle); - } - else - { - if (!bPBaseSystem) - Parameters.LoadDefaultParameter(ref this.m_paramBaseSystem); - if (!bPMusicMode) - Parameters.LoadDefaultParameter(ref this.m_paramMusicMode); - if (!bPMovieMode) - Parameters.LoadDefaultParameter(ref this.m_paramMovieMode); - if (!bPFreestyle) - Parameters.LoadDefaultParameter(ref this.m_paramFreestyle); - } - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - this.toolStripMenuItem_Language.Text = GlobalMessages.MENU_LANGUAGE; - this.toolStripMenuItem_Setting.Text = GlobalMessages.MENU_SETTING; - this.toolStripMenuItem_LatencySetting.Text = GlobalMessages.LATENCY_SETTING; - this.toolStripMenuItem_ChannelPan.Text = GlobalMessages.CHANNEL_PAN; - this.toolStripMenuItem_Virtualization.Text = GlobalMessages.VIRTUALIZATION; - this.toolStripMenuItem_ResetEffect.Text = GlobalMessages.RESET_EFFECT; - this.toolStripMenuItem_Settings.Text = GlobalMessages.SETTINGS; - this.toolStripMenuItem_Help.Text = GlobalMessages.MENU_HELP; - this.toolStripMenuItem_CheckUpdate.Text = GlobalMessages.CHECK_UPDATE; - this.toolStripMenuItem_AboutV4W.Text = GlobalMessages.ABOUT; - this.label_MasterPower.Text = GlobalMessages.MASTER_POWER; - this.singleButton_LoadPreset.ButtonText = GlobalMessages.LOAD_PRESET; - this.singleButton_SavePreset.ButtonText = GlobalMessages.SAVE_PRESET; - this.label_Copyright.Text = GlobalMessages.COPYRIGHT; - this.buttonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.MUSIC_MODE, (object) 0.ToString())); - this.buttonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.MOVIE_MODE, (object) 1.ToString())); - this.buttonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.FREESTYLE_MODE, (object) 2.ToString())); - this.Music_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; - this.Music_label_PostVolume.Text = GlobalMessages.POST_VOLUME; - this.Music_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; - this.Music_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; - this.Music_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; - this.Music_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; - if (Directory.Exists(this.m_szIRSPath)) - this.Music_openFileBox_ConvIRS.OpenDirectory = this.m_szIRSPath; - this.Music_groupBox_Surround.Text = GlobalMessages.SURROUND; - this.Music_buttonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALLEST_ROOM, (object) "0")); - this.Music_buttonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALL_ROOM, (object) "1")); - this.Music_buttonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_MID_ROOM, (object) "2")); - this.Music_buttonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGE_ROOM, (object) "3")); - this.Music_buttonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGEST_ROOM, (object) "4")); - this.Music_groupBox_Bass.Text = GlobalMessages.BASS; - this.Music_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; - this.Music_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; - this.Music_groupBox_Clarity.Text = GlobalMessages.CLARITY; - this.Music_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_CLARITY, (object) "0")); - this.Music_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.OZONE_CLARITY, (object) "1")); - this.Music_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.XHIFI_CLARITY, (object) "2")); - this.Music_label_Clarity.Text = GlobalMessages.CLARITY; - this.Music_groupBox_Cure.Text = GlobalMessages.CURE; - this.Music_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.SLIGHT_CURE, (object) 6226570U.ToString())); - this.Music_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.MODERATE_CURE, (object) 3932860U.ToString())); - this.Music_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.EXTREME_CURE, (object) 2949820U.ToString())); - this.Music_label_Tube.Text = GlobalMessages.TUBE; - this.Music_groupBox_Reverb.Text = GlobalMessages.REVERB; - this.Music_singleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; - this.Music_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; - this.Music_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; - this.Music_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; - this.Music_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; - this.Music_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; - this.Music_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; - this.Music_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; - this.Music_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; - this.Music_singleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; - this.Music_singleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; - this.Movie_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; - this.Movie_label_PostVolume.Text = GlobalMessages.POST_VOLUME; - this.Movie_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; - this.Movie_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; - this.Movie_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; - if (Directory.Exists(this.m_szIRSPath)) - this.Movie_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; - this.Movie_openFileBox_ConvIRS.OpenDirectory = this.m_szIRSPath; - this.Movie_groupBox_Surround.Text = GlobalMessages.SURROUND; - this.Movie_label_Surround_3D.Text = GlobalMessages.SURROUND_3D; - this.Movie_label_Surround_Image.Text = GlobalMessages.SURROUND_IMAGE; - this.Movie_groupBox_Bass.Text = GlobalMessages.BASS; - this.Movie_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; - this.Movie_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; - this.Movie_groupBox_Clarity.Text = GlobalMessages.CLARITY; - this.Movie_label_Clarity.Text = GlobalMessages.CLARITY; - this.Movie_groupBox_SmartVolume.Text = GlobalMessages.SMART_VOLUME; - this.Movie_label_SmartVolume_ControlStrength.Text = GlobalMessages.SMART_VOLUME_CONTROL_STRENGTH; - this.Movie_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL; - this.Movie_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL; - this.Movie_groupBox_Reverb.Text = GlobalMessages.REVERB; - this.Movie_singleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; - this.Movie_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; - this.Movie_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; - this.Movie_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; - this.Movie_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; - this.Movie_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; - this.Movie_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; - this.Movie_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; - this.Movie_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; - this.Movie_singleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; - this.Movie_singleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; - this.Freestyle_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; - this.Freestyle_label_PostVolume.Text = GlobalMessages.POST_VOLUME; - this.Freestyle_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; - this.Freestyle_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; - this.Freestyle_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; - this.Freestyle_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; - if (Directory.Exists(this.m_szIRSPath)) - this.Freestyle_openFileBox_ConvIRS.OpenDirectory = this.m_szIRSPath; - this.Freestyle_groupBox_3DSurround.Text = GlobalMessages.THREE_D_SURROUND; - this.Freestyle_label_Surround_3D.Text = GlobalMessages.SURROUND_3D; - this.Freestyle_label_Surround_Image.Text = GlobalMessages.SURROUND_IMAGE; - this.Freestyle_groupBox_VHESurround.Text = GlobalMessages.VHE_SURROUND; - this.Freestyle_buttonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALLEST_ROOM, (object) "0")); - this.Freestyle_buttonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALL_ROOM, (object) "1")); - this.Freestyle_buttonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_MID_ROOM, (object) "2")); - this.Freestyle_buttonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGE_ROOM, (object) "3")); - this.Freestyle_buttonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGEST_ROOM, (object) "4")); - this.Freestyle_groupBox_Bass.Text = GlobalMessages.BASS; - this.Freestyle_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; - this.Freestyle_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; - this.Freestyle_buttonBox_BassMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_BASS, (object) "0")); - this.Freestyle_buttonBox_BassMode.AddItem(new ButtonBox.Item(GlobalMessages.PURE_BASS, (object) "1")); - this.Freestyle_groupBox_Clarity.Text = GlobalMessages.CLARITY; - this.Freestyle_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_CLARITY, (object) "0")); - this.Freestyle_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.OZONE_CLARITY, (object) "1")); - this.Freestyle_buttonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.XHIFI_CLARITY, (object) "2")); - this.Freestyle_label_Clarity.Text = GlobalMessages.CLARITY; - this.Freestyle_groupBox_Cure.Text = GlobalMessages.CURE; - this.Freestyle_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.SLIGHT_CURE, (object) 6226570U.ToString())); - this.Freestyle_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.MODERATE_CURE, (object) 3932860U.ToString())); - this.Freestyle_buttonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.EXTREME_CURE, (object) 2949820U.ToString())); - this.Freestyle_label_Tube.Text = GlobalMessages.TUBE; - this.Freestyle_groupBox_Reverb.Text = GlobalMessages.REVERB; - this.Freestyle_singleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; - this.Freestyle_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; - this.Freestyle_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; - this.Freestyle_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; - this.Freestyle_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; - this.Freestyle_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; - this.Freestyle_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; - this.Freestyle_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; - this.Freestyle_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; - this.Freestyle_groupBox_SmartVolume.Text = GlobalMessages.SMART_VOLUME; - this.Freestyle_label_SmartVolume_ControlStrength.Text = GlobalMessages.SMART_VOLUME_CONTROL_STRENGTH; - this.Freestyle_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL; - this.Freestyle_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL; - this.Freestyle_singleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; - this.Freestyle_singleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; - this.toolStripMenuItem_Language.DropDownItems.Clear(); - foreach (string listFile in new FolderExplorer().ListFiles(frmMain.m_szLanguagePath)) - { - string str3 = new ConfigFile(listFile).ReadConfig("$LANGUAGE_NAME"); - ToolStripItem toolStripItem = (ToolStripItem) new ToolStripMenuItem(); - toolStripItem.Text = str3; - toolStripItem.Tag = (object) listFile; - toolStripItem.Click += new EventHandler(this.LanguageChanged); - this.toolStripMenuItem_Language.DropDownItems.Add(toolStripItem); - } - this.groupBox_Main.Controls.Clear(); - this.groupBox_Main.Controls.Add((Control) this.panel_MusicMode); - this.groupBox_Main.Controls.Add((Control) this.panel_MovieMode); - this.groupBox_Main.Controls.Add((Control) this.panel_Freestyle); - this.panel_MusicMode.Dock = DockStyle.Fill; - this.panel_MovieMode.Dock = DockStyle.Fill; - this.panel_Freestyle.Dock = DockStyle.Fill; - this.UpdateAllControlsFromParameters(); - if (szArgs == null || szArgs.Length <= 0) - return; - for (int index = 0; index < szArgs.Length; ++index) - { - if (szArgs[index].ToLower().Trim() == "--hide") - this.m_bArgvStartupToMinimized = this.m_bCloseToTray; - else if (szArgs[index].ToLower().Trim() == "-m") - this.m_bArgvStartupToMinimized = this.m_bCloseToTray; - } - } + m_szLocalPreset = AppDomain.CurrentDomain.BaseDirectory; + if (!m_szLocalPreset.EndsWith("\\")) + m_szLocalPreset += "\\"; + m_szLocalPreset += m_szLocalPresetFileName; + m_szIRSPath = AppDomain.CurrentDomain.BaseDirectory; + if (!m_szIRSPath.EndsWith("\\")) + m_szIRSPath += "\\"; + FrmMain frmMain1 = this; + frmMain1.m_szIRSPath = frmMain1.m_szIRSPath + m_szImpulseResponsePath + "\\"; + if (!Directory.Exists(m_szIRSPath)) + { + try + { + Directory.CreateDirectory(m_szIRSPath); + } + catch + { + } + } + m_szPresetsPath = AppDomain.CurrentDomain.BaseDirectory; + if (!m_szPresetsPath.EndsWith("\\")) + m_szPresetsPath += "\\"; + FrmMain frmMain2 = this; + frmMain2.m_szPresetsPath = frmMain2.m_szPresetsPath + m_szUserPresetPath + "\\"; + if (!Directory.Exists(m_szPresetsPath)) + { + try + { + Directory.CreateDirectory(m_szPresetsPath); + } + catch + { + } + } + string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if (!baseDirectory.EndsWith("\\")) + baseDirectory += "\\"; + ConfigFile configFile = new ConfigFile(baseDirectory + "Config.ini"); + string str1 = configFile.ReadConfig("$CLOSE_APP_TO_TRAY"); + m_bCloseToTray = !string.IsNullOrEmpty(str1) && str1.ToUpper() == "TRUE"; + m_lstTrayMenuPreset.Clear(); + string s = configFile.ReadConfig("$TRAY_MENU_PRESET_COUNT"); + if (!string.IsNullOrEmpty(s)) + { + int result = 0; + try + { + if (int.TryParse(s, out result)) + { + for (int index = 0; index < result; ++index) + { + string szName = configFile.ReadConfig("$TRAY_MENU_PRESET_NAME_" + index.ToString()); + string str2 = configFile.ReadConfig("$TRAY_MENU_PRESET_MODE_" + index.ToString()); + string szFile = configFile.ReadConfig("$TRAY_MENU_PRESET_FILE_" + index.ToString()); + if (string.IsNullOrEmpty(szName)) + szName = GlobalMessages.UNNAMED; + if (!string.IsNullOrEmpty(str2)) + { + int nMode = -1; + if (str2 == "EFFECT_MODE_MUSIC") + nMode = 0; + if (str2 == "EFFECT_MODE_MOVIE") + nMode = 1; + if (str2 == "EFFECT_MODE_FREESTYLE") + nMode = 2; + if (nMode != -1) + m_lstTrayMenuPreset.Add(new TrayMenuPreset(szName, nMode, szFile)); + } + } + } + } + catch + { + m_lstTrayMenuPreset.Clear(); + } + } + string config = RegHelper.GetConfig(); + if (!RuntimeUtils.ConfigProxy.CheckConfigVersion(config)) + RuntimeUtils.ConfigProxy.UpdateConfigToCurrent(config); + m_cpConfigProxy = new RuntimeUtils.ConfigProxy(config); + Parameters.LoadDefaultParameter(ref m_paramBaseSystem); + Parameters.LoadDefaultParameter(ref m_paramMusicMode); + Parameters.LoadDefaultParameter(ref m_paramMovieMode); + Parameters.LoadDefaultParameter(ref m_paramFreestyle); + if (!Parameters.ReadPreset(m_szLocalPreset, ref m_paramBaseSystem, ref m_paramMusicMode, ref m_paramMovieMode, ref m_paramFreestyle, out bool bPBaseSystem, out bool bPMusicMode, out bool bPMovieMode, out bool bPFreestyle)) + { + Parameters.LoadDefaultParameter(ref m_paramBaseSystem); + Parameters.LoadDefaultParameter(ref m_paramMusicMode); + Parameters.LoadDefaultParameter(ref m_paramMovieMode); + Parameters.LoadDefaultParameter(ref m_paramFreestyle); + } + else + { + if (!bPBaseSystem) + Parameters.LoadDefaultParameter(ref m_paramBaseSystem); + if (!bPMusicMode) + Parameters.LoadDefaultParameter(ref m_paramMusicMode); + if (!bPMovieMode) + Parameters.LoadDefaultParameter(ref m_paramMovieMode); + if (!bPFreestyle) + Parameters.LoadDefaultParameter(ref m_paramFreestyle); + } + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + ToolStripMenuItem_Language.Text = GlobalMessages.MENU_LANGUAGE; + ToolStripMenuItem_Setting.Text = GlobalMessages.MENU_SETTING; + ToolStripMenuItem_LatencySetting.Text = GlobalMessages.LATENCY_SETTING; + ToolStripMenuItem_ChannelPan.Text = GlobalMessages.CHANNEL_PAN; + ToolStripMenuItem_Virtualization.Text = GlobalMessages.VIRTUALIZATION; + ToolStripMenuItem_ResetEffect.Text = GlobalMessages.RESET_EFFECT; + ToolStripMenuItem_Settings.Text = GlobalMessages.SETTINGS; + ToolStripMenuItem_Help.Text = GlobalMessages.MENU_HELP; + ToolStripMenuItem_CheckUpdate.Text = GlobalMessages.CHECK_UPDATE; + ToolStripMenuItem_AboutV4W.Text = GlobalMessages.ABOUT; + label_MasterPower.Text = GlobalMessages.MASTER_POWER; + SingleButton_LoadPreset.ButtonText = GlobalMessages.LOAD_PRESET; + SingleButton_SavePreset.ButtonText = GlobalMessages.SAVE_PRESET; + label_Copyright.Text = GlobalMessages.COPYRIGHT; + ButtonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.MUSIC_MODE, 0.ToString())); + ButtonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.MOVIE_MODE, 1.ToString())); + ButtonBox_Mode.AddItem(new ButtonBox.Item(GlobalMessages.FREESTYLE_MODE, 2.ToString())); + Music_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; + Music_label_PostVolume.Text = GlobalMessages.POST_VOLUME; + Music_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; + Music_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; + Music_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; + Music_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; + if (Directory.Exists(m_szIRSPath)) + Music_openFileBox_ConvIRS.OpenDirectory = m_szIRSPath; + Music_groupBox_Surround.Text = GlobalMessages.SURROUND; + Music_ButtonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALLEST_ROOM, "0")); + Music_ButtonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALL_ROOM, "1")); + Music_ButtonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_MID_ROOM, "2")); + Music_ButtonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGE_ROOM, "3")); + Music_ButtonBox_SurroundRoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGEST_ROOM, "4")); + Music_groupBox_Bass.Text = GlobalMessages.BASS; + Music_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; + Music_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; + Music_groupBox_Clarity.Text = GlobalMessages.CLARITY; + Music_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_CLARITY, "0")); + Music_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.OZONE_CLARITY, "1")); + Music_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.XHIFI_CLARITY, "2")); + Music_label_Clarity.Text = GlobalMessages.CLARITY; + Music_groupBox_Cure.Text = GlobalMessages.CURE; + Music_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.SLIGHT_CURE, 6226570U.ToString())); + Music_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.MODERATE_CURE, 3932860U.ToString())); + Music_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.EXTREME_CURE, 2949820U.ToString())); + Music_label_Tube.Text = GlobalMessages.TUBE; + Music_groupBox_Reverb.Text = GlobalMessages.REVERB; + Music_SingleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; + Music_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; + Music_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; + Music_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; + Music_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; + Music_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; + Music_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; + Music_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; + Music_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; + Music_SingleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; + Music_SingleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; + Movie_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; + Movie_label_PostVolume.Text = GlobalMessages.POST_VOLUME; + Movie_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; + Movie_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; + Movie_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; + if (Directory.Exists(m_szIRSPath)) + Movie_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; + Movie_openFileBox_ConvIRS.OpenDirectory = m_szIRSPath; + Movie_groupBox_Surround.Text = GlobalMessages.SURROUND; + Movie_label_Surround_3D.Text = GlobalMessages.SURROUND_3D; + Movie_label_Surround_Image.Text = GlobalMessages.SURROUND_IMAGE; + Movie_groupBox_Bass.Text = GlobalMessages.BASS; + Movie_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; + Movie_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; + Movie_groupBox_Clarity.Text = GlobalMessages.CLARITY; + Movie_label_Clarity.Text = GlobalMessages.CLARITY; + Movie_groupBox_SmartVolume.Text = GlobalMessages.SMART_VOLUME; + Movie_label_SmartVolume_ControlStrength.Text = GlobalMessages.SMART_VOLUME_CONTROL_STRENGTH; + Movie_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL; + Movie_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL; + Movie_groupBox_Reverb.Text = GlobalMessages.REVERB; + Movie_SingleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; + Movie_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; + Movie_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; + Movie_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; + Movie_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; + Movie_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; + Movie_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; + Movie_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; + Movie_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; + Movie_SingleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; + Movie_SingleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; + Freestyle_label_PreVolume.Text = GlobalMessages.PRE_VOLUME; + Freestyle_label_PostVolume.Text = GlobalMessages.POST_VOLUME; + Freestyle_groupBox_Convolver.Text = GlobalMessages.CONVOLVER; + Freestyle_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN; + Freestyle_openFileBox_ConvIRS.DialogTitle = GlobalMessages.OPEN_CONV_IRS; + Freestyle_openFileBox_ConvIRS.FileFilter = "*.irs; *.wav|*.irs;*.wav|*.*|*.*"; + if (Directory.Exists(m_szIRSPath)) + Freestyle_openFileBox_ConvIRS.OpenDirectory = m_szIRSPath; + Freestyle_groupBox_3DSurround.Text = GlobalMessages.THREE_D_SURROUND; + Freestyle_label_Surround_3D.Text = GlobalMessages.SURROUND_3D; + Freestyle_label_Surround_Image.Text = GlobalMessages.SURROUND_IMAGE; + Freestyle_groupBox_VHESurround.Text = GlobalMessages.VHE_SURROUND; + Freestyle_ButtonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALLEST_ROOM, "0")); + Freestyle_ButtonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_SMALL_ROOM, "1")); + Freestyle_ButtonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_MID_ROOM, "2")); + Freestyle_ButtonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGE_ROOM, "3")); + Freestyle_ButtonBox_SurroundVHERoomSize.AddItem(new ButtonBox.Item(GlobalMessages.VHE_LARGEST_ROOM, "4")); + Freestyle_groupBox_Bass.Text = GlobalMessages.BASS; + Freestyle_label_Bass_SpkSize.Text = GlobalMessages.BASS_SPKSIZE; + Freestyle_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN; + Freestyle_ButtonBox_BassMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_BASS, "0")); + Freestyle_ButtonBox_BassMode.AddItem(new ButtonBox.Item(GlobalMessages.PURE_BASS, "1")); + Freestyle_groupBox_Clarity.Text = GlobalMessages.CLARITY; + Freestyle_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.NATURAL_CLARITY, "0")); + Freestyle_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.OZONE_CLARITY, "1")); + Freestyle_ButtonBox_ClarityMode.AddItem(new ButtonBox.Item(GlobalMessages.XHIFI_CLARITY, "2")); + Freestyle_label_Clarity.Text = GlobalMessages.CLARITY; + Freestyle_groupBox_Cure.Text = GlobalMessages.CURE; + Freestyle_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.SLIGHT_CURE, 6226570U.ToString())); + Freestyle_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.MODERATE_CURE, 3932860U.ToString())); + Freestyle_ButtonBox_CureLevel.AddItem(new ButtonBox.Item(GlobalMessages.EXTREME_CURE, 2949820U.ToString())); + Freestyle_label_Tube.Text = GlobalMessages.TUBE; + Freestyle_groupBox_Reverb.Text = GlobalMessages.REVERB; + Freestyle_SingleButton_ReverbPreset.ButtonText = GlobalMessages.PRESET; + Freestyle_label_Reverb_Size.Text = GlobalMessages.REVERB_SIZE; + Freestyle_label_Reverb_Damping.Text = GlobalMessages.REVERB_DAMPING; + Freestyle_label_Reverb_Density.Text = GlobalMessages.REVERB_DENSITY; + Freestyle_label_Reverb_BandWidth.Text = GlobalMessages.REVERB_BANDWIDTH; + Freestyle_label_Reverb_Decay.Text = GlobalMessages.REVERB_DECAY; + Freestyle_label_Reverb_PreDelay.Text = GlobalMessages.REVERB_PREDELAY; + Freestyle_label_Reverb_EarlyMix.Text = GlobalMessages.REVERB_EARLYMIX; + Freestyle_label_Reverb_Mix.Text = GlobalMessages.REVERB_MIX; + Freestyle_groupBox_SmartVolume.Text = GlobalMessages.SMART_VOLUME; + Freestyle_label_SmartVolume_ControlStrength.Text = GlobalMessages.SMART_VOLUME_CONTROL_STRENGTH; + Freestyle_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL; + Freestyle_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL; + Freestyle_SingleButton_Equalizer.ButtonText = GlobalMessages.EQUALIZER_ADJUST; + Freestyle_SingleButton_Compressor.ButtonText = GlobalMessages.COMPRESSOR_ADJUST; + ToolStripMenuItem_Language.DropDownItems.Clear(); + foreach (string listFile in new FolderExplorer().ListFiles(m_szLanguagePath)) + { + string str3 = new ConfigFile(listFile).ReadConfig("$LANGUAGE_NAME"); + ToolStripItem toolStripItem = new ToolStripMenuItem + { + Text = str3, + Tag = listFile + }; + toolStripItem.Click += new EventHandler(LanguageChanged); + ToolStripMenuItem_Language.DropDownItems.Add(toolStripItem); + } + groupBox_Main.Controls.Clear(); + groupBox_Main.Controls.Add(panel_MusicMode); + groupBox_Main.Controls.Add(panel_MovieMode); + groupBox_Main.Controls.Add(panel_Freestyle); + panel_MusicMode.Dock = DockStyle.Fill; + panel_MovieMode.Dock = DockStyle.Fill; + panel_Freestyle.Dock = DockStyle.Fill; + UpdateAllControlsFromParameters(); + if (szArgs == null || szArgs.Length <= 0) + return; + for (int index = 0; index < szArgs.Length; ++index) + { + if (szArgs[index].ToLower().Trim() == "--hide") + m_bArgvStartupToMinimized = m_bCloseToTray; + else if (szArgs[index].ToLower().Trim() == "-m") + m_bArgvStartupToMinimized = m_bCloseToTray; + } + } - private void SaveAppSettings() - { - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; - if (!baseDirectory.EndsWith("\\")) - baseDirectory += "\\"; - ConfigFile configFile = new ConfigFile(baseDirectory + "Config.ini"); - if (this.m_bCloseToTray) - configFile.SetConfig("$CLOSE_APP_TO_TRAY", "TRUE"); - else - configFile.SetConfig("$CLOSE_APP_TO_TRAY", "FALSE"); - int num1 = 0; - for (int index = 0; index < this.m_lstTrayMenuPreset.Count; ++index) - { - if (this.m_lstTrayMenuPreset[index].Valid()) - ++num1; - } - configFile.SetConfig("$TRAY_MENU_PRESET_COUNT", num1.ToString()); - int index1 = 0; - int num2 = 0; - for (; index1 < this.m_lstTrayMenuPreset.Count; ++index1) - { - if (this.m_lstTrayMenuPreset[index1].Valid()) - { - if (string.IsNullOrEmpty(this.m_lstTrayMenuPreset[index1].PresetName)) - this.m_lstTrayMenuPreset[index1].PresetName = GlobalMessages.UNNAMED; - string szValue = ""; - if (this.m_lstTrayMenuPreset[index1].PresetMode == 0) - szValue = "EFFECT_MODE_MUSIC"; - if (this.m_lstTrayMenuPreset[index1].PresetMode == 1) - szValue = "EFFECT_MODE_MOVIE"; - if (this.m_lstTrayMenuPreset[index1].PresetMode == 2) - szValue = "EFFECT_MODE_FREESTYLE"; - configFile.SetConfig("$TRAY_MENU_PRESET_NAME_" + num2.ToString(), this.m_lstTrayMenuPreset[index1].PresetName); - configFile.SetConfig("$TRAY_MENU_PRESET_MODE_" + num2.ToString(), szValue); - configFile.SetConfig("$TRAY_MENU_PRESET_FILE_" + num2.ToString(), this.m_lstTrayMenuPreset[index1].PresetFile); - ++num2; - } - } - } + private void SaveAppSettings() + { + string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if (!baseDirectory.EndsWith("\\")) + baseDirectory += "\\"; + ConfigFile configFile = new ConfigFile(baseDirectory + "Config.ini"); + if (m_bCloseToTray) + configFile.SetConfig("$CLOSE_APP_TO_TRAY", "TRUE"); + else + configFile.SetConfig("$CLOSE_APP_TO_TRAY", "FALSE"); + int num1 = 0; + for (int index = 0; index < m_lstTrayMenuPreset.Count; ++index) + { + if (m_lstTrayMenuPreset[index].Valid()) + ++num1; + } + configFile.SetConfig("$TRAY_MENU_PRESET_COUNT", num1.ToString()); + int index1 = 0; + int num2 = 0; + for (; index1 < m_lstTrayMenuPreset.Count; ++index1) + { + if (m_lstTrayMenuPreset[index1].Valid()) + { + if (string.IsNullOrEmpty(m_lstTrayMenuPreset[index1].PresetName)) + m_lstTrayMenuPreset[index1].PresetName = GlobalMessages.UNNAMED; + string szValue = ""; + if (m_lstTrayMenuPreset[index1].PresetMode == 0) + szValue = "EFFECT_MODE_MUSIC"; + if (m_lstTrayMenuPreset[index1].PresetMode == 1) + szValue = "EFFECT_MODE_MOVIE"; + if (m_lstTrayMenuPreset[index1].PresetMode == 2) + szValue = "EFFECT_MODE_FREESTYLE"; + configFile.SetConfig("$TRAY_MENU_PRESET_NAME_" + num2.ToString(), m_lstTrayMenuPreset[index1].PresetName); + configFile.SetConfig("$TRAY_MENU_PRESET_MODE_" + num2.ToString(), szValue); + configFile.SetConfig("$TRAY_MENU_PRESET_FILE_" + num2.ToString(), m_lstTrayMenuPreset[index1].PresetFile); + ++num2; + } + } + } - private void SetupTrayMenu() - { - this.contextMenuStrip_TrayMenu.Items.Clear(); - bool flag = false; - for (int index = 0; index < this.m_lstTrayMenuPreset.Count; ++index) - { - if (this.m_lstTrayMenuPreset[index].Valid()) - { - ToolStripMenuItem toolStripMenuItem = new ToolStripMenuItem(); - toolStripMenuItem.Text = this.m_lstTrayMenuPreset[index].PresetName; - toolStripMenuItem.Tag = (object) this.m_lstTrayMenuPreset[index]; - toolStripMenuItem.Click += new EventHandler(this.TrayMenu_SelectPreset); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem); - flag = true; - } - } - if (flag) - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) new ToolStripSeparator()); - ToolStripMenuItem toolStripMenuItem1 = new ToolStripMenuItem(); - toolStripMenuItem1.Text = GlobalMessages.MUSIC_MODE; - toolStripMenuItem1.Tag = (object) "MUSIC_MODE"; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - toolStripMenuItem1.Checked = true; - toolStripMenuItem1.Click += new EventHandler(this.TrayMenu_SwitchEffectMode); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem1); - ToolStripMenuItem toolStripMenuItem2 = new ToolStripMenuItem(); - toolStripMenuItem2.Text = GlobalMessages.MOVIE_MODE; - toolStripMenuItem2.Tag = (object) "MOVIE_MODE"; - if (this.m_paramBaseSystem.m_nEffectMode == 1U) - toolStripMenuItem2.Checked = true; - toolStripMenuItem2.Click += new EventHandler(this.TrayMenu_SwitchEffectMode); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem2); - ToolStripMenuItem toolStripMenuItem3 = new ToolStripMenuItem(); - toolStripMenuItem3.Text = GlobalMessages.FREESTYLE_MODE; - toolStripMenuItem3.Tag = (object) "FREESTYLE_MODE"; - if (this.m_paramBaseSystem.m_nEffectMode == 2U) - toolStripMenuItem3.Checked = true; - toolStripMenuItem3.Click += new EventHandler(this.TrayMenu_SwitchEffectMode); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem3); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) new ToolStripSeparator()); - ToolStripMenuItem toolStripMenuItem4 = new ToolStripMenuItem(); - if (this.m_paramBaseSystem.m_bEffectEnabled == 0) - toolStripMenuItem4.Text = GlobalMessages.SWITCH_ON_EFFECT; - else - toolStripMenuItem4.Text = GlobalMessages.SWITCH_OFF_EFFECT; - toolStripMenuItem4.Click += new EventHandler(this.TrayMenu_SwitchEffectOnOff); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem4); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) new ToolStripSeparator()); - ToolStripMenuItem toolStripMenuItem5 = new ToolStripMenuItem(); - toolStripMenuItem5.Text = GlobalMessages.EXIT_APPLICTION; - toolStripMenuItem5.Click += new EventHandler(this.TrayMenu_ExitApplication); - this.contextMenuStrip_TrayMenu.Items.Add((ToolStripItem) toolStripMenuItem5); - } + private void SetupTrayMenu() + { + contextMenuStrip_TrayMenu.Items.Clear(); + bool flag = false; + for (int index = 0; index < m_lstTrayMenuPreset.Count; ++index) + { + if (m_lstTrayMenuPreset[index].Valid()) + { + ToolStripMenuItem ToolStripMenuItem = new ToolStripMenuItem + { + Text = m_lstTrayMenuPreset[index].PresetName, + Tag = m_lstTrayMenuPreset[index] + }; + ToolStripMenuItem.Click += new EventHandler(TrayMenu_SelectPreset); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem); + flag = true; + } + } + if (flag) + contextMenuStrip_TrayMenu.Items.Add(new ToolStripSeparator()); + ToolStripMenuItem ToolStripMenuItem1 = new ToolStripMenuItem + { + Text = GlobalMessages.MUSIC_MODE, + Tag = "MUSIC_MODE" + }; + if (m_paramBaseSystem.m_nEffectMode == 0U) + ToolStripMenuItem1.Checked = true; + ToolStripMenuItem1.Click += new EventHandler(TrayMenu_SwitchEffectMode); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem1); + ToolStripMenuItem ToolStripMenuItem2 = new ToolStripMenuItem + { + Text = GlobalMessages.MOVIE_MODE, + Tag = "MOVIE_MODE" + }; + if (m_paramBaseSystem.m_nEffectMode == 1U) + ToolStripMenuItem2.Checked = true; + ToolStripMenuItem2.Click += new EventHandler(TrayMenu_SwitchEffectMode); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem2); + ToolStripMenuItem ToolStripMenuItem3 = new ToolStripMenuItem + { + Text = GlobalMessages.FREESTYLE_MODE, + Tag = "FREESTYLE_MODE" + }; + if (m_paramBaseSystem.m_nEffectMode == 2U) + ToolStripMenuItem3.Checked = true; + ToolStripMenuItem3.Click += new EventHandler(TrayMenu_SwitchEffectMode); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem3); + contextMenuStrip_TrayMenu.Items.Add(new ToolStripSeparator()); + ToolStripMenuItem ToolStripMenuItem4 = new ToolStripMenuItem(); + if (m_paramBaseSystem.m_bEffectEnabled == 0) + ToolStripMenuItem4.Text = GlobalMessages.SWITCH_ON_EFFECT; + else + ToolStripMenuItem4.Text = GlobalMessages.SWITCH_OFF_EFFECT; + ToolStripMenuItem4.Click += new EventHandler(TrayMenu_SwitchEffectOnOff); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem4); + contextMenuStrip_TrayMenu.Items.Add(new ToolStripSeparator()); + ToolStripMenuItem ToolStripMenuItem5 = new ToolStripMenuItem + { + Text = GlobalMessages.EXIT_APPLICTION + }; + ToolStripMenuItem5.Click += new EventHandler(TrayMenu_ExitApplication); + contextMenuStrip_TrayMenu.Items.Add(ToolStripMenuItem5); + } - private void TrayMenu_ExitApplication(object sender, EventArgs e) - { - Parameters.SaveLocalPreset(this.m_szLocalPreset, this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle); - this.SaveAppSettings(); - Application.Exit(); - } + private void TrayMenu_ExitApplication(object sender, EventArgs e) + { + Parameters.SaveLocalPreset(m_szLocalPreset, m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle); + SaveAppSettings(); + Application.Exit(); + } - private void TrayMenu_SwitchEffectOnOff(object sender, EventArgs e) - { - if (sender == null || sender.GetType() != typeof (ToolStripMenuItem)) - return; - ToolStripMenuItem toolStripMenuItem = sender as ToolStripMenuItem; - this.m_paramBaseSystem.m_bEffectEnabled = this.m_paramBaseSystem.m_bEffectEnabled != 0 ? 0 : 1; - if (this.m_paramBaseSystem.m_bEffectEnabled == 0) - toolStripMenuItem.Text = GlobalMessages.SWITCH_ON_EFFECT; - else - toolStripMenuItem.Text = GlobalMessages.SWITCH_OFF_EFFECT; - this.UpdateAllControlsFromParameters(); - } + private void TrayMenu_SwitchEffectOnOff(object sender, EventArgs e) + { + if (sender == null || sender.GetType() != typeof(ToolStripMenuItem)) + return; + ToolStripMenuItem ToolStripMenuItem = sender as ToolStripMenuItem; + m_paramBaseSystem.m_bEffectEnabled = m_paramBaseSystem.m_bEffectEnabled != 0 ? 0 : 1; + if (m_paramBaseSystem.m_bEffectEnabled == 0) + ToolStripMenuItem.Text = GlobalMessages.SWITCH_ON_EFFECT; + else + ToolStripMenuItem.Text = GlobalMessages.SWITCH_OFF_EFFECT; + UpdateAllControlsFromParameters(); + } - private void TrayMenu_SwitchEffectMode(object sender, EventArgs e) - { - if (sender == null || sender.GetType() != typeof (ToolStripMenuItem)) - return; - ToolStripMenuItem toolStripMenuItem1 = sender as ToolStripMenuItem; - if (toolStripMenuItem1.Tag == null || toolStripMenuItem1.Tag.GetType() != typeof (string)) - return; - string tag1 = toolStripMenuItem1.Tag as string; - if (string.IsNullOrEmpty(tag1)) - return; - ToolStripMenuItem toolStripMenuItem2 = (ToolStripMenuItem) null; - ToolStripMenuItem toolStripMenuItem3 = (ToolStripMenuItem) null; - ToolStripMenuItem toolStripMenuItem4 = (ToolStripMenuItem) null; - foreach (object obj in (ArrangedElementCollection) this.contextMenuStrip_TrayMenu.Items) - { - if (obj != null && obj.GetType() == typeof (ToolStripMenuItem)) - { - ToolStripMenuItem toolStripMenuItem5 = obj as ToolStripMenuItem; - if (toolStripMenuItem5.Tag != null && toolStripMenuItem5.Tag.GetType() == typeof (string)) - { - string tag2 = toolStripMenuItem5.Tag as string; - if (!string.IsNullOrEmpty(tag2)) + private void TrayMenu_SwitchEffectMode(object sender, EventArgs e) + { + if (sender == null || sender.GetType() != typeof(ToolStripMenuItem)) + return; + ToolStripMenuItem ToolStripMenuItem1 = sender as ToolStripMenuItem; + if (ToolStripMenuItem1.Tag == null || ToolStripMenuItem1.Tag.GetType() != typeof(string)) + return; + string tag1 = ToolStripMenuItem1.Tag as string; + if (string.IsNullOrEmpty(tag1)) + return; + ToolStripMenuItem ToolStripMenuItem2 = null; + ToolStripMenuItem ToolStripMenuItem3 = null; + ToolStripMenuItem ToolStripMenuItem4 = null; + foreach (object obj in (ArrangedElementCollection)contextMenuStrip_TrayMenu.Items) + { + if (obj != null && obj.GetType() == typeof(ToolStripMenuItem)) + { + ToolStripMenuItem ToolStripMenuItem5 = obj as ToolStripMenuItem; + if (ToolStripMenuItem5.Tag != null && ToolStripMenuItem5.Tag.GetType() == typeof(string)) + { + string tag2 = ToolStripMenuItem5.Tag as string; + if (!string.IsNullOrEmpty(tag2)) + { + switch (tag2) + { + case "MUSIC_MODE": + ToolStripMenuItem2 = ToolStripMenuItem5; + continue; + case "MOVIE_MODE": + ToolStripMenuItem3 = ToolStripMenuItem5; + continue; + case "FREESTYLE_MODE": + ToolStripMenuItem4 = ToolStripMenuItem5; + continue; + default: + continue; + } + } + } + } + } + if (ToolStripMenuItem2 == null || ToolStripMenuItem3 == null || ToolStripMenuItem4 == null) + return; + switch (tag1) { - switch (tag2) - { case "MUSIC_MODE": - toolStripMenuItem2 = toolStripMenuItem5; - continue; + ToolStripMenuItem2.Checked = true; + ToolStripMenuItem3.Checked = false; + ToolStripMenuItem4.Checked = false; + m_paramBaseSystem.m_nEffectMode = 0U; + UpdateAllControlsFromParameters(); + break; case "MOVIE_MODE": - toolStripMenuItem3 = toolStripMenuItem5; - continue; + ToolStripMenuItem2.Checked = false; + ToolStripMenuItem3.Checked = true; + ToolStripMenuItem4.Checked = false; + m_paramBaseSystem.m_nEffectMode = 1U; + UpdateAllControlsFromParameters(); + break; case "FREESTYLE_MODE": - toolStripMenuItem4 = toolStripMenuItem5; - continue; - default: - continue; - } + ToolStripMenuItem2.Checked = false; + ToolStripMenuItem3.Checked = false; + ToolStripMenuItem4.Checked = true; + m_paramBaseSystem.m_nEffectMode = 2U; + UpdateAllControlsFromParameters(); + break; } - } - } - } - if (toolStripMenuItem2 == null || toolStripMenuItem3 == null || toolStripMenuItem4 == null) - return; - switch (tag1) - { - case "MUSIC_MODE": - toolStripMenuItem2.Checked = true; - toolStripMenuItem3.Checked = false; - toolStripMenuItem4.Checked = false; - this.m_paramBaseSystem.m_nEffectMode = 0U; - this.UpdateAllControlsFromParameters(); - break; - case "MOVIE_MODE": - toolStripMenuItem2.Checked = false; - toolStripMenuItem3.Checked = true; - toolStripMenuItem4.Checked = false; - this.m_paramBaseSystem.m_nEffectMode = 1U; - this.UpdateAllControlsFromParameters(); - break; - case "FREESTYLE_MODE": - toolStripMenuItem2.Checked = false; - toolStripMenuItem3.Checked = false; - toolStripMenuItem4.Checked = true; - this.m_paramBaseSystem.m_nEffectMode = 2U; - this.UpdateAllControlsFromParameters(); - break; - } - } + } - private void TrayMenu_SelectPreset(object sender, EventArgs e) - { - if (sender == null || sender.GetType() != typeof (ToolStripMenuItem)) - return; - ToolStripMenuItem toolStripMenuItem1 = sender as ToolStripMenuItem; - if (toolStripMenuItem1.Tag == null || toolStripMenuItem1.Tag.GetType() != typeof (TrayMenuPreset)) - return; - TrayMenuPreset tag1 = toolStripMenuItem1.Tag as TrayMenuPreset; - if (!tag1.Valid()) - return; - this.m_paramBaseSystem.m_nEffectMode = (uint) tag1.PresetMode; - ToolStripMenuItem toolStripMenuItem2 = (ToolStripMenuItem) null; - ToolStripMenuItem toolStripMenuItem3 = (ToolStripMenuItem) null; - ToolStripMenuItem toolStripMenuItem4 = (ToolStripMenuItem) null; - foreach (object obj in (ArrangedElementCollection) this.contextMenuStrip_TrayMenu.Items) - { - if (obj != null && obj.GetType() == typeof (ToolStripMenuItem)) - { - ToolStripMenuItem toolStripMenuItem5 = obj as ToolStripMenuItem; - if (toolStripMenuItem5.Tag != null && toolStripMenuItem5.Tag.GetType() == typeof (string)) - { - string tag2 = toolStripMenuItem5.Tag as string; - if (!string.IsNullOrEmpty(tag2)) + private void TrayMenu_SelectPreset(object sender, EventArgs e) + { + if (sender == null || sender.GetType() != typeof(ToolStripMenuItem)) + return; + ToolStripMenuItem ToolStripMenuItem1 = sender as ToolStripMenuItem; + if (ToolStripMenuItem1.Tag == null || ToolStripMenuItem1.Tag.GetType() != typeof(TrayMenuPreset)) + return; + TrayMenuPreset tag1 = ToolStripMenuItem1.Tag as TrayMenuPreset; + if (!tag1.Valid()) + return; + m_paramBaseSystem.m_nEffectMode = (uint)tag1.PresetMode; + ToolStripMenuItem ToolStripMenuItem2 = null; + ToolStripMenuItem ToolStripMenuItem3 = null; + ToolStripMenuItem ToolStripMenuItem4 = null; + foreach (object obj in (ArrangedElementCollection)contextMenuStrip_TrayMenu.Items) { - switch (tag2) - { - case "MUSIC_MODE": - toolStripMenuItem2 = toolStripMenuItem5; - continue; - case "MOVIE_MODE": - toolStripMenuItem3 = toolStripMenuItem5; - continue; - case "FREESTYLE_MODE": - toolStripMenuItem4 = toolStripMenuItem5; - continue; - default: - continue; - } + if (obj != null && obj.GetType() == typeof(ToolStripMenuItem)) + { + ToolStripMenuItem ToolStripMenuItem5 = obj as ToolStripMenuItem; + if (ToolStripMenuItem5.Tag != null && ToolStripMenuItem5.Tag.GetType() == typeof(string)) + { + string tag2 = ToolStripMenuItem5.Tag as string; + if (!string.IsNullOrEmpty(tag2)) + { + switch (tag2) + { + case "MUSIC_MODE": + ToolStripMenuItem2 = ToolStripMenuItem5; + continue; + case "MOVIE_MODE": + ToolStripMenuItem3 = ToolStripMenuItem5; + continue; + case "FREESTYLE_MODE": + ToolStripMenuItem4 = ToolStripMenuItem5; + continue; + default: + continue; + } + } + } + } } - } - } - } - if (toolStripMenuItem2 == null || toolStripMenuItem3 == null || toolStripMenuItem4 == null) - return; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - { - toolStripMenuItem2.Checked = true; - toolStripMenuItem3.Checked = false; - toolStripMenuItem4.Checked = false; - } - else if (this.m_paramBaseSystem.m_nEffectMode == 1U) - { - toolStripMenuItem2.Checked = false; - toolStripMenuItem3.Checked = true; - toolStripMenuItem4.Checked = false; - } - else if (this.m_paramBaseSystem.m_nEffectMode == 2U) - { - toolStripMenuItem2.Checked = false; - toolStripMenuItem3.Checked = false; - toolStripMenuItem4.Checked = true; - } - if (!tag1.PresetLoadable()) - return; - RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramOfBaseSystem = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - RuntimeUtils.ConfigProxy._ParamOfMusicMode paramOfMusicMode = new RuntimeUtils.ConfigProxy._ParamOfMusicMode(); - RuntimeUtils.ConfigProxy._ParamOfMovieMode paramOfMovieMode = new RuntimeUtils.ConfigProxy._ParamOfMovieMode(); - RuntimeUtils.ConfigProxy._ParamOfFreestyle paramOfFreestyle = new RuntimeUtils.ConfigProxy._ParamOfFreestyle(); - Parameters.LoadDefaultParameter(ref paramOfBaseSystem); - Parameters.LoadDefaultParameter(ref paramOfMusicMode); - Parameters.LoadDefaultParameter(ref paramOfMovieMode); - Parameters.LoadDefaultParameter(ref paramOfFreestyle); - bool bPBaseSystem = false; - bool bPMusicMode = false; - bool bPMovieMode = false; - bool bPFreestyle = false; - if (!Parameters.ReadPreset(tag1.PresetFile, ref paramOfBaseSystem, ref paramOfMusicMode, ref paramOfMovieMode, ref paramOfFreestyle, out bPBaseSystem, out bPMusicMode, out bPMovieMode, out bPFreestyle)) - { - int num = (int) MessageBox.Show(GlobalMessages.CANT_LOAD_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); - } - else - { - if (!bPMusicMode && !bPMovieMode && !bPFreestyle) - return; - if (bPMusicMode) - this.m_paramMusicMode = paramOfMusicMode; - if (bPMovieMode) - this.m_paramMovieMode = paramOfMovieMode; - if (bPFreestyle) - this.m_paramFreestyle = paramOfFreestyle; - this.UpdateAllControlsFromParameters(); - } - } + if (ToolStripMenuItem2 == null || ToolStripMenuItem3 == null || ToolStripMenuItem4 == null) + return; + if (m_paramBaseSystem.m_nEffectMode == 0U) + { + ToolStripMenuItem2.Checked = true; + ToolStripMenuItem3.Checked = false; + ToolStripMenuItem4.Checked = false; + } + else if (m_paramBaseSystem.m_nEffectMode == 1U) + { + ToolStripMenuItem2.Checked = false; + ToolStripMenuItem3.Checked = true; + ToolStripMenuItem4.Checked = false; + } + else if (m_paramBaseSystem.m_nEffectMode == 2U) + { + ToolStripMenuItem2.Checked = false; + ToolStripMenuItem3.Checked = false; + ToolStripMenuItem4.Checked = true; + } + if (!tag1.PresetLoadable()) + return; + RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramOfBaseSystem = new RuntimeUtils.ConfigProxy.ParamOfBaseSystem(); + RuntimeUtils.ConfigProxy.ParamOfMusicMode paramOfMusicMode = new RuntimeUtils.ConfigProxy.ParamOfMusicMode(); + RuntimeUtils.ConfigProxy.ParamOfMovieMode paramOfMovieMode = new RuntimeUtils.ConfigProxy.ParamOfMovieMode(); + RuntimeUtils.ConfigProxy.ParamOfFreestyle paramOfFreestyle = new RuntimeUtils.ConfigProxy.ParamOfFreestyle(); + Parameters.LoadDefaultParameter(ref paramOfBaseSystem); + Parameters.LoadDefaultParameter(ref paramOfMusicMode); + Parameters.LoadDefaultParameter(ref paramOfMovieMode); + Parameters.LoadDefaultParameter(ref paramOfFreestyle); + if (!Parameters.ReadPreset(tag1.PresetFile, ref paramOfBaseSystem, ref paramOfMusicMode, ref paramOfMovieMode, ref paramOfFreestyle, out _, out bool bPMusicMode, out bool bPMovieMode, out bool bPFreestyle)) + { + _ = (int)MessageBox.Show(GlobalMessages.CANT_LOAD_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + else + { + if (!bPMusicMode && !bPMovieMode && !bPFreestyle) + return; + if (bPMusicMode) + m_paramMusicMode = paramOfMusicMode; + if (bPMovieMode) + m_paramMovieMode = paramOfMovieMode; + if (bPFreestyle) + m_paramFreestyle = paramOfFreestyle; + UpdateAllControlsFromParameters(); + } + } - private void frmMain_Load(object sender, EventArgs e) - { - if (!this.m_bArgvStartupToMinimized) - return; - this.SetupTrayMenu(); - this.WindowState = FormWindowState.Minimized; - this.Hide(); - this.ShowInTaskbar = false; - this.notifyIcon_Main.Visible = true; - } + private void FrmMain_Load(object sender, EventArgs e) + { + if (!m_bArgvStartupToMinimized) + return; + SetupTrayMenu(); + WindowState = FormWindowState.Minimized; + Hide(); + ShowInTaskbar = false; + notifyIcon_Main.Visible = true; + } - private void frmMain_FormClosing(object sender, FormClosingEventArgs e) - { - Parameters.SaveLocalPreset(this.m_szLocalPreset, this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle); - this.SaveAppSettings(); - if (!this.m_bCloseToTray || e.CloseReason != CloseReason.UserClosing) - return; - this.SetupTrayMenu(); - e.Cancel = true; - this.WindowState = FormWindowState.Minimized; - this.Hide(); - this.ShowInTaskbar = false; - this.notifyIcon_Main.Visible = true; - } + private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) + { + Parameters.SaveLocalPreset(m_szLocalPreset, m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle); + SaveAppSettings(); + if (!m_bCloseToTray || e.CloseReason != CloseReason.UserClosing) + return; + SetupTrayMenu(); + e.Cancel = true; + WindowState = FormWindowState.Minimized; + Hide(); + ShowInTaskbar = false; + notifyIcon_Main.Visible = true; + } - private void frmMain_SizeChanged(object sender, EventArgs e) - { - if (this.WindowState != FormWindowState.Minimized) - return; - Parameters.SaveLocalPreset(this.m_szLocalPreset, this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle); - this.SetupTrayMenu(); - this.Hide(); - this.ShowInTaskbar = false; - this.notifyIcon_Main.Visible = true; - } + private void FrmMain_SizeChanged(object sender, EventArgs e) + { + if (WindowState != FormWindowState.Minimized) + return; + Parameters.SaveLocalPreset(m_szLocalPreset, m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle); + SetupTrayMenu(); + Hide(); + ShowInTaskbar = false; + notifyIcon_Main.Visible = true; + } - private void notifyIcon_Main_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left || this.WindowState != FormWindowState.Minimized) - return; - this.ShowInTaskbar = true; - this.Show(); - this.WindowState = FormWindowState.Normal; - this.Activate(); - this.notifyIcon_Main.Visible = false; - } + private void NotifyIcon_Main_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left || WindowState != FormWindowState.Minimized) + return; + ShowInTaskbar = true; + Show(); + WindowState = FormWindowState.Normal; + Activate(); + notifyIcon_Main.Visible = false; + } - private float PostVolumeToFloat(float fPostVolume) => fPostVolume / 6f; + private float PostVolumeToFloat(float fPostVolume) + { + return fPostVolume / 6f; + } - private float FloatToPostVolume(float fValue) => fValue * 6f; + private float FloatToPostVolume(float fValue) + { + return fValue * 6f; + } - private float BassSpeakerSizeToFloat(int nSpkSize) => 1f - (float) (((double) nSpkSize - 40.0) / 85.0); + private float BassSpeakerSizeToFloat(int nSpkSize) + { + return 1f - (float)((nSpkSize - 40.0) / 85.0); + } - private int FloatToBassSpeakerSize(float fValue) - { - fValue = 1f - fValue; - int bassSpeakerSize = (int) ((double) fValue * 85.0 + 40.0); - if (bassSpeakerSize < 40) - bassSpeakerSize = 40; - if (bassSpeakerSize > 125) - bassSpeakerSize = 125; - return bassSpeakerSize; - } + private int FloatToBassSpeakerSize(float fValue) + { + fValue = 1f - fValue; + int bassSpeakerSize = (int)((double)fValue * 85.0 + 40.0); + if (bassSpeakerSize < 40) + bassSpeakerSize = 40; + if (bassSpeakerSize > 125) + bassSpeakerSize = 125; + return bassSpeakerSize; + } - private float BassGainToFloat(float fBassGain) => fBassGain / 7f; + private float BassGainToFloat(float fBassGain) + { + return fBassGain / 7f; + } - private float FloatToBassGain(float fValue) => fValue * 7f; + private float FloatToBassGain(float fValue) + { + return fValue * 7f; + } - private float ClarityToFloat(float fClarity) => fClarity / 2f; + private float ClarityToFloat(float fClarity) + { + return fClarity / 2f; + } - public float FloatToClarity(float fValue) => fValue * 2f; + public float FloatToClarity(float fValue) + { + return fValue * 2f; + } - public float Surround3DToFloat(float fSurround3D) - { - float num = (float) (((double) fSurround3D - 1.0) / 2.0); - if ((double) num < 0.0) - num = 0.0f; - if ((double) num > 1.0) - num = 1f; - return num; - } + public float Surround3DToFloat(float fSurround3D) + { + float num = (float)(((double)fSurround3D - 1.0) / 2.0); + if ((double)num < 0.0) + num = 0.0f; + if ((double)num > 1.0) + num = 1f; + return num; + } - public float FloatToSurround3D(float fValue) => (float) ((double) fValue * 2.0 + 1.0); + public float FloatToSurround3D(float fValue) + { + return (float)((double)fValue * 2.0 + 1.0); + } - public float SVCSToFloat(float fSVCS) => (float) (((double) fSVCS - 0.5) / 4.5); + public float SVCSToFloat(float fSVCS) + { + return (float)(((double)fSVCS - 0.5) / 4.5); + } - public float FloatToSVCS(float fValue) => (float) ((double) fValue * 4.5 + 0.5); + public float FloatToSVCS(float fValue) + { + return (float)((double)fValue * 4.5 + 0.5); + } - public float SVMaxLevelToFloat(float fSVMaxLevel) => (float) (((double) fSVMaxLevel - 1.0) / 9.0); + public float SVMaxLevelToFloat(float fSVMaxLevel) + { + return (float)(((double)fSVMaxLevel - 1.0) / 9.0); + } - public float FloatToSVMaxLevel(float fValue) => (float) ((double) fValue * 9.0 + 1.0); + public float FloatToSVMaxLevel(float fValue) + { + return (float)((double)fValue * 9.0 + 1.0); + } - public float SVLevelToFloat(float fSVLevel) => (float) (((double) fSVLevel - 0.20000000298023224) / 0.800000011920929); + public float SVLevelToFloat(float fSVLevel) + { + return (float)(((double)fSVLevel - 0.20000000298023224) / 0.800000011920929); + } - public float FloatToSVLevel(float fValue) => (float) ((double) fValue * 0.800000011920929 + 0.20000000298023224); + public float FloatToSVLevel(float fValue) + { + return (float)((double)fValue * 0.800000011920929 + 0.20000000298023224); + } - private void LanguageChanged(object sender, EventArgs e) - { - try - { - if (!((sender as ToolStripMenuItem).Tag is string tag) || !(tag != "")) - return; - string szValue = new ConfigFile(tag).ReadConfig("$LANGUAGE_NAME"); - if (szValue == "") - return; - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; - if (!baseDirectory.EndsWith("\\")) - baseDirectory += "\\"; - new ConfigFile(baseDirectory + "Config.ini").SetConfig("$LANGUAGE_NAME", szValue); - if (MessageBox.Show(GlobalMessages.LANGUAGE_CHANGE_NOTICE, GlobalMessages.INFORMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - return; - Application.Exit(); - } - catch - { - } - } + private void LanguageChanged(object sender, EventArgs e) + { + try + { + if (!((sender as ToolStripMenuItem).Tag is string tag) || !(tag != "")) + return; + string szValue = new ConfigFile(tag).ReadConfig("$LANGUAGE_NAME"); + if (szValue == "") + return; + string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if (!baseDirectory.EndsWith("\\")) + baseDirectory += "\\"; + new ConfigFile(baseDirectory + "Config.ini").SetConfig("$LANGUAGE_NAME", szValue); + if (MessageBox.Show(GlobalMessages.LANGUAGE_CHANGE_NOTICE, GlobalMessages.INFORMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + return; + Application.Exit(); + } + catch + { + } + } - private void UpdateAllControlsFromParameters() - { - this.onOffSwitch_Master.SwitchedOn = this.m_paramBaseSystem.m_bEffectEnabled != 0; - if (this.m_paramBaseSystem.m_nEffectMode == 0U) - this.buttonBox_Mode.SelectItem(0); - else if (this.m_paramBaseSystem.m_nEffectMode == 1U) - this.buttonBox_Mode.SelectItem(1); - else if (this.m_paramBaseSystem.m_nEffectMode == 2U) - this.buttonBox_Mode.SelectItem(2); - this.Music_hSlider_PreVolume.PositionFloat = this.m_paramMusicMode.m_rPreVolume; - this.Music_hSlider_PostVolume.PositionFloat = this.PostVolumeToFloat(this.m_paramMusicMode.m_rPostVolume); - this.Music_onOffSwitch_Convolver.SwitchedOn = this.m_paramMusicMode.m_bConvolverEnabled != 0; - this.Music_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(this.m_paramMusicMode.m_szConvolverIR); - this.Music_hSlider_ConvIRGain.PositionFloat = this.m_paramMusicMode.m_rConvolverIRGain; - this.Music_onOffSwitch_Surround.SwitchedOn = this.m_paramMusicMode.m_bSurroundEnabled != 0; - this.Music_buttonBox_SurroundRoomSize.SelectItem(this.m_paramMusicMode.m_nVHERoomSize); - this.Music_onOffSwitch_Bass.SwitchedOn = this.m_paramMusicMode.m_bViPERBassEnabled != 0; - this.Music_hSlider_BassSpkSize.PositionFloat = this.BassSpeakerSizeToFloat(this.m_paramMusicMode.m_nViPERBassSpkSize); - this.Music_hSlider_BassGain.PositionFloat = this.BassGainToFloat(this.m_paramMusicMode.m_rViPERBassFactor); - this.Music_onOffSwitch_Clarity.SwitchedOn = this.m_paramMusicMode.m_bViPERClarityEnabled != 0; - this.Music_buttonBox_ClarityMode.SelectItem(this.m_paramMusicMode.m_nViPERClarityMode); - this.Music_hSlider_Clarity.PositionFloat = this.ClarityToFloat(this.m_paramMusicMode.m_rViPERClarityFactor); - this.Music_onOffSwitch_Cure.SwitchedOn = this.m_paramMusicMode.m_bCureEnabled != 0; - if (this.m_paramMusicMode.m_uiCureLevel == 6226570U) - this.Music_buttonBox_CureLevel.SelectItem(0); - else if (this.m_paramMusicMode.m_uiCureLevel == 3932860U) - this.Music_buttonBox_CureLevel.SelectItem(1); - else if (this.m_paramMusicMode.m_uiCureLevel == 2949820U) - this.Music_buttonBox_CureLevel.SelectItem(2); - this.Music_onOffSwitch_Tube.SwitchedOn = this.m_paramMusicMode.m_bTubeEnabled != 0; - this.Music_onOffSwitch_Reverb.SwitchedOn = this.m_paramMusicMode.m_bReverbEnabled != 0; - this.Music_hSlider_ReverbSize.PositionFloat = this.m_paramMusicMode.m_rReverbSize; - this.Music_hSlider_ReverbDamping.PositionFloat = this.m_paramMusicMode.m_rReverbDamping; - this.Music_hSlider_ReverbDensity.PositionFloat = this.m_paramMusicMode.m_rReverbDensity; - this.Music_hSlider_ReverbBandWidth.PositionFloat = this.m_paramMusicMode.m_rReverbBandwidth; - this.Music_hSlider_ReverbDecay.PositionFloat = this.m_paramMusicMode.m_rReverbDecay; - this.Music_hSlider_ReverbPreDelay.PositionFloat = this.m_paramMusicMode.m_rReverbPredelay; - this.Music_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramMusicMode.m_rReverbEarlyMix; - this.Music_hSlider_ReverbMix.PositionFloat = this.m_paramMusicMode.m_rReverbMix; - this.Movie_hSlider_PreVolume.PositionFloat = this.m_paramMovieMode.m_rPreVolume; - this.Movie_hSlider_PostVolume.PositionFloat = this.PostVolumeToFloat(this.m_paramMovieMode.m_rPostVolume); - this.Movie_onOffSwitch_Convolver.SwitchedOn = this.m_paramMovieMode.m_bConvolverEnabled != 0; - this.Movie_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(this.m_paramMovieMode.m_szConvolverIR); - this.Movie_hSlider_ConvIRGain.PositionFloat = this.m_paramMovieMode.m_rConvolverIRGain; - this.Movie_onOffSwitch_Surround.SwitchedOn = this.m_paramMovieMode.m_bSurroundEnabled != 0; - this.Movie_hSlider_Surround3D.PositionFloat = this.Surround3DToFloat(this.m_paramMovieMode.m_r3DSurroundStereo); - this.Movie_hSlider_SurroundImage.PositionFloat = this.Surround3DToFloat(this.m_paramMovieMode.m_r3DSurroundImage); - this.Movie_onOffSwitch_Bass.SwitchedOn = this.m_paramMovieMode.m_bViPERBassEnabled != 0; - this.Movie_hSlider_BassSpkSize.PositionFloat = this.BassSpeakerSizeToFloat(this.m_paramMovieMode.m_nViPERBassSpkSize); - this.Movie_hSlider_BassGain.PositionFloat = this.BassGainToFloat(this.m_paramMovieMode.m_rViPERBassFactor); - this.Movie_onOffSwitch_Clarity.SwitchedOn = this.m_paramMovieMode.m_bViPERClarityEnabled != 0; - this.Movie_hSlider_Clarity.PositionFloat = this.ClarityToFloat(this.m_paramMovieMode.m_rViPERClarityFactor); - this.Movie_onOffSwitch_SmartVolume.SwitchedOn = this.m_paramMovieMode.m_bSmartVolumeEnabled != 0; - this.Movie_hSlider_SmartVolumeRatio.PositionFloat = this.SVCSToFloat(this.m_paramMovieMode.m_rSVRatio); - this.Movie_hSlider_SmartVolumeMaxLevel.PositionFloat = this.SVMaxLevelToFloat(this.m_paramMovieMode.m_rSVMaxGain); - this.Movie_hSlider_SmartVolumeLevel.PositionFloat = this.SVLevelToFloat(this.m_paramMovieMode.m_rSVVolume); - this.Movie_onOffSwitch_Reverb.SwitchedOn = this.m_paramMovieMode.m_bReverbEnabled != 0; - this.Movie_hSlider_ReverbSize.PositionFloat = this.m_paramMovieMode.m_rReverbSize; - this.Movie_hSlider_ReverbDamping.PositionFloat = this.m_paramMovieMode.m_rReverbDamping; - this.Movie_hSlider_ReverbDensity.PositionFloat = this.m_paramMovieMode.m_rReverbDensity; - this.Movie_hSlider_ReverbBandWidth.PositionFloat = this.m_paramMovieMode.m_rReverbBandwidth; - this.Movie_hSlider_ReverbDecay.PositionFloat = this.m_paramMovieMode.m_rReverbDecay; - this.Movie_hSlider_ReverbPreDelay.PositionFloat = this.m_paramMovieMode.m_rReverbPredelay; - this.Movie_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramMovieMode.m_rReverbEarlyMix; - this.Movie_hSlider_ReverbMix.PositionFloat = this.m_paramMovieMode.m_rReverbMix; - this.Freestyle_hSlider_PreVolume.PositionFloat = this.m_paramFreestyle.m_rPreVolume; - this.Freestyle_hSlider_PostVolume.PositionFloat = this.PostVolumeToFloat(this.m_paramFreestyle.m_rPostVolume); - this.Freestyle_onOffSwitch_Convolver.SwitchedOn = this.m_paramFreestyle.m_bConvolverEnabled != 0; - this.Freestyle_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(this.m_paramFreestyle.m_szConvolverIR); - this.Freestyle_hSlider_ConvIRGain.PositionFloat = this.m_paramFreestyle.m_rConvolverIRGain; - this.Freestyle_onOffSwitch_Surround3D.SwitchedOn = this.m_paramFreestyle.m_b3DSurroundEnabled != 0; - this.Freestyle_hSlider_Surround3D.PositionFloat = this.Surround3DToFloat(this.m_paramFreestyle.m_r3DSurroundStereo); - this.Freestyle_hSlider_SurroundImage.PositionFloat = this.Surround3DToFloat(this.m_paramFreestyle.m_r3DSurroundImage); - this.Freestyle_onOffSwitch_SurroundVHE.SwitchedOn = this.m_paramFreestyle.m_bVHESurroundEnabled != 0; - this.Freestyle_buttonBox_SurroundVHERoomSize.SelectItem(this.m_paramFreestyle.m_nVHERoomSize); - this.Freestyle_onOffSwitch_Bass.SwitchedOn = this.m_paramFreestyle.m_bViPERBassEnabled != 0; - this.Freestyle_buttonBox_BassMode.SelectItem(this.m_paramFreestyle.m_nViPERBassMode); - this.Freestyle_hSlider_BassSpkSize.PositionFloat = this.BassSpeakerSizeToFloat(this.m_paramFreestyle.m_nViPERBassSpkSize); - this.Freestyle_hSlider_BassGain.PositionFloat = this.BassGainToFloat(this.m_paramFreestyle.m_rViPERBassFactor); - this.Freestyle_onOffSwitch_Clarity.SwitchedOn = this.m_paramFreestyle.m_bViPERClarityEnabled != 0; - this.Freestyle_buttonBox_ClarityMode.SelectItem(this.m_paramFreestyle.m_nViPERClarityMode); - this.Freestyle_hSlider_Clarity.PositionFloat = this.ClarityToFloat(this.m_paramFreestyle.m_rViPERClarityFactor); - this.Freestyle_onOffSwitch_Cure.SwitchedOn = this.m_paramFreestyle.m_bCureEnabled != 0; - if (this.m_paramFreestyle.m_uiCureLevel == 6226570U) - this.Freestyle_buttonBox_CureLevel.SelectItem(0); - else if (this.m_paramFreestyle.m_uiCureLevel == 3932860U) - this.Freestyle_buttonBox_CureLevel.SelectItem(1); - else if (this.m_paramFreestyle.m_uiCureLevel == 2949820U) - this.Freestyle_buttonBox_CureLevel.SelectItem(2); - this.Freestyle_onOffSwitch_Tube.SwitchedOn = this.m_paramFreestyle.m_bTubeEnabled != 0; - this.Freestyle_onOffSwitch_SmartVolume.SwitchedOn = this.m_paramFreestyle.m_bSmartVolumeEnabled != 0; - this.Freestyle_hSlider_SmartVolumeRatio.PositionFloat = this.SVCSToFloat(this.m_paramFreestyle.m_rSVRatio); - this.Freestyle_hSlider_SmartVolumeMaxLevel.PositionFloat = this.SVMaxLevelToFloat(this.m_paramFreestyle.m_rSVMaxGain); - this.Freestyle_hSlider_SmartVolumeLevel.PositionFloat = this.SVLevelToFloat(this.m_paramFreestyle.m_rSVVolume); - this.Freestyle_onOffSwitch_Reverb.SwitchedOn = this.m_paramFreestyle.m_bReverbEnabled != 0; - this.Freestyle_hSlider_ReverbSize.PositionFloat = this.m_paramFreestyle.m_rReverbSize; - this.Freestyle_hSlider_ReverbDamping.PositionFloat = this.m_paramFreestyle.m_rReverbDamping; - this.Freestyle_hSlider_ReverbDensity.PositionFloat = this.m_paramFreestyle.m_rReverbDensity; - this.Freestyle_hSlider_ReverbBandWidth.PositionFloat = this.m_paramFreestyle.m_rReverbBandwidth; - this.Freestyle_hSlider_ReverbDecay.PositionFloat = this.m_paramFreestyle.m_rReverbDecay; - this.Freestyle_hSlider_ReverbPreDelay.PositionFloat = this.m_paramFreestyle.m_rReverbPredelay; - this.Freestyle_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramFreestyle.m_rReverbEarlyMix; - this.Freestyle_hSlider_ReverbMix.PositionFloat = this.m_paramFreestyle.m_rReverbMix; - } + private void UpdateAllControlsFromParameters() + { + onOffSwitch_Master.SwitchedOn = m_paramBaseSystem.m_bEffectEnabled != 0; + if (m_paramBaseSystem.m_nEffectMode == 0U) + ButtonBox_Mode.SelectItem(0); + else if (m_paramBaseSystem.m_nEffectMode == 1U) + ButtonBox_Mode.SelectItem(1); + else if (m_paramBaseSystem.m_nEffectMode == 2U) + ButtonBox_Mode.SelectItem(2); + Music_hSlider_PreVolume.PositionFloat = m_paramMusicMode.m_rPreVolume; + Music_hSlider_PostVolume.PositionFloat = PostVolumeToFloat(m_paramMusicMode.m_rPostVolume); + Music_onOffSwitch_Convolver.SwitchedOn = m_paramMusicMode.m_bConvolverEnabled != 0; + Music_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(m_paramMusicMode.m_szConvolverIR); + Music_hSlider_ConvIRGain.PositionFloat = m_paramMusicMode.m_rConvolverIRGain; + Music_onOffSwitch_Surround.SwitchedOn = m_paramMusicMode.m_bSurroundEnabled != 0; + Music_ButtonBox_SurroundRoomSize.SelectItem(m_paramMusicMode.m_nVHERoomSize); + Music_onOffSwitch_Bass.SwitchedOn = m_paramMusicMode.m_bViPERBassEnabled != 0; + Music_hSlider_BassSpkSize.PositionFloat = BassSpeakerSizeToFloat(m_paramMusicMode.m_nViPERBassSpkSize); + Music_hSlider_BassGain.PositionFloat = BassGainToFloat(m_paramMusicMode.m_rViPERBassFactor); + Music_onOffSwitch_Clarity.SwitchedOn = m_paramMusicMode.m_bViPERClarityEnabled != 0; + Music_ButtonBox_ClarityMode.SelectItem(m_paramMusicMode.m_nViPERClarityMode); + Music_hSlider_Clarity.PositionFloat = ClarityToFloat(m_paramMusicMode.m_rViPERClarityFactor); + Music_onOffSwitch_Cure.SwitchedOn = m_paramMusicMode.m_bCureEnabled != 0; + if (m_paramMusicMode.m_uiCureLevel == 6226570U) + Music_ButtonBox_CureLevel.SelectItem(0); + else if (m_paramMusicMode.m_uiCureLevel == 3932860U) + Music_ButtonBox_CureLevel.SelectItem(1); + else if (m_paramMusicMode.m_uiCureLevel == 2949820U) + Music_ButtonBox_CureLevel.SelectItem(2); + Music_onOffSwitch_Tube.SwitchedOn = m_paramMusicMode.m_bTubeEnabled != 0; + Music_onOffSwitch_Reverb.SwitchedOn = m_paramMusicMode.m_bReverbEnabled != 0; + Music_hSlider_ReverbSize.PositionFloat = m_paramMusicMode.m_rReverbSize; + Music_hSlider_ReverbDamping.PositionFloat = m_paramMusicMode.m_rReverbDamping; + Music_hSlider_ReverbDensity.PositionFloat = m_paramMusicMode.m_rReverbDensity; + Music_hSlider_ReverbBandWidth.PositionFloat = m_paramMusicMode.m_rReverbBandwidth; + Music_hSlider_ReverbDecay.PositionFloat = m_paramMusicMode.m_rReverbDecay; + Music_hSlider_ReverbPreDelay.PositionFloat = m_paramMusicMode.m_rReverbPredelay; + Music_hSlider_ReverbEarlyMix.PositionFloat = m_paramMusicMode.m_rReverbEarlyMix; + Music_hSlider_ReverbMix.PositionFloat = m_paramMusicMode.m_rReverbMix; + Movie_hSlider_PreVolume.PositionFloat = m_paramMovieMode.m_rPreVolume; + Movie_hSlider_PostVolume.PositionFloat = PostVolumeToFloat(m_paramMovieMode.m_rPostVolume); + Movie_onOffSwitch_Convolver.SwitchedOn = m_paramMovieMode.m_bConvolverEnabled != 0; + Movie_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(m_paramMovieMode.m_szConvolverIR); + Movie_hSlider_ConvIRGain.PositionFloat = m_paramMovieMode.m_rConvolverIRGain; + Movie_onOffSwitch_Surround.SwitchedOn = m_paramMovieMode.m_bSurroundEnabled != 0; + Movie_hSlider_Surround3D.PositionFloat = Surround3DToFloat(m_paramMovieMode.m_r3DSurroundStereo); + Movie_hSlider_SurroundImage.PositionFloat = Surround3DToFloat(m_paramMovieMode.m_r3DSurroundImage); + Movie_onOffSwitch_Bass.SwitchedOn = m_paramMovieMode.m_bViPERBassEnabled != 0; + Movie_hSlider_BassSpkSize.PositionFloat = BassSpeakerSizeToFloat(m_paramMovieMode.m_nViPERBassSpkSize); + Movie_hSlider_BassGain.PositionFloat = BassGainToFloat(m_paramMovieMode.m_rViPERBassFactor); + Movie_onOffSwitch_Clarity.SwitchedOn = m_paramMovieMode.m_bViPERClarityEnabled != 0; + Movie_hSlider_Clarity.PositionFloat = ClarityToFloat(m_paramMovieMode.m_rViPERClarityFactor); + Movie_onOffSwitch_SmartVolume.SwitchedOn = m_paramMovieMode.m_bSmartVolumeEnabled != 0; + Movie_hSlider_SmartVolumeRatio.PositionFloat = SVCSToFloat(m_paramMovieMode.m_rSVRatio); + Movie_hSlider_SmartVolumeMaxLevel.PositionFloat = SVMaxLevelToFloat(m_paramMovieMode.m_rSVMaxGain); + Movie_hSlider_SmartVolumeLevel.PositionFloat = SVLevelToFloat(m_paramMovieMode.m_rSVVolume); + Movie_onOffSwitch_Reverb.SwitchedOn = m_paramMovieMode.m_bReverbEnabled != 0; + Movie_hSlider_ReverbSize.PositionFloat = m_paramMovieMode.m_rReverbSize; + Movie_hSlider_ReverbDamping.PositionFloat = m_paramMovieMode.m_rReverbDamping; + Movie_hSlider_ReverbDensity.PositionFloat = m_paramMovieMode.m_rReverbDensity; + Movie_hSlider_ReverbBandWidth.PositionFloat = m_paramMovieMode.m_rReverbBandwidth; + Movie_hSlider_ReverbDecay.PositionFloat = m_paramMovieMode.m_rReverbDecay; + Movie_hSlider_ReverbPreDelay.PositionFloat = m_paramMovieMode.m_rReverbPredelay; + Movie_hSlider_ReverbEarlyMix.PositionFloat = m_paramMovieMode.m_rReverbEarlyMix; + Movie_hSlider_ReverbMix.PositionFloat = m_paramMovieMode.m_rReverbMix; + Freestyle_hSlider_PreVolume.PositionFloat = m_paramFreestyle.m_rPreVolume; + Freestyle_hSlider_PostVolume.PositionFloat = PostVolumeToFloat(m_paramFreestyle.m_rPostVolume); + Freestyle_onOffSwitch_Convolver.SwitchedOn = m_paramFreestyle.m_bConvolverEnabled != 0; + Freestyle_openFileBox_ConvIRS.FilePathName = RuntimeUtils.GeneralUtils.CharArrayToString(m_paramFreestyle.m_szConvolverIR); + Freestyle_hSlider_ConvIRGain.PositionFloat = m_paramFreestyle.m_rConvolverIRGain; + Freestyle_onOffSwitch_Surround3D.SwitchedOn = m_paramFreestyle.m_b3DSurroundEnabled != 0; + Freestyle_hSlider_Surround3D.PositionFloat = Surround3DToFloat(m_paramFreestyle.m_r3DSurroundStereo); + Freestyle_hSlider_SurroundImage.PositionFloat = Surround3DToFloat(m_paramFreestyle.m_r3DSurroundImage); + Freestyle_onOffSwitch_SurroundVHE.SwitchedOn = m_paramFreestyle.m_bVHESurroundEnabled != 0; + Freestyle_ButtonBox_SurroundVHERoomSize.SelectItem(m_paramFreestyle.m_nVHERoomSize); + Freestyle_onOffSwitch_Bass.SwitchedOn = m_paramFreestyle.m_bViPERBassEnabled != 0; + Freestyle_ButtonBox_BassMode.SelectItem(m_paramFreestyle.m_nViPERBassMode); + Freestyle_hSlider_BassSpkSize.PositionFloat = BassSpeakerSizeToFloat(m_paramFreestyle.m_nViPERBassSpkSize); + Freestyle_hSlider_BassGain.PositionFloat = BassGainToFloat(m_paramFreestyle.m_rViPERBassFactor); + Freestyle_onOffSwitch_Clarity.SwitchedOn = m_paramFreestyle.m_bViPERClarityEnabled != 0; + Freestyle_ButtonBox_ClarityMode.SelectItem(m_paramFreestyle.m_nViPERClarityMode); + Freestyle_hSlider_Clarity.PositionFloat = ClarityToFloat(m_paramFreestyle.m_rViPERClarityFactor); + Freestyle_onOffSwitch_Cure.SwitchedOn = m_paramFreestyle.m_bCureEnabled != 0; + if (m_paramFreestyle.m_uiCureLevel == 6226570U) + Freestyle_ButtonBox_CureLevel.SelectItem(0); + else if (m_paramFreestyle.m_uiCureLevel == 3932860U) + Freestyle_ButtonBox_CureLevel.SelectItem(1); + else if (m_paramFreestyle.m_uiCureLevel == 2949820U) + Freestyle_ButtonBox_CureLevel.SelectItem(2); + Freestyle_onOffSwitch_Tube.SwitchedOn = m_paramFreestyle.m_bTubeEnabled != 0; + Freestyle_onOffSwitch_SmartVolume.SwitchedOn = m_paramFreestyle.m_bSmartVolumeEnabled != 0; + Freestyle_hSlider_SmartVolumeRatio.PositionFloat = SVCSToFloat(m_paramFreestyle.m_rSVRatio); + Freestyle_hSlider_SmartVolumeMaxLevel.PositionFloat = SVMaxLevelToFloat(m_paramFreestyle.m_rSVMaxGain); + Freestyle_hSlider_SmartVolumeLevel.PositionFloat = SVLevelToFloat(m_paramFreestyle.m_rSVVolume); + Freestyle_onOffSwitch_Reverb.SwitchedOn = m_paramFreestyle.m_bReverbEnabled != 0; + Freestyle_hSlider_ReverbSize.PositionFloat = m_paramFreestyle.m_rReverbSize; + Freestyle_hSlider_ReverbDamping.PositionFloat = m_paramFreestyle.m_rReverbDamping; + Freestyle_hSlider_ReverbDensity.PositionFloat = m_paramFreestyle.m_rReverbDensity; + Freestyle_hSlider_ReverbBandWidth.PositionFloat = m_paramFreestyle.m_rReverbBandwidth; + Freestyle_hSlider_ReverbDecay.PositionFloat = m_paramFreestyle.m_rReverbDecay; + Freestyle_hSlider_ReverbPreDelay.PositionFloat = m_paramFreestyle.m_rReverbPredelay; + Freestyle_hSlider_ReverbEarlyMix.PositionFloat = m_paramFreestyle.m_rReverbEarlyMix; + Freestyle_hSlider_ReverbMix.PositionFloat = m_paramFreestyle.m_rReverbMix; + } - private void toolStripMenuItem_LatencySetting_Click(object sender, EventArgs e) - { - frmLatency frmLatency = new frmLatency(); - frmLatency.ShortFilterLen = this.m_paramBaseSystem.m_nFilterShortLen; - frmLatency.MiddleFilterLen = this.m_paramBaseSystem.m_nFilterMediumLen; - frmLatency.LongFilterLen = this.m_paramBaseSystem.m_nFilterLongLen; - if (frmLatency.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramBaseSystem.m_nFilterShortLen = frmLatency.ShortFilterLen; - this.m_paramBaseSystem.m_nFilterMediumLen = frmLatency.MiddleFilterLen; - this.m_paramBaseSystem.m_nFilterLongLen = frmLatency.LongFilterLen; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } + private void ToolStripMenuItem_LatencySetting_Click(object sender, EventArgs e) + { + FrmLatency frmLatency = new FrmLatency + { + ShortFilterLen = m_paramBaseSystem.m_nFilterShortLen, + MiddleFilterLen = m_paramBaseSystem.m_nFilterMediumLen, + LongFilterLen = m_paramBaseSystem.m_nFilterLongLen + }; + if (frmLatency.ShowDialog() == DialogResult.Cancel) + return; + m_paramBaseSystem.m_nFilterShortLen = frmLatency.ShortFilterLen; + m_paramBaseSystem.m_nFilterMediumLen = frmLatency.MiddleFilterLen; + m_paramBaseSystem.m_nFilterLongLen = frmLatency.LongFilterLen; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } - private void toolStripMenuItem_ChannelPan_Click(object sender, EventArgs e) - { - frmChannelPan frmChannelPan = new frmChannelPan(); - frmChannelPan.ChannelPan = this.m_paramBaseSystem.m_rChannelPan; - int num = (int) frmChannelPan.ShowDialog(); - this.m_paramBaseSystem.m_rChannelPan = frmChannelPan.ChannelPan; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } + private void ToolStripMenuItem_ChannelPan_Click(object sender, EventArgs e) + { + FrmChannelPan frmChannelPan = new FrmChannelPan + { + ChannelPan = m_paramBaseSystem.m_rChannelPan + }; + _ = (int)frmChannelPan.ShowDialog(); + m_paramBaseSystem.m_rChannelPan = frmChannelPan.ChannelPan; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } - private void toolStripMenuItem_Virtualization_Click(object sender, EventArgs e) - { - frmVirtualization frmVirtualization = new frmVirtualization(); - frmVirtualization.SetBaseSystemParam(this.m_paramBaseSystem); - if (frmVirtualization.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramBaseSystem = frmVirtualization.GetBaseSystemParam(); - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } + private void ToolStripMenuItem_Virtualization_Click(object sender, EventArgs e) + { + FrmVirtualization frmVirtualization = new FrmVirtualization(); + frmVirtualization.SetBaseSystemParam(m_paramBaseSystem); + if (frmVirtualization.ShowDialog() == DialogResult.Cancel) + return; + m_paramBaseSystem = frmVirtualization.GetBaseSystemParam(); + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } - private void toolStripMenuItem_ResetEffect_Click(object sender, EventArgs e) - { - Parameters.LoadDefaultParameter(ref this.m_paramMusicMode); - Parameters.LoadDefaultParameter(ref this.m_paramMovieMode); - Parameters.LoadDefaultParameter(ref this.m_paramFreestyle); - this.UpdateAllControlsFromParameters(); - } + private void ToolStripMenuItem_ResetEffect_Click(object sender, EventArgs e) + { + Parameters.LoadDefaultParameter(ref m_paramMusicMode); + Parameters.LoadDefaultParameter(ref m_paramMovieMode); + Parameters.LoadDefaultParameter(ref m_paramFreestyle); + UpdateAllControlsFromParameters(); + } - private void toolStripMenuItem_Settings_Click(object sender, EventArgs e) - { - uint num1 = RegHelper.QueryDWORD("LoadChildAPO", 0U); - frmSettings frmSettings = new frmSettings(); - frmSettings.SetPresetPath(this.m_szPresetsPath); - frmSettings.SetCloseToTray(this.m_bCloseToTray); - frmSettings.SetTrayMenuPresetList(this.m_lstTrayMenuPreset); - if (frmSettings.ShowDialog() == DialogResult.Cancel) - return; - this.m_bCloseToTray = frmSettings.GetCloseToTray(); - List trayMenuPresetList = frmSettings.GetTrayMenuPresetList(); - this.m_lstTrayMenuPreset.Clear(); - foreach (TrayMenuPreset trayMenuPreset in trayMenuPresetList) - { - if (trayMenuPreset.Valid()) - { - if (string.IsNullOrEmpty(trayMenuPreset.PresetName)) - trayMenuPreset.PresetName = GlobalMessages.UNNAMED; - this.m_lstTrayMenuPreset.Add(trayMenuPreset.Clone()); - } - } - this.SaveAppSettings(); - uint uiValue = !frmSettings.GetAPOCoexistEnabled() ? 0U : 1U; - if ((int) uiValue == (int) num1) - return; - RegHelper.WriteDWORD("LoadChildAPO", uiValue); - if (uiValue == 1U) - { - int num2 = (int) MessageBox.Show(GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE1 + "\n" + GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE2 + "\n\n" + GlobalMessages.ENABLE_APO_COEXIST_RESTART, GlobalMessages.ENABLE_APO_COEXIST, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); - } - else - { - int num3 = (int) MessageBox.Show(GlobalMessages.ENABLE_APO_COEXIST_RESTART, GlobalMessages.ENABLE_APO_COEXIST, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); - } - } + private void ToolStripMenuItem_Settings_Click(object sender, EventArgs e) + { + uint num1 = RegHelper.QueryDWORD("LoadChildAPO", 0U); + FrmSettings frmSettings = new FrmSettings(); + frmSettings.SetPresetPath(m_szPresetsPath); + frmSettings.SetCloseToTray(m_bCloseToTray); + frmSettings.SetTrayMenuPresetList(m_lstTrayMenuPreset); + if (frmSettings.ShowDialog() == DialogResult.Cancel) + return; + m_bCloseToTray = frmSettings.GetCloseToTray(); + List trayMenuPresetList = frmSettings.GetTrayMenuPresetList(); + m_lstTrayMenuPreset.Clear(); + foreach (TrayMenuPreset trayMenuPreset in trayMenuPresetList) + { + if (trayMenuPreset.Valid()) + { + if (string.IsNullOrEmpty(trayMenuPreset.PresetName)) + trayMenuPreset.PresetName = GlobalMessages.UNNAMED; + m_lstTrayMenuPreset.Add(trayMenuPreset.Clone()); + } + } + SaveAppSettings(); + uint uiValue = !frmSettings.GetAPOCoexistEnabled() ? 0U : 1U; + if ((int)uiValue == (int)num1) + return; + RegHelper.WriteDWORD("LoadChildAPO", uiValue); + if (uiValue == 1U) + { + _ = (int)MessageBox.Show(GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE1 + "\n" + GlobalMessages.ENABLE_APO_COEXIST_WRN_LINE2 + "\n\n" + GlobalMessages.ENABLE_APO_COEXIST_RESTART, GlobalMessages.ENABLE_APO_COEXIST, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + } + else + { + _ = (int)MessageBox.Show(GlobalMessages.ENABLE_APO_COEXIST_RESTART, GlobalMessages.ENABLE_APO_COEXIST, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + } + } - private void toolStripMenuItem_CheckUpdate_Click(object sender, EventArgs e) - { - int num = (int) new frmCheckUpdate().ShowDialog(); - } + private void ToolStripMenuItem_CheckUpdate_Click(object sender, EventArgs e) + { + _ = (int)new FrmCheckUpdate().ShowDialog(); + } - private void toolStripMenuItem_AboutV4W_Click(object sender, EventArgs e) - { - int num = (int) new frmAbout().ShowDialog(); - } + private void ToolStripMenuItem_AboutV4W_Click(object sender, EventArgs e) + { + _ = (int)new FrmAbout().ShowDialog(); + } - private void onOffSwitch_Master_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_paramBaseSystem.m_bEffectEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } + private void OnOffSwitch_Master_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_paramBaseSystem.m_bEffectEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } - private void buttonBox_Mode_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - if (tag == 0.ToString()) - { - this.panel_MusicMode.Visible = true; - this.panel_MovieMode.Visible = false; - this.panel_Freestyle.Visible = false; - this.m_paramBaseSystem.m_nEffectMode = 0U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } - else if (tag == 1.ToString()) - { - this.panel_MusicMode.Visible = false; - this.panel_MovieMode.Visible = true; - this.panel_Freestyle.Visible = false; - this.m_paramBaseSystem.m_nEffectMode = 1U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } - else - { - if (!(tag == 2.ToString())) - return; - this.panel_MusicMode.Visible = false; - this.panel_MovieMode.Visible = false; - this.panel_Freestyle.Visible = true; - this.m_paramBaseSystem.m_nEffectMode = 2U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramBaseSystem); - this.m_cpConfigProxy.SyncConfig(); - } - } + private void ButtonBox_Mode_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (tag == 0.ToString()) + { + panel_MusicMode.Visible = true; + panel_MovieMode.Visible = false; + panel_Freestyle.Visible = false; + m_paramBaseSystem.m_nEffectMode = 0U; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } + else if (tag == 1.ToString()) + { + panel_MusicMode.Visible = false; + panel_MovieMode.Visible = true; + panel_Freestyle.Visible = false; + m_paramBaseSystem.m_nEffectMode = 1U; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } + else + { + if (!(tag == 2.ToString())) + return; + panel_MusicMode.Visible = false; + panel_MovieMode.Visible = false; + panel_Freestyle.Visible = true; + m_paramBaseSystem.m_nEffectMode = 2U; + m_cpConfigProxy.UpdateParameter(m_paramBaseSystem); + m_cpConfigProxy.SyncConfig(); + } + } - private void singleButton_LoadPreset_ButtonClickNotify(SingleButton objSender) - { - OpenFileDialog openFileDialog = new OpenFileDialog(); - openFileDialog.Title = GlobalMessages.LOAD_PRESET; - openFileDialog.Filter = "*.vpf|*.vpf"; - openFileDialog.DefaultExt = "vpf"; - openFileDialog.InitialDirectory = this.m_szPresetsPath; - if (openFileDialog.ShowDialog() == DialogResult.Cancel) - return; - RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramOfBaseSystem = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - RuntimeUtils.ConfigProxy._ParamOfMusicMode paramOfMusicMode = new RuntimeUtils.ConfigProxy._ParamOfMusicMode(); - RuntimeUtils.ConfigProxy._ParamOfMovieMode paramOfMovieMode = new RuntimeUtils.ConfigProxy._ParamOfMovieMode(); - RuntimeUtils.ConfigProxy._ParamOfFreestyle paramOfFreestyle = new RuntimeUtils.ConfigProxy._ParamOfFreestyle(); - Parameters.LoadDefaultParameter(ref paramOfBaseSystem); - Parameters.LoadDefaultParameter(ref paramOfMusicMode); - Parameters.LoadDefaultParameter(ref paramOfMovieMode); - Parameters.LoadDefaultParameter(ref paramOfFreestyle); - bool bPBaseSystem = false; - bool bPMusicMode = false; - bool bPMovieMode = false; - bool bPFreestyle = false; - if (!Parameters.ReadPreset(openFileDialog.FileName, ref paramOfBaseSystem, ref paramOfMusicMode, ref paramOfMovieMode, ref paramOfFreestyle, out bPBaseSystem, out bPMusicMode, out bPMovieMode, out bPFreestyle)) - { - int num = (int) MessageBox.Show(GlobalMessages.CANT_LOAD_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); - } - else - { - if (!bPMusicMode && !bPMovieMode && !bPFreestyle) - return; - if (bPMusicMode) - this.m_paramMusicMode = paramOfMusicMode; - if (bPMovieMode) - this.m_paramMovieMode = paramOfMovieMode; - if (bPFreestyle) - this.m_paramFreestyle = paramOfFreestyle; - this.UpdateAllControlsFromParameters(); - } - } + private void SingleButton_LoadPreset_ButtonClickNotify(SingleButton objSender) + { + OpenFileDialog openFileDialog = new OpenFileDialog + { + Title = GlobalMessages.LOAD_PRESET, + Filter = "*.vpf|*.vpf", + DefaultExt = "vpf", + InitialDirectory = m_szPresetsPath + }; + if (openFileDialog.ShowDialog() == DialogResult.Cancel) + return; + RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramOfBaseSystem = new RuntimeUtils.ConfigProxy.ParamOfBaseSystem(); + RuntimeUtils.ConfigProxy.ParamOfMusicMode paramOfMusicMode = new RuntimeUtils.ConfigProxy.ParamOfMusicMode(); + RuntimeUtils.ConfigProxy.ParamOfMovieMode paramOfMovieMode = new RuntimeUtils.ConfigProxy.ParamOfMovieMode(); + RuntimeUtils.ConfigProxy.ParamOfFreestyle paramOfFreestyle = new RuntimeUtils.ConfigProxy.ParamOfFreestyle(); + Parameters.LoadDefaultParameter(ref paramOfBaseSystem); + Parameters.LoadDefaultParameter(ref paramOfMusicMode); + Parameters.LoadDefaultParameter(ref paramOfMovieMode); + Parameters.LoadDefaultParameter(ref paramOfFreestyle); + if (!Parameters.ReadPreset(openFileDialog.FileName, ref paramOfBaseSystem, ref paramOfMusicMode, ref paramOfMovieMode, ref paramOfFreestyle, out _, out bool bPMusicMode, out bool bPMovieMode, out bool bPFreestyle)) + { + _ = (int)MessageBox.Show(GlobalMessages.CANT_LOAD_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + else + { + if (!bPMusicMode && !bPMovieMode && !bPFreestyle) + return; + if (bPMusicMode) + m_paramMusicMode = paramOfMusicMode; + if (bPMovieMode) + m_paramMovieMode = paramOfMovieMode; + if (bPFreestyle) + m_paramFreestyle = paramOfFreestyle; + UpdateAllControlsFromParameters(); + } + } - private void singleButton_SavePreset_ButtonClickNotify(SingleButton objSender) - { - SaveFileDialog saveFileDialog = new SaveFileDialog(); - saveFileDialog.Title = GlobalMessages.SAVE_PRESET; - saveFileDialog.Filter = "*.vpf|*.vpf"; - saveFileDialog.DefaultExt = "vpf"; - saveFileDialog.InitialDirectory = this.m_szPresetsPath; - if (saveFileDialog.ShowDialog() == DialogResult.Cancel) - return; - switch (this.m_paramBaseSystem.m_nEffectMode) - { - case 0: - Parameters.SavePreset(saveFileDialog.FileName, this.m_paramMusicMode); - break; - case 1: - Parameters.SavePreset(saveFileDialog.FileName, this.m_paramMovieMode); - break; - case 2: - Parameters.SavePreset(saveFileDialog.FileName, this.m_paramFreestyle); - break; - default: - int num = (int) MessageBox.Show(GlobalMessages.CANT_SAVE_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); - break; - } - } + private void SingleButton_SavePreset_ButtonClickNotify(SingleButton objSender) + { + SaveFileDialog saveFileDialog = new SaveFileDialog + { + Title = GlobalMessages.SAVE_PRESET, + Filter = "*.vpf|*.vpf", + DefaultExt = "vpf", + InitialDirectory = m_szPresetsPath + }; + if (saveFileDialog.ShowDialog() == DialogResult.Cancel) + return; + switch (m_paramBaseSystem.m_nEffectMode) + { + case 0: + Parameters.SavePreset(saveFileDialog.FileName, m_paramMusicMode); + break; + case 1: + Parameters.SavePreset(saveFileDialog.FileName, m_paramMovieMode); + break; + case 2: + Parameters.SavePreset(saveFileDialog.FileName, m_paramFreestyle); + break; + default: + _ = (int)MessageBox.Show(GlobalMessages.CANT_SAVE_PRESET, GlobalMessages.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Hand); + break; + } + } - private void Freestyle_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramFreestyle.m_rPreVolume = fPercent; - this.Freestyle_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramFreestyle.m_rPreVolume = fPercent; + Freestyle_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_PostVolume_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rPostVolume = this.FloatToPostVolume(fPercent); - this.Freestyle_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double) this.FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_PostVolume_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rPostVolume = FloatToPostVolume(fPercent); + Freestyle_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double)FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Convolver_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Convolver_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ConvIRGain_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rConvolverIRGain = fPercent; - this.Freestyle_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ConvIRGain_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rConvolverIRGain = fPercent; + Freestyle_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_openFileBox_ConvIRS_FileChangeNotify( - string szFilePathName, - OpenFileBox objSender) - { - this.m_paramFreestyle.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); - int nChannelCount = 0; - this.Freestyle_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out nChannelCount), nChannelCount); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_openFileBox_ConvIRS_FileChangeNotify( + string szFilePathName, + OpenFileBox objSender) + { + m_paramFreestyle.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); + Freestyle_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out int nChannelCount), nChannelCount); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Surround3D_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_b3DSurroundEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Surround3D_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_b3DSurroundEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_Surround3D_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_r3DSurroundStereo = this.FloatToSurround3D(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_Surround3D_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_r3DSurroundStereo = FloatToSurround3D(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_SurroundImage_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_r3DSurroundImage = this.FloatToSurround3D(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_SurroundImage_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_r3DSurroundImage = FloatToSurround3D(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_SurroundVHE_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bVHESurroundEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_SurroundVHE_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bVHESurroundEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_buttonBox_SurroundVHERoomSize_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 4) - return; - this.m_paramFreestyle.m_nVHERoomSize = result; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_ButtonBox_SurroundVHERoomSize_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 4) + return; + m_paramFreestyle.m_nVHERoomSize = result; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Bass_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Bass_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_BassSpkSize_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_nViPERBassSpkSize = this.FloatToBassSpeakerSize(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_BassSpkSize_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_nViPERBassSpkSize = FloatToBassSpeakerSize(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramFreestyle.m_rViPERBassFactor = this.FloatToBassGain(fPercent); - this.Freestyle_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double) this.FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramFreestyle.m_rViPERBassFactor = FloatToBassGain(fPercent); + Freestyle_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double)FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_buttonBox_BassMode_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 1) - return; - this.m_paramFreestyle.m_nViPERBassMode = result; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_ButtonBox_BassMode_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 1) + return; + m_paramFreestyle.m_nViPERBassMode = result; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Clarity_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Clarity_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_buttonBox_ClarityMode_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 2) - return; - this.m_paramFreestyle.m_nViPERClarityMode = result; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_ButtonBox_ClarityMode_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 2) + return; + m_paramFreestyle.m_nViPERClarityMode = result; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramFreestyle.m_rViPERClarityFactor = this.FloatToClarity(fPercent); - this.Freestyle_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double) this.FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramFreestyle.m_rViPERClarityFactor = FloatToClarity(fPercent); + Freestyle_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double)FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Cure_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bCureEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Cure_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bCureEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_buttonBox_CureLevel_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - if (tag == 6226570U.ToString()) - { - this.m_paramFreestyle.m_uiCureLevel = 6226570U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } - else if (tag == 3932860U.ToString()) - { - this.m_paramFreestyle.m_uiCureLevel = 3932860U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } - else - { - if (!(tag == 2949820U.ToString())) - return; - this.m_paramFreestyle.m_uiCureLevel = 2949820U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } - } + private void Freestyle_ButtonBox_CureLevel_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (tag == 6226570U.ToString()) + { + m_paramFreestyle.m_uiCureLevel = 6226570U; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } + else if (tag == 3932860U.ToString()) + { + m_paramFreestyle.m_uiCureLevel = 3932860U; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } + else + { + if (!(tag == 2949820U.ToString())) + return; + m_paramFreestyle.m_uiCureLevel = 2949820U; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } + } - private void Freestyle_onOffSwitch_Tube_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bTubeEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Tube_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bTubeEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_SmartVolume_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bSmartVolumeEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_SmartVolume_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bSmartVolumeEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_SmartVolumeRatio_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rSVRatio = this.FloatToSVCS(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_SmartVolumeRatio_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rSVRatio = FloatToSVCS(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_SmartVolumeMaxLevel_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rSVMaxGain = this.FloatToSVMaxLevel(fPercent); - this.Freestyle_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL + " : " + this.FloatToSVMaxLevel(fPercent).ToString("F02") + "x"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_SmartVolumeMaxLevel_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rSVMaxGain = FloatToSVMaxLevel(fPercent); + Freestyle_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL + " : " + FloatToSVMaxLevel(fPercent).ToString("F02") + "x"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_SmartVolumeLevel_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rSVVolume = this.FloatToSVLevel(fPercent); - this.Freestyle_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL + " : " + (20.0 * Math.Log10((double) this.FloatToSVLevel(fPercent))).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_SmartVolumeLevel_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rSVVolume = FloatToSVLevel(fPercent); + Freestyle_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL + " : " + (20.0 * Math.Log10((double)FloatToSVLevel(fPercent))).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_onOffSwitch_Reverb_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramFreestyle.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_onOffSwitch_Reverb_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramFreestyle.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_singleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) - { - frmReverbPreset frmReverbPreset = new frmReverbPreset(); - frmReverbPreset.ReverbSize = this.m_paramFreestyle.m_rReverbSize; - frmReverbPreset.ReverbDamping = this.m_paramFreestyle.m_rReverbDamping; - frmReverbPreset.ReverbDensity = this.m_paramFreestyle.m_rReverbDensity; - frmReverbPreset.ReverbBandwidth = this.m_paramFreestyle.m_rReverbBandwidth; - frmReverbPreset.ReverbDecay = this.m_paramFreestyle.m_rReverbDecay; - frmReverbPreset.ReverbPredelay = this.m_paramFreestyle.m_rReverbPredelay; - frmReverbPreset.ReverbEarlyMix = this.m_paramFreestyle.m_rReverbEarlyMix; - frmReverbPreset.ReverbMix = this.m_paramFreestyle.m_rReverbMix; - if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramFreestyle.m_rReverbSize = frmReverbPreset.ReverbSize; - this.m_paramFreestyle.m_rReverbDamping = frmReverbPreset.ReverbDamping; - this.m_paramFreestyle.m_rReverbDensity = frmReverbPreset.ReverbDensity; - this.m_paramFreestyle.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; - this.m_paramFreestyle.m_rReverbDecay = frmReverbPreset.ReverbDecay; - this.m_paramFreestyle.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; - this.m_paramFreestyle.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; - this.m_paramFreestyle.m_rReverbMix = frmReverbPreset.ReverbMix; - this.Freestyle_hSlider_ReverbSize.PositionFloat = this.m_paramFreestyle.m_rReverbSize; - this.Freestyle_hSlider_ReverbDamping.PositionFloat = this.m_paramFreestyle.m_rReverbDamping; - this.Freestyle_hSlider_ReverbDensity.PositionFloat = this.m_paramFreestyle.m_rReverbDensity; - this.Freestyle_hSlider_ReverbBandWidth.PositionFloat = this.m_paramFreestyle.m_rReverbBandwidth; - this.Freestyle_hSlider_ReverbDecay.PositionFloat = this.m_paramFreestyle.m_rReverbDecay; - this.Freestyle_hSlider_ReverbPreDelay.PositionFloat = this.m_paramFreestyle.m_rReverbPredelay; - this.Freestyle_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramFreestyle.m_rReverbEarlyMix; - this.Freestyle_hSlider_ReverbMix.PositionFloat = this.m_paramFreestyle.m_rReverbMix; - } + private void Freestyle_SingleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) + { + FrmReverbPreset frmReverbPreset = new FrmReverbPreset + { + ReverbSize = m_paramFreestyle.m_rReverbSize, + ReverbDamping = m_paramFreestyle.m_rReverbDamping, + ReverbDensity = m_paramFreestyle.m_rReverbDensity, + ReverbBandwidth = m_paramFreestyle.m_rReverbBandwidth, + ReverbDecay = m_paramFreestyle.m_rReverbDecay, + ReverbPredelay = m_paramFreestyle.m_rReverbPredelay, + ReverbEarlyMix = m_paramFreestyle.m_rReverbEarlyMix, + ReverbMix = m_paramFreestyle.m_rReverbMix + }; + if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) + return; + m_paramFreestyle.m_rReverbSize = frmReverbPreset.ReverbSize; + m_paramFreestyle.m_rReverbDamping = frmReverbPreset.ReverbDamping; + m_paramFreestyle.m_rReverbDensity = frmReverbPreset.ReverbDensity; + m_paramFreestyle.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; + m_paramFreestyle.m_rReverbDecay = frmReverbPreset.ReverbDecay; + m_paramFreestyle.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; + m_paramFreestyle.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; + m_paramFreestyle.m_rReverbMix = frmReverbPreset.ReverbMix; + Freestyle_hSlider_ReverbSize.PositionFloat = m_paramFreestyle.m_rReverbSize; + Freestyle_hSlider_ReverbDamping.PositionFloat = m_paramFreestyle.m_rReverbDamping; + Freestyle_hSlider_ReverbDensity.PositionFloat = m_paramFreestyle.m_rReverbDensity; + Freestyle_hSlider_ReverbBandWidth.PositionFloat = m_paramFreestyle.m_rReverbBandwidth; + Freestyle_hSlider_ReverbDecay.PositionFloat = m_paramFreestyle.m_rReverbDecay; + Freestyle_hSlider_ReverbPreDelay.PositionFloat = m_paramFreestyle.m_rReverbPredelay; + Freestyle_hSlider_ReverbEarlyMix.PositionFloat = m_paramFreestyle.m_rReverbEarlyMix; + Freestyle_hSlider_ReverbMix.PositionFloat = m_paramFreestyle.m_rReverbMix; + } - private void Freestyle_hSlider_ReverbSize_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbSize = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbSize_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbSize = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbDamping_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbDamping = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbDamping_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbDamping = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbDensity_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbDensity = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbDensity_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbDensity = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbBandWidth_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbBandwidth = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbBandWidth_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbBandwidth = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbDecay_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbDecay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbDecay_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbDecay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbPreDelay_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbPredelay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbPreDelay_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbPredelay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbEarlyMix_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramFreestyle.m_rReverbEarlyMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbEarlyMix_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramFreestyle.m_rReverbEarlyMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramFreestyle.m_rReverbMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramFreestyle.m_rReverbMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_singleButton_Equalizer_ButtonClickNotify(SingleButton objSender) - { - frmEqualizer frmEqualizer = new frmEqualizer(); - frmEqualizer.SetRealtimeParameters(this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle, this.m_cpConfigProxy); - if (this.m_paramFreestyle.m_bEqualizerEnabled == 0) - frmEqualizer.SetParameters(this.m_paramFreestyle.m_rpEqualizerBands, false); - else - frmEqualizer.SetParameters(this.m_paramFreestyle.m_rpEqualizerBands, true); - int num = (int) frmEqualizer.ShowDialog(); - this.m_paramFreestyle.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; - if (frmEqualizer.GetParameter() != null) - this.m_paramFreestyle.m_rpEqualizerBands = frmEqualizer.GetParameter(); - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_SingleButton_Equalizer_ButtonClickNotify(SingleButton objSender) + { + FrmEqualizer frmEqualizer = new FrmEqualizer(); + frmEqualizer.SetRealtimeParameters(m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle, m_cpConfigProxy); + if (m_paramFreestyle.m_bEqualizerEnabled == 0) + frmEqualizer.SetParameters(m_paramFreestyle.m_rpEqualizerBands, false); + else + frmEqualizer.SetParameters(m_paramFreestyle.m_rpEqualizerBands, true); + _ = (int)frmEqualizer.ShowDialog(); + m_paramFreestyle.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; + if (frmEqualizer.GetParameter() != null) + m_paramFreestyle.m_rpEqualizerBands = frmEqualizer.GetParameter(); + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Freestyle_singleButton_Compressor_ButtonClickNotify(SingleButton objSender) - { - frmCompressor frmCompressor = new frmCompressor(); - frmCompressor.CompressorEnabled = this.m_paramFreestyle.m_bCompressorEnabled != 0; - frmCompressor.AutoKnee = this.m_paramFreestyle.m_bCompAutoKnee != 0; - frmCompressor.AutoAttack = this.m_paramFreestyle.m_bCompAutoAttack != 0; - frmCompressor.AutoRelease = this.m_paramFreestyle.m_bCompAutoRelease != 0; - frmCompressor.AutoGain = this.m_paramFreestyle.m_bCompAutoGain != 0; - frmCompressor.NoClip = this.m_paramFreestyle.m_bCompAutoMetaNoClipping != 0; - frmCompressor.Threshold = this.m_paramFreestyle.m_rCompThreshold; - frmCompressor.KneeWidth = this.m_paramFreestyle.m_rCompKneeWidth; - frmCompressor.Ratio = this.m_paramFreestyle.m_rCompRatio; - frmCompressor.AttackTime = this.m_paramFreestyle.m_rCompAttack; - frmCompressor.ReleaseTime = this.m_paramFreestyle.m_rCompRelease; - frmCompressor.KneeMult = this.m_paramFreestyle.m_rCompMetaKneeMult; - frmCompressor.CrestTime = this.m_paramFreestyle.m_rCompMetaCrest; - frmCompressor.AdaptTime = this.m_paramFreestyle.m_rCompMetaAdapt; - frmCompressor.MakeupGain = this.m_paramFreestyle.m_rCompGain; - if (frmCompressor.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramFreestyle.m_bCompressorEnabled = !frmCompressor.CompressorEnabled ? 0 : 1; - this.m_paramFreestyle.m_bCompAutoKnee = !frmCompressor.AutoKnee ? 0 : 1; - this.m_paramFreestyle.m_bCompAutoAttack = !frmCompressor.AutoAttack ? 0 : 1; - this.m_paramFreestyle.m_bCompAutoRelease = !frmCompressor.AutoRelease ? 0 : 1; - this.m_paramFreestyle.m_bCompAutoGain = !frmCompressor.AutoGain ? 0 : 1; - this.m_paramFreestyle.m_bCompAutoMetaNoClipping = !frmCompressor.NoClip ? 0 : 1; - this.m_paramFreestyle.m_rCompThreshold = frmCompressor.Threshold; - this.m_paramFreestyle.m_rCompKneeWidth = frmCompressor.KneeWidth; - this.m_paramFreestyle.m_rCompRatio = frmCompressor.Ratio; - this.m_paramFreestyle.m_rCompAttack = frmCompressor.AttackTime; - this.m_paramFreestyle.m_rCompRelease = frmCompressor.ReleaseTime; - this.m_paramFreestyle.m_rCompMetaKneeMult = frmCompressor.KneeMult; - this.m_paramFreestyle.m_rCompMetaCrest = frmCompressor.CrestTime; - this.m_paramFreestyle.m_rCompMetaAdapt = frmCompressor.AdaptTime; - this.m_paramFreestyle.m_rCompGain = frmCompressor.MakeupGain; - this.m_cpConfigProxy.UpdateParameter(this.m_paramFreestyle); - this.m_cpConfigProxy.SyncConfig(); - } + private void Freestyle_SingleButton_Compressor_ButtonClickNotify(SingleButton objSender) + { + FrmCompressor frmCompressor = new FrmCompressor + { + CompressorEnabled = m_paramFreestyle.m_bCompressorEnabled != 0, + AutoKnee = m_paramFreestyle.m_bCompAutoKnee != 0, + AutoAttack = m_paramFreestyle.m_bCompAutoAttack != 0, + AutoRelease = m_paramFreestyle.m_bCompAutoRelease != 0, + AutoGain = m_paramFreestyle.m_bCompAutoGain != 0, + NoClip = m_paramFreestyle.m_bCompAutoMetaNoClipping != 0, + Threshold = m_paramFreestyle.m_rCompThreshold, + KneeWidth = m_paramFreestyle.m_rCompKneeWidth, + Ratio = m_paramFreestyle.m_rCompRatio, + AttackTime = m_paramFreestyle.m_rCompAttack, + ReleaseTime = m_paramFreestyle.m_rCompRelease, + KneeMult = m_paramFreestyle.m_rCompMetaKneeMult, + CrestTime = m_paramFreestyle.m_rCompMetaCrest, + AdaptTime = m_paramFreestyle.m_rCompMetaAdapt, + MakeupGain = m_paramFreestyle.m_rCompGain + }; + if (frmCompressor.ShowDialog() == DialogResult.Cancel) + return; + m_paramFreestyle.m_bCompressorEnabled = !frmCompressor.CompressorEnabled ? 0 : 1; + m_paramFreestyle.m_bCompAutoKnee = !frmCompressor.AutoKnee ? 0 : 1; + m_paramFreestyle.m_bCompAutoAttack = !frmCompressor.AutoAttack ? 0 : 1; + m_paramFreestyle.m_bCompAutoRelease = !frmCompressor.AutoRelease ? 0 : 1; + m_paramFreestyle.m_bCompAutoGain = !frmCompressor.AutoGain ? 0 : 1; + m_paramFreestyle.m_bCompAutoMetaNoClipping = !frmCompressor.NoClip ? 0 : 1; + m_paramFreestyle.m_rCompThreshold = frmCompressor.Threshold; + m_paramFreestyle.m_rCompKneeWidth = frmCompressor.KneeWidth; + m_paramFreestyle.m_rCompRatio = frmCompressor.Ratio; + m_paramFreestyle.m_rCompAttack = frmCompressor.AttackTime; + m_paramFreestyle.m_rCompRelease = frmCompressor.ReleaseTime; + m_paramFreestyle.m_rCompMetaKneeMult = frmCompressor.KneeMult; + m_paramFreestyle.m_rCompMetaCrest = frmCompressor.CrestTime; + m_paramFreestyle.m_rCompMetaAdapt = frmCompressor.AdaptTime; + m_paramFreestyle.m_rCompGain = frmCompressor.MakeupGain; + m_cpConfigProxy.UpdateParameter(m_paramFreestyle); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rPreVolume = fPercent; - this.Movie_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rPreVolume = fPercent; + Movie_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_PostVolume_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rPostVolume = this.FloatToPostVolume(fPercent); - this.Movie_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double) this.FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_PostVolume_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rPostVolume = FloatToPostVolume(fPercent); + Movie_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double)FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_Convolver_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_Convolver_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMovieMode.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ConvIRGain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rConvolverIRGain = fPercent; - this.Movie_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ConvIRGain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rConvolverIRGain = fPercent; + Movie_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_openFileBox_ConvIRS_FileChangeNotify( - string szFilePathName, - OpenFileBox objSender) - { - this.m_paramMovieMode.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); - int nChannelCount = 0; - this.Movie_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out nChannelCount), nChannelCount); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_openFileBox_ConvIRS_FileChangeNotify( + string szFilePathName, + OpenFileBox objSender) + { + m_paramMovieMode.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); + Movie_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out int nChannelCount), nChannelCount); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_Surround_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bSurroundEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_Surround_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMovieMode.m_bSurroundEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_Surround3D_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_r3DSurroundStereo = this.FloatToSurround3D(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_Surround3D_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_r3DSurroundStereo = FloatToSurround3D(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_SurroundImage_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_r3DSurroundImage = this.FloatToSurround3D(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_SurroundImage_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_r3DSurroundImage = FloatToSurround3D(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_Bass_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_Bass_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_paramMovieMode.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_BassSpkSize_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_nViPERBassSpkSize = this.FloatToBassSpeakerSize(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_BassSpkSize_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_nViPERBassSpkSize = FloatToBassSpeakerSize(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rViPERBassFactor = this.FloatToBassGain(fPercent); - this.Movie_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double) this.FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rViPERBassFactor = FloatToBassGain(fPercent); + Movie_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double)FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_Clarity_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_Clarity_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMovieMode.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rViPERClarityFactor = this.FloatToClarity(fPercent); - this.Movie_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double) this.FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rViPERClarityFactor = FloatToClarity(fPercent); + Movie_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double)FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_SmartVolume_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bSmartVolumeEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_SmartVolume_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMovieMode.m_bSmartVolumeEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_SmartVolumeRatio_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rSVRatio = this.FloatToSVCS(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_SmartVolumeRatio_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rSVRatio = FloatToSVCS(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_SmartVolumeMaxLevel_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rSVMaxGain = this.FloatToSVMaxLevel(fPercent); - this.Movie_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL + " : " + this.FloatToSVMaxLevel(fPercent).ToString("F02") + "x"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_SmartVolumeMaxLevel_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rSVMaxGain = FloatToSVMaxLevel(fPercent); + Movie_label_SmartVolume_MaxLevel.Text = GlobalMessages.SMART_VOLUME_MAXLEVEL + " : " + FloatToSVMaxLevel(fPercent).ToString("F02") + "x"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_SmartVolumeLevel_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rSVVolume = this.FloatToSVLevel(fPercent); - this.Movie_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL + " : " + (20.0 * Math.Log10((double) this.FloatToSVLevel(fPercent))).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_SmartVolumeLevel_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rSVVolume = FloatToSVLevel(fPercent); + Movie_label_SmartVolume_Level.Text = GlobalMessages.SMART_VOLUME_LEVEL + " : " + (20.0 * Math.Log10((double)FloatToSVLevel(fPercent))).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_onOffSwitch_Reverb_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMovieMode.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_onOffSwitch_Reverb_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMovieMode.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_singleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) - { - frmReverbPreset frmReverbPreset = new frmReverbPreset(); - frmReverbPreset.ReverbSize = this.m_paramMovieMode.m_rReverbSize; - frmReverbPreset.ReverbDamping = this.m_paramMovieMode.m_rReverbDamping; - frmReverbPreset.ReverbDensity = this.m_paramMovieMode.m_rReverbDensity; - frmReverbPreset.ReverbBandwidth = this.m_paramMovieMode.m_rReverbBandwidth; - frmReverbPreset.ReverbDecay = this.m_paramMovieMode.m_rReverbDecay; - frmReverbPreset.ReverbPredelay = this.m_paramMovieMode.m_rReverbPredelay; - frmReverbPreset.ReverbEarlyMix = this.m_paramMovieMode.m_rReverbEarlyMix; - frmReverbPreset.ReverbMix = this.m_paramMovieMode.m_rReverbMix; - if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramMovieMode.m_rReverbSize = frmReverbPreset.ReverbSize; - this.m_paramMovieMode.m_rReverbDamping = frmReverbPreset.ReverbDamping; - this.m_paramMovieMode.m_rReverbDensity = frmReverbPreset.ReverbDensity; - this.m_paramMovieMode.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; - this.m_paramMovieMode.m_rReverbDecay = frmReverbPreset.ReverbDecay; - this.m_paramMovieMode.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; - this.m_paramMovieMode.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; - this.m_paramMovieMode.m_rReverbMix = frmReverbPreset.ReverbMix; - this.Movie_hSlider_ReverbSize.PositionFloat = this.m_paramMovieMode.m_rReverbSize; - this.Movie_hSlider_ReverbDamping.PositionFloat = this.m_paramMovieMode.m_rReverbDamping; - this.Movie_hSlider_ReverbDensity.PositionFloat = this.m_paramMovieMode.m_rReverbDensity; - this.Movie_hSlider_ReverbBandWidth.PositionFloat = this.m_paramMovieMode.m_rReverbBandwidth; - this.Movie_hSlider_ReverbDecay.PositionFloat = this.m_paramMovieMode.m_rReverbDecay; - this.Movie_hSlider_ReverbPreDelay.PositionFloat = this.m_paramMovieMode.m_rReverbPredelay; - this.Movie_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramMovieMode.m_rReverbEarlyMix; - this.Movie_hSlider_ReverbMix.PositionFloat = this.m_paramMovieMode.m_rReverbMix; - } + private void Movie_SingleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) + { + FrmReverbPreset frmReverbPreset = new FrmReverbPreset + { + ReverbSize = m_paramMovieMode.m_rReverbSize, + ReverbDamping = m_paramMovieMode.m_rReverbDamping, + ReverbDensity = m_paramMovieMode.m_rReverbDensity, + ReverbBandwidth = m_paramMovieMode.m_rReverbBandwidth, + ReverbDecay = m_paramMovieMode.m_rReverbDecay, + ReverbPredelay = m_paramMovieMode.m_rReverbPredelay, + ReverbEarlyMix = m_paramMovieMode.m_rReverbEarlyMix, + ReverbMix = m_paramMovieMode.m_rReverbMix + }; + if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) + return; + m_paramMovieMode.m_rReverbSize = frmReverbPreset.ReverbSize; + m_paramMovieMode.m_rReverbDamping = frmReverbPreset.ReverbDamping; + m_paramMovieMode.m_rReverbDensity = frmReverbPreset.ReverbDensity; + m_paramMovieMode.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; + m_paramMovieMode.m_rReverbDecay = frmReverbPreset.ReverbDecay; + m_paramMovieMode.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; + m_paramMovieMode.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; + m_paramMovieMode.m_rReverbMix = frmReverbPreset.ReverbMix; + Movie_hSlider_ReverbSize.PositionFloat = m_paramMovieMode.m_rReverbSize; + Movie_hSlider_ReverbDamping.PositionFloat = m_paramMovieMode.m_rReverbDamping; + Movie_hSlider_ReverbDensity.PositionFloat = m_paramMovieMode.m_rReverbDensity; + Movie_hSlider_ReverbBandWidth.PositionFloat = m_paramMovieMode.m_rReverbBandwidth; + Movie_hSlider_ReverbDecay.PositionFloat = m_paramMovieMode.m_rReverbDecay; + Movie_hSlider_ReverbPreDelay.PositionFloat = m_paramMovieMode.m_rReverbPredelay; + Movie_hSlider_ReverbEarlyMix.PositionFloat = m_paramMovieMode.m_rReverbEarlyMix; + Movie_hSlider_ReverbMix.PositionFloat = m_paramMovieMode.m_rReverbMix; + } - private void Movie_hSlider_ReverbSize_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rReverbSize = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbSize_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rReverbSize = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbDamping_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rReverbDamping = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbDamping_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rReverbDamping = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbDensity_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rReverbDensity = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbDensity_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rReverbDensity = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbBandWidth_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rReverbBandwidth = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbBandWidth_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rReverbBandwidth = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbDecay_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rReverbDecay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbDecay_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rReverbDecay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbPreDelay_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rReverbPredelay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbPreDelay_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rReverbPredelay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbEarlyMix_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMovieMode.m_rReverbEarlyMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbEarlyMix_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMovieMode.m_rReverbEarlyMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMovieMode.m_rReverbMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMovieMode.m_rReverbMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_singleButton_Equalizer_ButtonClickNotify(SingleButton objSender) - { - frmEqualizer frmEqualizer = new frmEqualizer(); - frmEqualizer.SetRealtimeParameters(this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle, this.m_cpConfigProxy); - if (this.m_paramMovieMode.m_bEqualizerEnabled == 0) - frmEqualizer.SetParameters(this.m_paramMovieMode.m_rpEqualizerBands, false); - else - frmEqualizer.SetParameters(this.m_paramMovieMode.m_rpEqualizerBands, true); - int num = (int) frmEqualizer.ShowDialog(); - this.m_paramMovieMode.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; - if (frmEqualizer.GetParameter() != null) - this.m_paramMovieMode.m_rpEqualizerBands = frmEqualizer.GetParameter(); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_SingleButton_Equalizer_ButtonClickNotify(SingleButton objSender) + { + FrmEqualizer frmEqualizer = new FrmEqualizer(); + frmEqualizer.SetRealtimeParameters(m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle, m_cpConfigProxy); + if (m_paramMovieMode.m_bEqualizerEnabled == 0) + frmEqualizer.SetParameters(m_paramMovieMode.m_rpEqualizerBands, false); + else + frmEqualizer.SetParameters(m_paramMovieMode.m_rpEqualizerBands, true); + _ = (int)frmEqualizer.ShowDialog(); + m_paramMovieMode.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; + if (frmEqualizer.GetParameter() != null) + m_paramMovieMode.m_rpEqualizerBands = frmEqualizer.GetParameter(); + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Movie_singleButton_Compressor_ButtonClickNotify(SingleButton objSender) - { - frmCompressorLite frmCompressorLite = new frmCompressorLite(); - frmCompressorLite.CompressorEnabled = this.m_paramMovieMode.m_bCompressorEnabled != 0; - frmCompressorLite.AutoKnee = this.m_paramMovieMode.m_bCompAutoKnee != 0; - frmCompressorLite.AutoAttack = this.m_paramMovieMode.m_bCompAutoAttack != 0; - frmCompressorLite.AutoRelease = this.m_paramMovieMode.m_bCompAutoRelease != 0; - frmCompressorLite.AutoGain = this.m_paramMovieMode.m_bCompAutoGain != 0; - frmCompressorLite.Threshold = this.m_paramMovieMode.m_rCompThreshold; - frmCompressorLite.KneeWidth = this.m_paramMovieMode.m_rCompKneeWidth; - frmCompressorLite.Ratio = this.m_paramMovieMode.m_rCompRatio; - frmCompressorLite.AttackTime = this.m_paramMovieMode.m_rCompAttack; - frmCompressorLite.ReleaseTime = this.m_paramMovieMode.m_rCompRelease; - frmCompressorLite.MakeupGain = this.m_paramMovieMode.m_rCompGain; - if (frmCompressorLite.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramMovieMode.m_bCompressorEnabled = !frmCompressorLite.CompressorEnabled ? 0 : 1; - this.m_paramMovieMode.m_bCompAutoKnee = !frmCompressorLite.AutoKnee ? 0 : 1; - this.m_paramMovieMode.m_bCompAutoAttack = !frmCompressorLite.AutoAttack ? 0 : 1; - this.m_paramMovieMode.m_bCompAutoRelease = !frmCompressorLite.AutoRelease ? 0 : 1; - this.m_paramMovieMode.m_bCompAutoGain = !frmCompressorLite.AutoGain ? 0 : 1; - this.m_paramMovieMode.m_rCompThreshold = frmCompressorLite.Threshold; - this.m_paramMovieMode.m_rCompKneeWidth = frmCompressorLite.KneeWidth; - this.m_paramMovieMode.m_rCompRatio = frmCompressorLite.Ratio; - this.m_paramMovieMode.m_rCompAttack = frmCompressorLite.AttackTime; - this.m_paramMovieMode.m_rCompRelease = frmCompressorLite.ReleaseTime; - this.m_paramMovieMode.m_rCompGain = frmCompressorLite.MakeupGain; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMovieMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Movie_SingleButton_Compressor_ButtonClickNotify(SingleButton objSender) + { + FrmCompressorLite frmCompressorLite = new FrmCompressorLite + { + CompressorEnabled = m_paramMovieMode.m_bCompressorEnabled != 0, + AutoKnee = m_paramMovieMode.m_bCompAutoKnee != 0, + AutoAttack = m_paramMovieMode.m_bCompAutoAttack != 0, + AutoRelease = m_paramMovieMode.m_bCompAutoRelease != 0, + AutoGain = m_paramMovieMode.m_bCompAutoGain != 0, + Threshold = m_paramMovieMode.m_rCompThreshold, + KneeWidth = m_paramMovieMode.m_rCompKneeWidth, + Ratio = m_paramMovieMode.m_rCompRatio, + AttackTime = m_paramMovieMode.m_rCompAttack, + ReleaseTime = m_paramMovieMode.m_rCompRelease, + MakeupGain = m_paramMovieMode.m_rCompGain + }; + if (frmCompressorLite.ShowDialog() == DialogResult.Cancel) + return; + m_paramMovieMode.m_bCompressorEnabled = !frmCompressorLite.CompressorEnabled ? 0 : 1; + m_paramMovieMode.m_bCompAutoKnee = !frmCompressorLite.AutoKnee ? 0 : 1; + m_paramMovieMode.m_bCompAutoAttack = !frmCompressorLite.AutoAttack ? 0 : 1; + m_paramMovieMode.m_bCompAutoRelease = !frmCompressorLite.AutoRelease ? 0 : 1; + m_paramMovieMode.m_bCompAutoGain = !frmCompressorLite.AutoGain ? 0 : 1; + m_paramMovieMode.m_rCompThreshold = frmCompressorLite.Threshold; + m_paramMovieMode.m_rCompKneeWidth = frmCompressorLite.KneeWidth; + m_paramMovieMode.m_rCompRatio = frmCompressorLite.Ratio; + m_paramMovieMode.m_rCompAttack = frmCompressorLite.AttackTime; + m_paramMovieMode.m_rCompRelease = frmCompressorLite.ReleaseTime; + m_paramMovieMode.m_rCompGain = frmCompressorLite.MakeupGain; + m_cpConfigProxy.UpdateParameter(m_paramMovieMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rPreVolume = fPercent; - this.Music_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_PreVolume_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rPreVolume = fPercent; + Music_label_PreVolume.Text = GlobalMessages.PRE_VOLUME + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_PostVolume_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rPostVolume = this.FloatToPostVolume(fPercent); - this.Music_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double) this.FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_PostVolume_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rPostVolume = FloatToPostVolume(fPercent); + Music_label_PostVolume.Text = GlobalMessages.POST_VOLUME + " : " + (20.0 * Math.Log10((double)FloatToPostVolume(fPercent) + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Convolver_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Convolver_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMusicMode.m_bConvolverEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ConvIRGain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rConvolverIRGain = fPercent; - this.Music_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double) fPercent + 1E-06)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ConvIRGain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rConvolverIRGain = fPercent; + Music_label_ConvolverIRGain.Text = GlobalMessages.CONV_IR_GAIN + " : " + (20.0 * Math.Log10((double)fPercent + 1E-06)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_openFileBox_ConvIRS_FileChangeNotify( - string szFilePathName, - OpenFileBox objSender) - { - this.m_paramMusicMode.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); - int nChannelCount = 0; - this.Music_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out nChannelCount), nChannelCount); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_openFileBox_ConvIRS_FileChangeNotify( + string szFilePathName, + OpenFileBox objSender) + { + m_paramMusicMode.m_szConvolverIR = Parameters.WriteStringToArray260(szFilePathName); + Music_irShape_ConvIR.SetImpulseResponse(RuntimeUtils.ImpulseResponseUtils.EstimateImpulseResponseSample(szFilePathName, out int nChannelCount), nChannelCount); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Surround_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bSurroundEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Surround_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMusicMode.m_bSurroundEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_buttonBox_SurroundRoomSize_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 4) - return; - this.m_paramMusicMode.m_nVHERoomSize = result; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_ButtonBox_SurroundRoomSize_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 4) + return; + m_paramMusicMode.m_nVHERoomSize = result; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Bass_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Bass_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_paramMusicMode.m_bViPERBassEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_BassSpkSize_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_nViPERBassSpkSize = this.FloatToBassSpeakerSize(fPercent); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_BassSpkSize_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_nViPERBassSpkSize = FloatToBassSpeakerSize(fPercent); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rViPERBassFactor = this.FloatToBassGain(fPercent); - this.Music_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double) this.FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_BassGain_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rViPERBassFactor = FloatToBassGain(fPercent); + Music_label_Bass_Gain.Text = GlobalMessages.BASS_GAIN + " : " + (20.0 * Math.Log10((double)FloatToBassGain(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Clarity_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Clarity_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMusicMode.m_bViPERClarityEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_buttonBox_ClarityMode_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 2) - return; - this.m_paramMusicMode.m_nViPERClarityMode = result; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_ButtonBox_ClarityMode_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 2) + return; + m_paramMusicMode.m_nViPERClarityMode = result; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rViPERClarityFactor = this.FloatToClarity(fPercent); - this.Music_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double) this.FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_Clarity_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rViPERClarityFactor = FloatToClarity(fPercent); + Music_label_Clarity.Text = GlobalMessages.CLARITY + " : " + (20.0 * Math.Log10((double)FloatToClarity(fPercent) + 1.0)).ToString("F02") + "dB"; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Cure_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bCureEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Cure_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_paramMusicMode.m_bCureEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_buttonBox_CureLevel_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) - return; - if (tag == 6226570U.ToString()) - { - this.m_paramMusicMode.m_uiCureLevel = 6226570U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - else if (tag == 3932860U.ToString()) - { - this.m_paramMusicMode.m_uiCureLevel = 3932860U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - else - { - if (!(tag == 2949820U.ToString())) - return; - this.m_paramMusicMode.m_uiCureLevel = 2949820U; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } - } + private void Music_ButtonBox_CureLevel_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || !(itCurrItem.Tag is string tag)) + return; + if (tag == 6226570U.ToString()) + { + m_paramMusicMode.m_uiCureLevel = 6226570U; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + else if (tag == 3932860U.ToString()) + { + m_paramMusicMode.m_uiCureLevel = 3932860U; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + else + { + if (!(tag == 2949820U.ToString())) + return; + m_paramMusicMode.m_uiCureLevel = 2949820U; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } + } - private void Music_onOffSwitch_Tube_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bTubeEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Tube_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_paramMusicMode.m_bTubeEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_onOffSwitch_Reverb_SwitchChangeNotify( - bool bSwitchedOn, - OnOffSwitch objSender) - { - this.m_paramMusicMode.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_onOffSwitch_Reverb_SwitchChangeNotify( + bool bSwitchedOn, + OnOffSwitch objSender) + { + m_paramMusicMode.m_bReverbEnabled = !bSwitchedOn ? 0 : 1; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_singleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) - { - frmReverbPreset frmReverbPreset = new frmReverbPreset(); - frmReverbPreset.ReverbSize = this.m_paramMusicMode.m_rReverbSize; - frmReverbPreset.ReverbDamping = this.m_paramMusicMode.m_rReverbDamping; - frmReverbPreset.ReverbDensity = this.m_paramMusicMode.m_rReverbDensity; - frmReverbPreset.ReverbBandwidth = this.m_paramMusicMode.m_rReverbBandwidth; - frmReverbPreset.ReverbDecay = this.m_paramMusicMode.m_rReverbDecay; - frmReverbPreset.ReverbPredelay = this.m_paramMusicMode.m_rReverbPredelay; - frmReverbPreset.ReverbEarlyMix = this.m_paramMusicMode.m_rReverbEarlyMix; - frmReverbPreset.ReverbMix = this.m_paramMusicMode.m_rReverbMix; - if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramMusicMode.m_rReverbSize = frmReverbPreset.ReverbSize; - this.m_paramMusicMode.m_rReverbDamping = frmReverbPreset.ReverbDamping; - this.m_paramMusicMode.m_rReverbDensity = frmReverbPreset.ReverbDensity; - this.m_paramMusicMode.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; - this.m_paramMusicMode.m_rReverbDecay = frmReverbPreset.ReverbDecay; - this.m_paramMusicMode.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; - this.m_paramMusicMode.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; - this.m_paramMusicMode.m_rReverbMix = frmReverbPreset.ReverbMix; - this.Music_hSlider_ReverbSize.PositionFloat = this.m_paramMusicMode.m_rReverbSize; - this.Music_hSlider_ReverbDamping.PositionFloat = this.m_paramMusicMode.m_rReverbDamping; - this.Music_hSlider_ReverbDensity.PositionFloat = this.m_paramMusicMode.m_rReverbDensity; - this.Music_hSlider_ReverbBandWidth.PositionFloat = this.m_paramMusicMode.m_rReverbBandwidth; - this.Music_hSlider_ReverbDecay.PositionFloat = this.m_paramMusicMode.m_rReverbDecay; - this.Music_hSlider_ReverbPreDelay.PositionFloat = this.m_paramMusicMode.m_rReverbPredelay; - this.Music_hSlider_ReverbEarlyMix.PositionFloat = this.m_paramMusicMode.m_rReverbEarlyMix; - this.Music_hSlider_ReverbMix.PositionFloat = this.m_paramMusicMode.m_rReverbMix; - } + private void Music_SingleButton_ReverbPreset_ButtonClickNotify(SingleButton objSender) + { + FrmReverbPreset frmReverbPreset = new FrmReverbPreset + { + ReverbSize = m_paramMusicMode.m_rReverbSize, + ReverbDamping = m_paramMusicMode.m_rReverbDamping, + ReverbDensity = m_paramMusicMode.m_rReverbDensity, + ReverbBandwidth = m_paramMusicMode.m_rReverbBandwidth, + ReverbDecay = m_paramMusicMode.m_rReverbDecay, + ReverbPredelay = m_paramMusicMode.m_rReverbPredelay, + ReverbEarlyMix = m_paramMusicMode.m_rReverbEarlyMix, + ReverbMix = m_paramMusicMode.m_rReverbMix + }; + if (frmReverbPreset.ShowDialog() == DialogResult.Cancel) + return; + m_paramMusicMode.m_rReverbSize = frmReverbPreset.ReverbSize; + m_paramMusicMode.m_rReverbDamping = frmReverbPreset.ReverbDamping; + m_paramMusicMode.m_rReverbDensity = frmReverbPreset.ReverbDensity; + m_paramMusicMode.m_rReverbBandwidth = frmReverbPreset.ReverbBandwidth; + m_paramMusicMode.m_rReverbDecay = frmReverbPreset.ReverbDecay; + m_paramMusicMode.m_rReverbPredelay = frmReverbPreset.ReverbPredelay; + m_paramMusicMode.m_rReverbEarlyMix = frmReverbPreset.ReverbEarlyMix; + m_paramMusicMode.m_rReverbMix = frmReverbPreset.ReverbMix; + Music_hSlider_ReverbSize.PositionFloat = m_paramMusicMode.m_rReverbSize; + Music_hSlider_ReverbDamping.PositionFloat = m_paramMusicMode.m_rReverbDamping; + Music_hSlider_ReverbDensity.PositionFloat = m_paramMusicMode.m_rReverbDensity; + Music_hSlider_ReverbBandWidth.PositionFloat = m_paramMusicMode.m_rReverbBandwidth; + Music_hSlider_ReverbDecay.PositionFloat = m_paramMusicMode.m_rReverbDecay; + Music_hSlider_ReverbPreDelay.PositionFloat = m_paramMusicMode.m_rReverbPredelay; + Music_hSlider_ReverbEarlyMix.PositionFloat = m_paramMusicMode.m_rReverbEarlyMix; + Music_hSlider_ReverbMix.PositionFloat = m_paramMusicMode.m_rReverbMix; + } - private void Music_hSlider_ReverbSize_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rReverbSize = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbSize_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rReverbSize = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbDamping_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rReverbDamping = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbDamping_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rReverbDamping = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbDensity_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rReverbDensity = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbDensity_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rReverbDensity = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbBandWidth_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMusicMode.m_rReverbBandwidth = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbBandWidth_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMusicMode.m_rReverbBandwidth = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbDecay_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rReverbDecay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbDecay_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rReverbDecay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbPreDelay_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMusicMode.m_rReverbPredelay = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbPreDelay_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMusicMode.m_rReverbPredelay = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbEarlyMix_PositionChangeNotify( - float fPercent, - HSlider objSender) - { - this.m_paramMusicMode.m_rReverbEarlyMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbEarlyMix_PositionChangeNotify( + float fPercent, + HSlider objSender) + { + m_paramMusicMode.m_rReverbEarlyMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) - { - this.m_paramMusicMode.m_rReverbMix = fPercent; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_hSlider_ReverbMix_PositionChangeNotify(float fPercent, HSlider objSender) + { + m_paramMusicMode.m_rReverbMix = fPercent; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_singleButton_Equalizer_ButtonClickNotify(SingleButton objSender) - { - frmEqualizer frmEqualizer = new frmEqualizer(); - frmEqualizer.SetRealtimeParameters(this.m_paramBaseSystem, this.m_paramMusicMode, this.m_paramMovieMode, this.m_paramFreestyle, this.m_cpConfigProxy); - if (this.m_paramMusicMode.m_bEqualizerEnabled == 0) - frmEqualizer.SetParameters(this.m_paramMusicMode.m_rpEqualizerBands, false); - else - frmEqualizer.SetParameters(this.m_paramMusicMode.m_rpEqualizerBands, true); - int num = (int) frmEqualizer.ShowDialog(); - this.m_paramMusicMode.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; - if (frmEqualizer.GetParameter() != null) - this.m_paramMusicMode.m_rpEqualizerBands = frmEqualizer.GetParameter(); - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_SingleButton_Equalizer_ButtonClickNotify(SingleButton objSender) + { + FrmEqualizer frmEqualizer = new FrmEqualizer(); + frmEqualizer.SetRealtimeParameters(m_paramBaseSystem, m_paramMusicMode, m_paramMovieMode, m_paramFreestyle, m_cpConfigProxy); + if (m_paramMusicMode.m_bEqualizerEnabled == 0) + frmEqualizer.SetParameters(m_paramMusicMode.m_rpEqualizerBands, false); + else + frmEqualizer.SetParameters(m_paramMusicMode.m_rpEqualizerBands, true); + _ = (int)frmEqualizer.ShowDialog(); + m_paramMusicMode.m_bEqualizerEnabled = !frmEqualizer.GetEQEnabled() ? 0 : 1; + if (frmEqualizer.GetParameter() != null) + m_paramMusicMode.m_rpEqualizerBands = frmEqualizer.GetParameter(); + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - private void Music_singleButton_Compressor_ButtonClickNotify(SingleButton objSender) - { - frmCompressorLite frmCompressorLite = new frmCompressorLite(); - frmCompressorLite.CompressorEnabled = this.m_paramMusicMode.m_bCompressorEnabled != 0; - frmCompressorLite.AutoKnee = this.m_paramMusicMode.m_bCompAutoKnee != 0; - frmCompressorLite.AutoAttack = this.m_paramMusicMode.m_bCompAutoAttack != 0; - frmCompressorLite.AutoRelease = this.m_paramMusicMode.m_bCompAutoRelease != 0; - frmCompressorLite.AutoGain = this.m_paramMusicMode.m_bCompAutoGain != 0; - frmCompressorLite.Threshold = this.m_paramMusicMode.m_rCompThreshold; - frmCompressorLite.KneeWidth = this.m_paramMusicMode.m_rCompKneeWidth; - frmCompressorLite.Ratio = this.m_paramMusicMode.m_rCompRatio; - frmCompressorLite.AttackTime = this.m_paramMusicMode.m_rCompAttack; - frmCompressorLite.ReleaseTime = this.m_paramMusicMode.m_rCompRelease; - frmCompressorLite.MakeupGain = this.m_paramMusicMode.m_rCompGain; - if (frmCompressorLite.ShowDialog() == DialogResult.Cancel) - return; - this.m_paramMusicMode.m_bCompressorEnabled = !frmCompressorLite.CompressorEnabled ? 0 : 1; - this.m_paramMusicMode.m_bCompAutoKnee = !frmCompressorLite.AutoKnee ? 0 : 1; - this.m_paramMusicMode.m_bCompAutoAttack = !frmCompressorLite.AutoAttack ? 0 : 1; - this.m_paramMusicMode.m_bCompAutoRelease = !frmCompressorLite.AutoRelease ? 0 : 1; - this.m_paramMusicMode.m_bCompAutoGain = !frmCompressorLite.AutoGain ? 0 : 1; - this.m_paramMusicMode.m_rCompThreshold = frmCompressorLite.Threshold; - this.m_paramMusicMode.m_rCompKneeWidth = frmCompressorLite.KneeWidth; - this.m_paramMusicMode.m_rCompRatio = frmCompressorLite.Ratio; - this.m_paramMusicMode.m_rCompAttack = frmCompressorLite.AttackTime; - this.m_paramMusicMode.m_rCompRelease = frmCompressorLite.ReleaseTime; - this.m_paramMusicMode.m_rCompGain = frmCompressorLite.MakeupGain; - this.m_cpConfigProxy.UpdateParameter(this.m_paramMusicMode); - this.m_cpConfigProxy.SyncConfig(); - } + private void Music_SingleButton_Compressor_ButtonClickNotify(SingleButton objSender) + { + FrmCompressorLite frmCompressorLite = new FrmCompressorLite + { + CompressorEnabled = m_paramMusicMode.m_bCompressorEnabled != 0, + AutoKnee = m_paramMusicMode.m_bCompAutoKnee != 0, + AutoAttack = m_paramMusicMode.m_bCompAutoAttack != 0, + AutoRelease = m_paramMusicMode.m_bCompAutoRelease != 0, + AutoGain = m_paramMusicMode.m_bCompAutoGain != 0, + Threshold = m_paramMusicMode.m_rCompThreshold, + KneeWidth = m_paramMusicMode.m_rCompKneeWidth, + Ratio = m_paramMusicMode.m_rCompRatio, + AttackTime = m_paramMusicMode.m_rCompAttack, + ReleaseTime = m_paramMusicMode.m_rCompRelease, + MakeupGain = m_paramMusicMode.m_rCompGain + }; + if (frmCompressorLite.ShowDialog() == DialogResult.Cancel) + return; + m_paramMusicMode.m_bCompressorEnabled = !frmCompressorLite.CompressorEnabled ? 0 : 1; + m_paramMusicMode.m_bCompAutoKnee = !frmCompressorLite.AutoKnee ? 0 : 1; + m_paramMusicMode.m_bCompAutoAttack = !frmCompressorLite.AutoAttack ? 0 : 1; + m_paramMusicMode.m_bCompAutoRelease = !frmCompressorLite.AutoRelease ? 0 : 1; + m_paramMusicMode.m_bCompAutoGain = !frmCompressorLite.AutoGain ? 0 : 1; + m_paramMusicMode.m_rCompThreshold = frmCompressorLite.Threshold; + m_paramMusicMode.m_rCompKneeWidth = frmCompressorLite.KneeWidth; + m_paramMusicMode.m_rCompRatio = frmCompressorLite.Ratio; + m_paramMusicMode.m_rCompAttack = frmCompressorLite.AttackTime; + m_paramMusicMode.m_rCompRelease = frmCompressorLite.ReleaseTime; + m_paramMusicMode.m_rCompGain = frmCompressorLite.MakeupGain; + m_cpConfigProxy.UpdateParameter(m_paramMusicMode); + m_cpConfigProxy.SyncConfig(); + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private void InitializeComponent() - { - this.components = (IContainer) new System.ComponentModel.Container(); - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmMain)); - this.pictureBox_Logo = new PictureBox(); - this.label_MasterPower = new Label(); - this.menuStrip_Main = new MenuStrip(); - this.toolStripMenuItem_Language = new ToolStripMenuItem(); - this.toolStripMenuItem_Setting = new ToolStripMenuItem(); - this.toolStripMenuItem_LatencySetting = new ToolStripMenuItem(); - this.toolStripMenuItem_ChannelPan = new ToolStripMenuItem(); - this.toolStripMenuItem_Virtualization = new ToolStripMenuItem(); - this.toolStripMenuItem_ResetEffect = new ToolStripMenuItem(); - this.toolStripMenuItem_Settings = new ToolStripMenuItem(); - this.toolStripMenuItem_Help = new ToolStripMenuItem(); - this.toolStripMenuItem_CheckUpdate = new ToolStripMenuItem(); - this.toolStripMenuItem_AboutV4W = new ToolStripMenuItem(); - this.groupBox_Main = new GroupBox(); - this.panel_Freestyle = new Panel(); - this.Freestyle_groupBox_SmartVolume = new GroupBox(); - this.Freestyle_hSlider_SmartVolumeLevel = new HSlider(); - this.Freestyle_label_SmartVolume_Level = new Label(); - this.Freestyle_hSlider_SmartVolumeMaxLevel = new HSlider(); - this.Freestyle_label_SmartVolume_MaxLevel = new Label(); - this.Freestyle_hSlider_SmartVolumeRatio = new HSlider(); - this.Freestyle_label_SmartVolume_ControlStrength = new Label(); - this.Freestyle_onOffSwitch_SmartVolume = new OnOffSwitch(); - this.Freestyle_groupBox_3DSurround = new GroupBox(); - this.Freestyle_hSlider_SurroundImage = new HSlider(); - this.Freestyle_label_Surround_Image = new Label(); - this.Freestyle_hSlider_Surround3D = new HSlider(); - this.Freestyle_label_Surround_3D = new Label(); - this.Freestyle_onOffSwitch_Surround3D = new OnOffSwitch(); - this.Freestyle_singleButton_Compressor = new SingleButton(); - this.Freestyle_singleButton_Equalizer = new SingleButton(); - this.Freestyle_groupBox_Reverb = new GroupBox(); - this.Freestyle_singleButton_ReverbPreset = new SingleButton(); - this.Freestyle_hSlider_ReverbMix = new HSlider(); - this.Freestyle_label_Reverb_Mix = new Label(); - this.Freestyle_hSlider_ReverbEarlyMix = new HSlider(); - this.Freestyle_label_Reverb_EarlyMix = new Label(); - this.Freestyle_hSlider_ReverbPreDelay = new HSlider(); - this.Freestyle_label_Reverb_PreDelay = new Label(); - this.Freestyle_hSlider_ReverbDecay = new HSlider(); - this.Freestyle_label_Reverb_Decay = new Label(); - this.Freestyle_hSlider_ReverbBandWidth = new HSlider(); - this.Freestyle_label_Reverb_BandWidth = new Label(); - this.Freestyle_hSlider_ReverbDensity = new HSlider(); - this.Freestyle_label_Reverb_Density = new Label(); - this.Freestyle_hSlider_ReverbDamping = new HSlider(); - this.Freestyle_label_Reverb_Damping = new Label(); - this.Freestyle_hSlider_ReverbSize = new HSlider(); - this.Freestyle_label_Reverb_Size = new Label(); - this.Freestyle_onOffSwitch_Reverb = new OnOffSwitch(); - this.Freestyle_groupBox_Cure = new GroupBox(); - this.Freestyle_buttonBox_CureLevel = new ButtonBox(); - this.Freestyle_onOffSwitch_Cure = new OnOffSwitch(); - this.Freestyle_label_Tube = new Label(); - this.Freestyle_onOffSwitch_Tube = new OnOffSwitch(); - this.Freestyle_groupBox_Clarity = new GroupBox(); - this.Freestyle_buttonBox_ClarityMode = new ButtonBox(); - this.Freestyle_hSlider_Clarity = new HSlider(); - this.Freestyle_label_Clarity = new Label(); - this.Freestyle_onOffSwitch_Clarity = new OnOffSwitch(); - this.Freestyle_groupBox_Bass = new GroupBox(); - this.Freestyle_buttonBox_BassMode = new ButtonBox(); - this.Freestyle_hSlider_BassGain = new HSlider(); - this.Freestyle_label_Bass_Gain = new Label(); - this.Freestyle_hSlider_BassSpkSize = new HSlider(); - this.Freestyle_label_Bass_SpkSize = new Label(); - this.Freestyle_onOffSwitch_Bass = new OnOffSwitch(); - this.Freestyle_groupBox_VHESurround = new GroupBox(); - this.Freestyle_buttonBox_SurroundVHERoomSize = new ButtonBox(); - this.Freestyle_onOffSwitch_SurroundVHE = new OnOffSwitch(); - this.Freestyle_groupBox_Convolver = new GroupBox(); - this.Freestyle_irShape_ConvIR = new IRShape(); - this.Freestyle_onOffSwitch_Convolver = new OnOffSwitch(); - this.Freestyle_hSlider_ConvIRGain = new HSlider(); - this.Freestyle_openFileBox_ConvIRS = new OpenFileBox(); - this.Freestyle_label_ConvolverIRGain = new Label(); - this.Freestyle_hSlider_PostVolume = new HSlider(); - this.Freestyle_label_PostVolume = new Label(); - this.Freestyle_hSlider_PreVolume = new HSlider(); - this.Freestyle_label_PreVolume = new Label(); - this.panel_MusicMode = new Panel(); - this.panel_MovieMode = new Panel(); - this.Movie_groupBox_SmartVolume = new GroupBox(); - this.Movie_hSlider_SmartVolumeLevel = new HSlider(); - this.Movie_label_SmartVolume_Level = new Label(); - this.Movie_hSlider_SmartVolumeMaxLevel = new HSlider(); - this.Movie_label_SmartVolume_MaxLevel = new Label(); - this.Movie_hSlider_SmartVolumeRatio = new HSlider(); - this.Movie_label_SmartVolume_ControlStrength = new Label(); - this.Movie_onOffSwitch_SmartVolume = new OnOffSwitch(); - this.Movie_singleButton_Compressor = new SingleButton(); - this.Movie_singleButton_Equalizer = new SingleButton(); - this.Movie_groupBox_Reverb = new GroupBox(); - this.Movie_singleButton_ReverbPreset = new SingleButton(); - this.Movie_hSlider_ReverbMix = new HSlider(); - this.Movie_label_Reverb_Mix = new Label(); - this.Movie_hSlider_ReverbEarlyMix = new HSlider(); - this.Movie_label_Reverb_EarlyMix = new Label(); - this.Movie_hSlider_ReverbPreDelay = new HSlider(); - this.Movie_label_Reverb_PreDelay = new Label(); - this.Movie_hSlider_ReverbDecay = new HSlider(); - this.Movie_label_Reverb_Decay = new Label(); - this.Movie_hSlider_ReverbBandWidth = new HSlider(); - this.Movie_label_Reverb_BandWidth = new Label(); - this.Movie_hSlider_ReverbDensity = new HSlider(); - this.Movie_label_Reverb_Density = new Label(); - this.Movie_hSlider_ReverbDamping = new HSlider(); - this.Movie_label_Reverb_Damping = new Label(); - this.Movie_hSlider_ReverbSize = new HSlider(); - this.Movie_label_Reverb_Size = new Label(); - this.Movie_onOffSwitch_Reverb = new OnOffSwitch(); - this.Movie_groupBox_Clarity = new GroupBox(); - this.Movie_hSlider_Clarity = new HSlider(); - this.Movie_label_Clarity = new Label(); - this.Movie_onOffSwitch_Clarity = new OnOffSwitch(); - this.Movie_groupBox_Bass = new GroupBox(); - this.Movie_hSlider_BassGain = new HSlider(); - this.Movie_label_Bass_Gain = new Label(); - this.Movie_hSlider_BassSpkSize = new HSlider(); - this.Movie_label_Bass_SpkSize = new Label(); - this.Movie_onOffSwitch_Bass = new OnOffSwitch(); - this.Movie_groupBox_Surround = new GroupBox(); - this.Movie_hSlider_SurroundImage = new HSlider(); - this.Movie_label_Surround_Image = new Label(); - this.Movie_hSlider_Surround3D = new HSlider(); - this.Movie_label_Surround_3D = new Label(); - this.Movie_onOffSwitch_Surround = new OnOffSwitch(); - this.Movie_groupBox_Convolver = new GroupBox(); - this.Movie_irShape_ConvIR = new IRShape(); - this.Movie_onOffSwitch_Convolver = new OnOffSwitch(); - this.Movie_hSlider_ConvIRGain = new HSlider(); - this.Movie_openFileBox_ConvIRS = new OpenFileBox(); - this.Movie_label_ConvolverIRGain = new Label(); - this.Movie_hSlider_PostVolume = new HSlider(); - this.Movie_label_PostVolume = new Label(); - this.Movie_hSlider_PreVolume = new HSlider(); - this.Movie_label_PreVolume = new Label(); - this.Music_singleButton_Compressor = new SingleButton(); - this.Music_singleButton_Equalizer = new SingleButton(); - this.Music_groupBox_Reverb = new GroupBox(); - this.Music_singleButton_ReverbPreset = new SingleButton(); - this.Music_hSlider_ReverbMix = new HSlider(); - this.Music_label_Reverb_Mix = new Label(); - this.Music_hSlider_ReverbEarlyMix = new HSlider(); - this.Music_label_Reverb_EarlyMix = new Label(); - this.Music_hSlider_ReverbPreDelay = new HSlider(); - this.Music_label_Reverb_PreDelay = new Label(); - this.Music_hSlider_ReverbDecay = new HSlider(); - this.Music_label_Reverb_Decay = new Label(); - this.Music_hSlider_ReverbBandWidth = new HSlider(); - this.Music_label_Reverb_BandWidth = new Label(); - this.Music_hSlider_ReverbDensity = new HSlider(); - this.Music_label_Reverb_Density = new Label(); - this.Music_hSlider_ReverbDamping = new HSlider(); - this.Music_label_Reverb_Damping = new Label(); - this.Music_hSlider_ReverbSize = new HSlider(); - this.Music_label_Reverb_Size = new Label(); - this.Music_onOffSwitch_Reverb = new OnOffSwitch(); - this.Music_groupBox_Cure = new GroupBox(); - this.Music_buttonBox_CureLevel = new ButtonBox(); - this.Music_onOffSwitch_Cure = new OnOffSwitch(); - this.Music_label_Tube = new Label(); - this.Music_onOffSwitch_Tube = new OnOffSwitch(); - this.Music_groupBox_Clarity = new GroupBox(); - this.Music_buttonBox_ClarityMode = new ButtonBox(); - this.Music_hSlider_Clarity = new HSlider(); - this.Music_label_Clarity = new Label(); - this.Music_onOffSwitch_Clarity = new OnOffSwitch(); - this.Music_groupBox_Bass = new GroupBox(); - this.Music_hSlider_BassGain = new HSlider(); - this.Music_label_Bass_Gain = new Label(); - this.Music_hSlider_BassSpkSize = new HSlider(); - this.Music_label_Bass_SpkSize = new Label(); - this.Music_onOffSwitch_Bass = new OnOffSwitch(); - this.Music_groupBox_Surround = new GroupBox(); - this.Music_buttonBox_SurroundRoomSize = new ButtonBox(); - this.Music_onOffSwitch_Surround = new OnOffSwitch(); - this.Music_groupBox_Convolver = new GroupBox(); - this.Music_irShape_ConvIR = new IRShape(); - this.Music_onOffSwitch_Convolver = new OnOffSwitch(); - this.Music_hSlider_ConvIRGain = new HSlider(); - this.Music_openFileBox_ConvIRS = new OpenFileBox(); - this.Music_label_ConvolverIRGain = new Label(); - this.Music_hSlider_PostVolume = new HSlider(); - this.Music_label_PostVolume = new Label(); - this.Music_hSlider_PreVolume = new HSlider(); - this.Music_label_PreVolume = new Label(); - this.label_Copyright = new Label(); - this.notifyIcon_Main = new NotifyIcon(this.components); - this.contextMenuStrip_TrayMenu = new ContextMenuStrip(this.components); - this.singleButton_SavePreset = new SingleButton(); - this.singleButton_LoadPreset = new SingleButton(); - this.buttonBox_Mode = new ButtonBox(); - this.onOffSwitch_Master = new OnOffSwitch(); - ((ISupportInitialize) this.pictureBox_Logo).BeginInit(); - this.menuStrip_Main.SuspendLayout(); - this.groupBox_Main.SuspendLayout(); - this.panel_Freestyle.SuspendLayout(); - this.Freestyle_groupBox_SmartVolume.SuspendLayout(); - this.Freestyle_groupBox_3DSurround.SuspendLayout(); - this.Freestyle_groupBox_Reverb.SuspendLayout(); - this.Freestyle_groupBox_Cure.SuspendLayout(); - this.Freestyle_groupBox_Clarity.SuspendLayout(); - this.Freestyle_groupBox_Bass.SuspendLayout(); - this.Freestyle_groupBox_VHESurround.SuspendLayout(); - this.Freestyle_groupBox_Convolver.SuspendLayout(); - this.panel_MusicMode.SuspendLayout(); - this.panel_MovieMode.SuspendLayout(); - this.Movie_groupBox_SmartVolume.SuspendLayout(); - this.Movie_groupBox_Reverb.SuspendLayout(); - this.Movie_groupBox_Clarity.SuspendLayout(); - this.Movie_groupBox_Bass.SuspendLayout(); - this.Movie_groupBox_Surround.SuspendLayout(); - this.Movie_groupBox_Convolver.SuspendLayout(); - this.Music_groupBox_Reverb.SuspendLayout(); - this.Music_groupBox_Cure.SuspendLayout(); - this.Music_groupBox_Clarity.SuspendLayout(); - this.Music_groupBox_Bass.SuspendLayout(); - this.Music_groupBox_Surround.SuspendLayout(); - this.Music_groupBox_Convolver.SuspendLayout(); - this.SuspendLayout(); - this.pictureBox_Logo.Image = (Image) Resources.Logo; - this.pictureBox_Logo.Location = new Point(28, 69); - this.pictureBox_Logo.Name = "pictureBox_Logo"; - this.pictureBox_Logo.Size = new Size(128, 128); - this.pictureBox_Logo.SizeMode = PictureBoxSizeMode.AutoSize; - this.pictureBox_Logo.TabIndex = 0; - this.pictureBox_Logo.TabStop = false; - this.label_MasterPower.AutoSize = true; - this.label_MasterPower.Location = new Point(48, 246); - this.label_MasterPower.Name = "label_MasterPower"; - this.label_MasterPower.Size = new Size(83, 12); - this.label_MasterPower.TabIndex = 1; - this.label_MasterPower.Text = "$MASTER_POWER"; - this.menuStrip_Main.Items.AddRange(new ToolStripItem[3] - { - (ToolStripItem) this.toolStripMenuItem_Language, - (ToolStripItem) this.toolStripMenuItem_Setting, - (ToolStripItem) this.toolStripMenuItem_Help - }); - this.menuStrip_Main.Location = new Point(0, 0); - this.menuStrip_Main.Name = "menuStrip_Main"; - this.menuStrip_Main.Size = new Size(1042, 25); - this.menuStrip_Main.TabIndex = 4; - this.toolStripMenuItem_Language.Name = "toolStripMenuItem_Language"; - this.toolStripMenuItem_Language.Size = new Size(136, 21); - this.toolStripMenuItem_Language.Text = "$MENU_LANGUAGE"; - this.toolStripMenuItem_Setting.DropDownItems.AddRange(new ToolStripItem[5] - { - (ToolStripItem) this.toolStripMenuItem_LatencySetting, - (ToolStripItem) this.toolStripMenuItem_ChannelPan, - (ToolStripItem) this.toolStripMenuItem_Virtualization, - (ToolStripItem) this.toolStripMenuItem_ResetEffect, - (ToolStripItem) this.toolStripMenuItem_Settings - }); - this.toolStripMenuItem_Setting.Name = "toolStripMenuItem_Setting"; - this.toolStripMenuItem_Setting.Size = new Size(121, 21); - this.toolStripMenuItem_Setting.Text = "$MENU_SETTING"; - this.toolStripMenuItem_LatencySetting.Name = "toolStripMenuItem_LatencySetting"; - this.toolStripMenuItem_LatencySetting.Size = new Size(192, 22); - this.toolStripMenuItem_LatencySetting.Text = "$LATENCY_SETTING"; - this.toolStripMenuItem_LatencySetting.Click += new EventHandler(this.toolStripMenuItem_LatencySetting_Click); - this.toolStripMenuItem_ChannelPan.Name = "toolStripMenuItem_ChannelPan"; - this.toolStripMenuItem_ChannelPan.Size = new Size(192, 22); - this.toolStripMenuItem_ChannelPan.Text = "$CHANNEL_PAN"; - this.toolStripMenuItem_ChannelPan.Click += new EventHandler(this.toolStripMenuItem_ChannelPan_Click); - this.toolStripMenuItem_Virtualization.Name = "toolStripMenuItem_Virtualization"; - this.toolStripMenuItem_Virtualization.Size = new Size(192, 22); - this.toolStripMenuItem_Virtualization.Text = "$VIRTUALIZATION"; - this.toolStripMenuItem_Virtualization.Click += new EventHandler(this.toolStripMenuItem_Virtualization_Click); - this.toolStripMenuItem_ResetEffect.Name = "toolStripMenuItem_ResetEffect"; - this.toolStripMenuItem_ResetEffect.Size = new Size(192, 22); - this.toolStripMenuItem_ResetEffect.Text = "$RESET_EFFECT"; - this.toolStripMenuItem_ResetEffect.Click += new EventHandler(this.toolStripMenuItem_ResetEffect_Click); - this.toolStripMenuItem_Settings.Name = "toolStripMenuItem_Settings"; - this.toolStripMenuItem_Settings.Size = new Size(192, 22); - this.toolStripMenuItem_Settings.Text = "$SETTINGS"; - this.toolStripMenuItem_Settings.Click += new EventHandler(this.toolStripMenuItem_Settings_Click); - this.toolStripMenuItem_Help.DropDownItems.AddRange(new ToolStripItem[2] - { - (ToolStripItem) this.toolStripMenuItem_CheckUpdate, - (ToolStripItem) this.toolStripMenuItem_AboutV4W - }); - this.toolStripMenuItem_Help.Name = "toolStripMenuItem_Help"; - this.toolStripMenuItem_Help.Size = new Size(99, 21); - this.toolStripMenuItem_Help.Text = "$MENU_HELP"; - this.toolStripMenuItem_CheckUpdate.Name = "toolStripMenuItem_CheckUpdate"; - this.toolStripMenuItem_CheckUpdate.Size = new Size(175, 22); - this.toolStripMenuItem_CheckUpdate.Text = "$CHECK_UPDATE"; - this.toolStripMenuItem_CheckUpdate.Click += new EventHandler(this.toolStripMenuItem_CheckUpdate_Click); - this.toolStripMenuItem_AboutV4W.Name = "toolStripMenuItem_AboutV4W"; - this.toolStripMenuItem_AboutV4W.Size = new Size(175, 22); - this.toolStripMenuItem_AboutV4W.Text = "$ABOUT"; - this.toolStripMenuItem_AboutV4W.Click += new EventHandler(this.toolStripMenuItem_AboutV4W_Click); - this.groupBox_Main.Controls.Add((Control) this.panel_Freestyle); - this.groupBox_Main.Controls.Add((Control) this.panel_MusicMode); - this.groupBox_Main.Location = new Point(186, 28); - this.groupBox_Main.Name = "groupBox_Main"; - this.groupBox_Main.Size = new Size(841, 572); - this.groupBox_Main.TabIndex = 5; - this.groupBox_Main.TabStop = false; - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_SmartVolume); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_3DSurround); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_singleButton_Compressor); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_singleButton_Equalizer); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_Reverb); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_Cure); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_Clarity); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_Bass); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_VHESurround); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_groupBox_Convolver); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_hSlider_PostVolume); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_label_PostVolume); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_hSlider_PreVolume); - this.panel_Freestyle.Controls.Add((Control) this.Freestyle_label_PreVolume); - this.panel_Freestyle.Dock = DockStyle.Fill; - this.panel_Freestyle.Location = new Point(3, 17); - this.panel_Freestyle.Name = "panel_Freestyle"; - this.panel_Freestyle.Size = new Size(835, 552); - this.panel_Freestyle.TabIndex = 10; - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_hSlider_SmartVolumeLevel); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_label_SmartVolume_Level); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_hSlider_SmartVolumeMaxLevel); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_label_SmartVolume_MaxLevel); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_hSlider_SmartVolumeRatio); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_label_SmartVolume_ControlStrength); - this.Freestyle_groupBox_SmartVolume.Controls.Add((Control) this.Freestyle_onOffSwitch_SmartVolume); - this.Freestyle_groupBox_SmartVolume.Location = new Point(216, 391); - this.Freestyle_groupBox_SmartVolume.Name = "Freestyle_groupBox_SmartVolume"; - this.Freestyle_groupBox_SmartVolume.Size = new Size(384, 148); - this.Freestyle_groupBox_SmartVolume.TabIndex = 23; - this.Freestyle_groupBox_SmartVolume.TabStop = false; - this.Freestyle_groupBox_SmartVolume.Text = "$SMART_VOLUME"; - this.Freestyle_hSlider_SmartVolumeLevel.BackColor = SystemColors.Control; - this.Freestyle_hSlider_SmartVolumeLevel.Location = new Point(195, 85); - this.Freestyle_hSlider_SmartVolumeLevel.MoveDelta = 1U; - this.Freestyle_hSlider_SmartVolumeLevel.Name = "Freestyle_hSlider_SmartVolumeLevel"; - this.Freestyle_hSlider_SmartVolumeLevel.Position = 0U; - this.Freestyle_hSlider_SmartVolumeLevel.PositionFloat = 0.0f; - this.Freestyle_hSlider_SmartVolumeLevel.Size = new Size(174, 39); - this.Freestyle_hSlider_SmartVolumeLevel.TabIndex = 23; - this.Freestyle_hSlider_SmartVolumeLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_SmartVolumeLevel_PositionChangeNotify); - this.Freestyle_label_SmartVolume_Level.AutoSize = true; - this.Freestyle_label_SmartVolume_Level.Location = new Point(214, 67); - this.Freestyle_label_SmartVolume_Level.Name = "Freestyle_label_SmartVolume_Level"; - this.Freestyle_label_SmartVolume_Level.Size = new Size(155, 12); - this.Freestyle_label_SmartVolume_Level.TabIndex = 22; - this.Freestyle_label_SmartVolume_Level.Text = "$SMART_VOLUME_LEVEL : 0dB"; - this.Freestyle_hSlider_SmartVolumeMaxLevel.BackColor = SystemColors.Control; - this.Freestyle_hSlider_SmartVolumeMaxLevel.Location = new Point(9, 115); - this.Freestyle_hSlider_SmartVolumeMaxLevel.MoveDelta = 1U; - this.Freestyle_hSlider_SmartVolumeMaxLevel.Name = "Freestyle_hSlider_SmartVolumeMaxLevel"; - this.Freestyle_hSlider_SmartVolumeMaxLevel.Position = 0U; - this.Freestyle_hSlider_SmartVolumeMaxLevel.PositionFloat = 0.0f; - this.Freestyle_hSlider_SmartVolumeMaxLevel.Size = new Size(161, 24); - this.Freestyle_hSlider_SmartVolumeMaxLevel.TabIndex = 21; - this.Freestyle_hSlider_SmartVolumeMaxLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_SmartVolumeMaxLevel_PositionChangeNotify); - this.Freestyle_label_SmartVolume_MaxLevel.AutoSize = true; - this.Freestyle_label_SmartVolume_MaxLevel.Location = new Point(19, 100); - this.Freestyle_label_SmartVolume_MaxLevel.Name = "Freestyle_label_SmartVolume_MaxLevel"; - this.Freestyle_label_SmartVolume_MaxLevel.Size = new Size(167, 12); - this.Freestyle_label_SmartVolume_MaxLevel.TabIndex = 20; - this.Freestyle_label_SmartVolume_MaxLevel.Text = "$SMART_VOLUME_MAXLEVEL : 1x"; - this.Freestyle_hSlider_SmartVolumeRatio.BackColor = SystemColors.Control; - this.Freestyle_hSlider_SmartVolumeRatio.Location = new Point(9, 73); - this.Freestyle_hSlider_SmartVolumeRatio.MoveDelta = 1U; - this.Freestyle_hSlider_SmartVolumeRatio.Name = "Freestyle_hSlider_SmartVolumeRatio"; - this.Freestyle_hSlider_SmartVolumeRatio.Position = 0U; - this.Freestyle_hSlider_SmartVolumeRatio.PositionFloat = 0.0f; - this.Freestyle_hSlider_SmartVolumeRatio.Size = new Size(161, 24); - this.Freestyle_hSlider_SmartVolumeRatio.TabIndex = 19; - this.Freestyle_hSlider_SmartVolumeRatio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_SmartVolumeRatio_PositionChangeNotify); - this.Freestyle_label_SmartVolume_ControlStrength.AutoSize = true; - this.Freestyle_label_SmartVolume_ControlStrength.Location = new Point(19, 58); - this.Freestyle_label_SmartVolume_ControlStrength.Name = "Freestyle_label_SmartVolume_ControlStrength"; - this.Freestyle_label_SmartVolume_ControlStrength.Size = new Size(185, 12); - this.Freestyle_label_SmartVolume_ControlStrength.TabIndex = 18; - this.Freestyle_label_SmartVolume_ControlStrength.Text = "$SMART_VOLUME_CONTROL_STRENGTH"; - this.Freestyle_onOffSwitch_SmartVolume.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_SmartVolume.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_SmartVolume.Name = "Freestyle_onOffSwitch_SmartVolume"; - this.Freestyle_onOffSwitch_SmartVolume.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_SmartVolume.SwitchedOn = false; - this.Freestyle_onOffSwitch_SmartVolume.TabIndex = 17; - this.Freestyle_onOffSwitch_SmartVolume.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_SmartVolume_SwitchChangeNotify); - this.Freestyle_groupBox_3DSurround.Controls.Add((Control) this.Freestyle_hSlider_SurroundImage); - this.Freestyle_groupBox_3DSurround.Controls.Add((Control) this.Freestyle_label_Surround_Image); - this.Freestyle_groupBox_3DSurround.Controls.Add((Control) this.Freestyle_hSlider_Surround3D); - this.Freestyle_groupBox_3DSurround.Controls.Add((Control) this.Freestyle_label_Surround_3D); - this.Freestyle_groupBox_3DSurround.Controls.Add((Control) this.Freestyle_onOffSwitch_Surround3D); - this.Freestyle_groupBox_3DSurround.Location = new Point(476, 6); - this.Freestyle_groupBox_3DSurround.Name = "Freestyle_groupBox_3DSurround"; - this.Freestyle_groupBox_3DSurround.Size = new Size(121, 179); - this.Freestyle_groupBox_3DSurround.TabIndex = 22; - this.Freestyle_groupBox_3DSurround.TabStop = false; - this.Freestyle_groupBox_3DSurround.Text = "$3D_SURROUND"; - this.Freestyle_hSlider_SurroundImage.BackColor = SystemColors.Control; - this.Freestyle_hSlider_SurroundImage.Location = new Point(6, 126); - this.Freestyle_hSlider_SurroundImage.MoveDelta = 1U; - this.Freestyle_hSlider_SurroundImage.Name = "Freestyle_hSlider_SurroundImage"; - this.Freestyle_hSlider_SurroundImage.Position = 0U; - this.Freestyle_hSlider_SurroundImage.PositionFloat = 0.0f; - this.Freestyle_hSlider_SurroundImage.Size = new Size(110, 24); - this.Freestyle_hSlider_SurroundImage.TabIndex = 25; - this.Freestyle_hSlider_SurroundImage.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_SurroundImage_PositionChangeNotify); - this.Freestyle_label_Surround_Image.AutoSize = true; - this.Freestyle_label_Surround_Image.Location = new Point(16, 111); - this.Freestyle_label_Surround_Image.Name = "Freestyle_label_Surround_Image"; - this.Freestyle_label_Surround_Image.Size = new Size(95, 12); - this.Freestyle_label_Surround_Image.TabIndex = 24; - this.Freestyle_label_Surround_Image.Text = "$SURROUND_IMAGE"; - this.Freestyle_hSlider_Surround3D.BackColor = SystemColors.Control; - this.Freestyle_hSlider_Surround3D.Location = new Point(6, 84); - this.Freestyle_hSlider_Surround3D.MoveDelta = 1U; - this.Freestyle_hSlider_Surround3D.Name = "Freestyle_hSlider_Surround3D"; - this.Freestyle_hSlider_Surround3D.Position = 0U; - this.Freestyle_hSlider_Surround3D.PositionFloat = 0.0f; - this.Freestyle_hSlider_Surround3D.Size = new Size(110, 24); - this.Freestyle_hSlider_Surround3D.TabIndex = 23; - this.Freestyle_hSlider_Surround3D.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_Surround3D_PositionChangeNotify); - this.Freestyle_label_Surround_3D.AutoSize = true; - this.Freestyle_label_Surround_3D.Location = new Point(16, 69); - this.Freestyle_label_Surround_3D.Name = "Freestyle_label_Surround_3D"; - this.Freestyle_label_Surround_3D.Size = new Size(77, 12); - this.Freestyle_label_Surround_3D.TabIndex = 22; - this.Freestyle_label_Surround_3D.Text = "$SURROUND_3D"; - this.Freestyle_onOffSwitch_Surround3D.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Surround3D.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Surround3D.Name = "Freestyle_onOffSwitch_Surround3D"; - this.Freestyle_onOffSwitch_Surround3D.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Surround3D.SwitchedOn = false; - this.Freestyle_onOffSwitch_Surround3D.TabIndex = 6; - this.Freestyle_onOffSwitch_Surround3D.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Surround3D_SwitchChangeNotify); - this.Freestyle_singleButton_Compressor.BackColor = SystemColors.Control; - this.Freestyle_singleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; - this.Freestyle_singleButton_Compressor.Location = new Point(30, 500); - this.Freestyle_singleButton_Compressor.Name = "Freestyle_singleButton_Compressor"; - this.Freestyle_singleButton_Compressor.Size = new Size(174, 39); - this.Freestyle_singleButton_Compressor.TabIndex = 21; - this.Freestyle_singleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Freestyle_singleButton_Compressor_ButtonClickNotify); - this.Freestyle_singleButton_Equalizer.BackColor = SystemColors.Control; - this.Freestyle_singleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; - this.Freestyle_singleButton_Equalizer.Location = new Point(30, 455); - this.Freestyle_singleButton_Equalizer.Name = "Freestyle_singleButton_Equalizer"; - this.Freestyle_singleButton_Equalizer.Size = new Size(174, 39); - this.Freestyle_singleButton_Equalizer.TabIndex = 20; - this.Freestyle_singleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Freestyle_singleButton_Equalizer_ButtonClickNotify); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_singleButton_ReverbPreset); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbMix); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_Mix); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbEarlyMix); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_EarlyMix); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbPreDelay); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_PreDelay); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbDecay); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_Decay); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbBandWidth); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_BandWidth); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbDensity); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_Density); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbDamping); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_Damping); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_hSlider_ReverbSize); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_label_Reverb_Size); - this.Freestyle_groupBox_Reverb.Controls.Add((Control) this.Freestyle_onOffSwitch_Reverb); - this.Freestyle_groupBox_Reverb.Location = new Point(606, 150); - this.Freestyle_groupBox_Reverb.Name = "Freestyle_groupBox_Reverb"; - this.Freestyle_groupBox_Reverb.Size = new Size(208, 389); - this.Freestyle_groupBox_Reverb.TabIndex = 19; - this.Freestyle_groupBox_Reverb.TabStop = false; - this.Freestyle_groupBox_Reverb.Text = "$REVERB"; - this.Freestyle_singleButton_ReverbPreset.BackColor = SystemColors.Control; - this.Freestyle_singleButton_ReverbPreset.ButtonText = "$PRESET"; - this.Freestyle_singleButton_ReverbPreset.Location = new Point(121, 14); - this.Freestyle_singleButton_ReverbPreset.Name = "Freestyle_singleButton_ReverbPreset"; - this.Freestyle_singleButton_ReverbPreset.Size = new Size(81, 29); - this.Freestyle_singleButton_ReverbPreset.TabIndex = 36; - this.Freestyle_singleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Freestyle_singleButton_ReverbPreset_ButtonClickNotify); - this.Freestyle_hSlider_ReverbMix.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbMix.Location = new Point(24, 356); - this.Freestyle_hSlider_ReverbMix.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbMix.Name = "Freestyle_hSlider_ReverbMix"; - this.Freestyle_hSlider_ReverbMix.Position = 0U; - this.Freestyle_hSlider_ReverbMix.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbMix.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbMix.TabIndex = 35; - this.Freestyle_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbMix_PositionChangeNotify); - this.Freestyle_label_Reverb_Mix.AutoSize = true; - this.Freestyle_label_Reverb_Mix.Location = new Point(34, 341); - this.Freestyle_label_Reverb_Mix.Name = "Freestyle_label_Reverb_Mix"; - this.Freestyle_label_Reverb_Mix.Size = new Size(71, 12); - this.Freestyle_label_Reverb_Mix.TabIndex = 34; - this.Freestyle_label_Reverb_Mix.Text = "$REVERB_MIX"; - this.Freestyle_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbEarlyMix.Location = new Point(24, 314); - this.Freestyle_hSlider_ReverbEarlyMix.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbEarlyMix.Name = "Freestyle_hSlider_ReverbEarlyMix"; - this.Freestyle_hSlider_ReverbEarlyMix.Position = 0U; - this.Freestyle_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbEarlyMix.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbEarlyMix.TabIndex = 33; - this.Freestyle_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbEarlyMix_PositionChangeNotify); - this.Freestyle_label_Reverb_EarlyMix.AutoSize = true; - this.Freestyle_label_Reverb_EarlyMix.Location = new Point(34, 299); - this.Freestyle_label_Reverb_EarlyMix.Name = "Freestyle_label_Reverb_EarlyMix"; - this.Freestyle_label_Reverb_EarlyMix.Size = new Size(101, 12); - this.Freestyle_label_Reverb_EarlyMix.TabIndex = 32; - this.Freestyle_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; - this.Freestyle_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbPreDelay.Location = new Point(24, 272); - this.Freestyle_hSlider_ReverbPreDelay.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbPreDelay.Name = "Freestyle_hSlider_ReverbPreDelay"; - this.Freestyle_hSlider_ReverbPreDelay.Position = 0U; - this.Freestyle_hSlider_ReverbPreDelay.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbPreDelay.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbPreDelay.TabIndex = 31; - this.Freestyle_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbPreDelay_PositionChangeNotify); - this.Freestyle_label_Reverb_PreDelay.AutoSize = true; - this.Freestyle_label_Reverb_PreDelay.Location = new Point(34, 257); - this.Freestyle_label_Reverb_PreDelay.Name = "Freestyle_label_Reverb_PreDelay"; - this.Freestyle_label_Reverb_PreDelay.Size = new Size(101, 12); - this.Freestyle_label_Reverb_PreDelay.TabIndex = 30; - this.Freestyle_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; - this.Freestyle_hSlider_ReverbDecay.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbDecay.Location = new Point(24, 230); - this.Freestyle_hSlider_ReverbDecay.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbDecay.Name = "Freestyle_hSlider_ReverbDecay"; - this.Freestyle_hSlider_ReverbDecay.Position = 0U; - this.Freestyle_hSlider_ReverbDecay.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbDecay.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbDecay.TabIndex = 29; - this.Freestyle_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbDecay_PositionChangeNotify); - this.Freestyle_label_Reverb_Decay.AutoSize = true; - this.Freestyle_label_Reverb_Decay.Location = new Point(34, 215); - this.Freestyle_label_Reverb_Decay.Name = "Freestyle_label_Reverb_Decay"; - this.Freestyle_label_Reverb_Decay.Size = new Size(83, 12); - this.Freestyle_label_Reverb_Decay.TabIndex = 28; - this.Freestyle_label_Reverb_Decay.Text = "$REVERB_DECAY"; - this.Freestyle_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbBandWidth.Location = new Point(24, 188); - this.Freestyle_hSlider_ReverbBandWidth.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbBandWidth.Name = "Freestyle_hSlider_ReverbBandWidth"; - this.Freestyle_hSlider_ReverbBandWidth.Position = 0U; - this.Freestyle_hSlider_ReverbBandWidth.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbBandWidth.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbBandWidth.TabIndex = 27; - this.Freestyle_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbBandWidth_PositionChangeNotify); - this.Freestyle_label_Reverb_BandWidth.AutoSize = true; - this.Freestyle_label_Reverb_BandWidth.Location = new Point(34, 173); - this.Freestyle_label_Reverb_BandWidth.Name = "Freestyle_label_Reverb_BandWidth"; - this.Freestyle_label_Reverb_BandWidth.Size = new Size(107, 12); - this.Freestyle_label_Reverb_BandWidth.TabIndex = 26; - this.Freestyle_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; - this.Freestyle_hSlider_ReverbDensity.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbDensity.Location = new Point(24, 146); - this.Freestyle_hSlider_ReverbDensity.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbDensity.Name = "Freestyle_hSlider_ReverbDensity"; - this.Freestyle_hSlider_ReverbDensity.Position = 0U; - this.Freestyle_hSlider_ReverbDensity.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbDensity.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbDensity.TabIndex = 25; - this.Freestyle_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbDensity_PositionChangeNotify); - this.Freestyle_label_Reverb_Density.AutoSize = true; - this.Freestyle_label_Reverb_Density.Location = new Point(34, 131); - this.Freestyle_label_Reverb_Density.Name = "Freestyle_label_Reverb_Density"; - this.Freestyle_label_Reverb_Density.Size = new Size(95, 12); - this.Freestyle_label_Reverb_Density.TabIndex = 24; - this.Freestyle_label_Reverb_Density.Text = "$REVERB_DENSITY"; - this.Freestyle_hSlider_ReverbDamping.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbDamping.Location = new Point(24, 104); - this.Freestyle_hSlider_ReverbDamping.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbDamping.Name = "Freestyle_hSlider_ReverbDamping"; - this.Freestyle_hSlider_ReverbDamping.Position = 0U; - this.Freestyle_hSlider_ReverbDamping.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbDamping.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbDamping.TabIndex = 23; - this.Freestyle_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbDamping_PositionChangeNotify); - this.Freestyle_label_Reverb_Damping.AutoSize = true; - this.Freestyle_label_Reverb_Damping.Location = new Point(34, 89); - this.Freestyle_label_Reverb_Damping.Name = "Freestyle_label_Reverb_Damping"; - this.Freestyle_label_Reverb_Damping.Size = new Size(95, 12); - this.Freestyle_label_Reverb_Damping.TabIndex = 22; - this.Freestyle_label_Reverb_Damping.Text = "$REVERB_DAMPING"; - this.Freestyle_hSlider_ReverbSize.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ReverbSize.Location = new Point(24, 64); - this.Freestyle_hSlider_ReverbSize.MoveDelta = 1U; - this.Freestyle_hSlider_ReverbSize.Name = "Freestyle_hSlider_ReverbSize"; - this.Freestyle_hSlider_ReverbSize.Position = 0U; - this.Freestyle_hSlider_ReverbSize.PositionFloat = 0.0f; - this.Freestyle_hSlider_ReverbSize.Size = new Size(161, 24); - this.Freestyle_hSlider_ReverbSize.TabIndex = 21; - this.Freestyle_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ReverbSize_PositionChangeNotify); - this.Freestyle_label_Reverb_Size.AutoSize = true; - this.Freestyle_label_Reverb_Size.Location = new Point(34, 49); - this.Freestyle_label_Reverb_Size.Name = "Freestyle_label_Reverb_Size"; - this.Freestyle_label_Reverb_Size.Size = new Size(77, 12); - this.Freestyle_label_Reverb_Size.TabIndex = 20; - this.Freestyle_label_Reverb_Size.Text = "$REVERB_SIZE"; - this.Freestyle_onOffSwitch_Reverb.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Reverb.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Reverb.Name = "Freestyle_onOffSwitch_Reverb"; - this.Freestyle_onOffSwitch_Reverb.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Reverb.SwitchedOn = false; - this.Freestyle_onOffSwitch_Reverb.TabIndex = 7; - this.Freestyle_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Reverb_SwitchChangeNotify); - this.Freestyle_groupBox_Cure.Controls.Add((Control) this.Freestyle_buttonBox_CureLevel); - this.Freestyle_groupBox_Cure.Controls.Add((Control) this.Freestyle_onOffSwitch_Cure); - this.Freestyle_groupBox_Cure.Controls.Add((Control) this.Freestyle_label_Tube); - this.Freestyle_groupBox_Cure.Controls.Add((Control) this.Freestyle_onOffSwitch_Tube); - this.Freestyle_groupBox_Cure.Location = new Point(411, 214); - this.Freestyle_groupBox_Cure.Name = "Freestyle_groupBox_Cure"; - this.Freestyle_groupBox_Cure.Size = new Size(189, 148); - this.Freestyle_groupBox_Cure.TabIndex = 18; - this.Freestyle_groupBox_Cure.TabStop = false; - this.Freestyle_groupBox_Cure.Text = "$CURE"; - this.Freestyle_buttonBox_CureLevel.BackColor = SystemColors.Control; - this.Freestyle_buttonBox_CureLevel.Location = new Point(68, 17); - this.Freestyle_buttonBox_CureLevel.Name = "Freestyle_buttonBox_CureLevel"; - this.Freestyle_buttonBox_CureLevel.Size = new Size(106, 70); - this.Freestyle_buttonBox_CureLevel.TabIndex = 18; - this.Freestyle_buttonBox_CureLevel.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Freestyle_buttonBox_CureLevel_ItemSelectedNotify); - this.Freestyle_onOffSwitch_Cure.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Cure.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Cure.Name = "Freestyle_onOffSwitch_Cure"; - this.Freestyle_onOffSwitch_Cure.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Cure.SwitchedOn = false; - this.Freestyle_onOffSwitch_Cure.TabIndex = 17; - this.Freestyle_onOffSwitch_Cure.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Cure_SwitchChangeNotify); - this.Freestyle_label_Tube.AutoSize = true; - this.Freestyle_label_Tube.Location = new Point(11, 113); - this.Freestyle_label_Tube.Name = "Freestyle_label_Tube"; - this.Freestyle_label_Tube.Size = new Size(35, 12); - this.Freestyle_label_Tube.TabIndex = 14; - this.Freestyle_label_Tube.Text = "$TUBE"; - this.Freestyle_onOffSwitch_Tube.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Tube.Location = new Point(121, 105); - this.Freestyle_onOffSwitch_Tube.Name = "Freestyle_onOffSwitch_Tube"; - this.Freestyle_onOffSwitch_Tube.Size = new Size(53, 26); - this.Freestyle_onOffSwitch_Tube.SwitchedOn = false; - this.Freestyle_onOffSwitch_Tube.TabIndex = 15; - this.Freestyle_onOffSwitch_Tube.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Tube_SwitchChangeNotify); - this.Freestyle_groupBox_Clarity.Controls.Add((Control) this.Freestyle_buttonBox_ClarityMode); - this.Freestyle_groupBox_Clarity.Controls.Add((Control) this.Freestyle_hSlider_Clarity); - this.Freestyle_groupBox_Clarity.Controls.Add((Control) this.Freestyle_label_Clarity); - this.Freestyle_groupBox_Clarity.Controls.Add((Control) this.Freestyle_onOffSwitch_Clarity); - this.Freestyle_groupBox_Clarity.Location = new Point(216, 214); - this.Freestyle_groupBox_Clarity.Name = "Freestyle_groupBox_Clarity"; - this.Freestyle_groupBox_Clarity.Size = new Size(189, 148); - this.Freestyle_groupBox_Clarity.TabIndex = 17; - this.Freestyle_groupBox_Clarity.TabStop = false; - this.Freestyle_groupBox_Clarity.Text = "$CLARITY"; - this.Freestyle_buttonBox_ClarityMode.BackColor = SystemColors.Control; - this.Freestyle_buttonBox_ClarityMode.Location = new Point(68, 17); - this.Freestyle_buttonBox_ClarityMode.Name = "Freestyle_buttonBox_ClarityMode"; - this.Freestyle_buttonBox_ClarityMode.Size = new Size(106, 70); - this.Freestyle_buttonBox_ClarityMode.TabIndex = 18; - this.Freestyle_buttonBox_ClarityMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Freestyle_buttonBox_ClarityMode_ItemSelectedNotify); - this.Freestyle_hSlider_Clarity.BackColor = SystemColors.Control; - this.Freestyle_hSlider_Clarity.Location = new Point(13, 115); - this.Freestyle_hSlider_Clarity.MoveDelta = 1U; - this.Freestyle_hSlider_Clarity.Name = "Freestyle_hSlider_Clarity"; - this.Freestyle_hSlider_Clarity.Position = 0U; - this.Freestyle_hSlider_Clarity.PositionFloat = 0.0f; - this.Freestyle_hSlider_Clarity.Size = new Size(161, 24); - this.Freestyle_hSlider_Clarity.TabIndex = 21; - this.Freestyle_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_Clarity_PositionChangeNotify); - this.Freestyle_label_Clarity.AutoSize = true; - this.Freestyle_label_Clarity.Location = new Point(23, 100); - this.Freestyle_label_Clarity.Name = "Freestyle_label_Clarity"; - this.Freestyle_label_Clarity.Size = new Size(89, 12); - this.Freestyle_label_Clarity.TabIndex = 20; - this.Freestyle_label_Clarity.Text = "$CLARITY : 0dB"; - this.Freestyle_onOffSwitch_Clarity.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Clarity.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Clarity.Name = "Freestyle_onOffSwitch_Clarity"; - this.Freestyle_onOffSwitch_Clarity.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Clarity.SwitchedOn = false; - this.Freestyle_onOffSwitch_Clarity.TabIndex = 17; - this.Freestyle_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Clarity_SwitchChangeNotify); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_buttonBox_BassMode); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_hSlider_BassGain); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_label_Bass_Gain); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_hSlider_BassSpkSize); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_label_Bass_SpkSize); - this.Freestyle_groupBox_Bass.Controls.Add((Control) this.Freestyle_onOffSwitch_Bass); - this.Freestyle_groupBox_Bass.Location = new Point(21, 214); - this.Freestyle_groupBox_Bass.Name = "Freestyle_groupBox_Bass"; - this.Freestyle_groupBox_Bass.Size = new Size(189, 223); - this.Freestyle_groupBox_Bass.TabIndex = 16; - this.Freestyle_groupBox_Bass.TabStop = false; - this.Freestyle_groupBox_Bass.Text = "$BASS"; - this.Freestyle_buttonBox_BassMode.BackColor = SystemColors.Control; - this.Freestyle_buttonBox_BassMode.Location = new Point(21, 150); - this.Freestyle_buttonBox_BassMode.Name = "Freestyle_buttonBox_BassMode"; - this.Freestyle_buttonBox_BassMode.Size = new Size(143, 61); - this.Freestyle_buttonBox_BassMode.TabIndex = 22; - this.Freestyle_buttonBox_BassMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Freestyle_buttonBox_BassMode_ItemSelectedNotify); - this.Freestyle_hSlider_BassGain.BackColor = SystemColors.Control; - this.Freestyle_hSlider_BassGain.Location = new Point(13, 115); - this.Freestyle_hSlider_BassGain.MoveDelta = 1U; - this.Freestyle_hSlider_BassGain.Name = "Freestyle_hSlider_BassGain"; - this.Freestyle_hSlider_BassGain.Position = 0U; - this.Freestyle_hSlider_BassGain.PositionFloat = 0.0f; - this.Freestyle_hSlider_BassGain.Size = new Size(161, 24); - this.Freestyle_hSlider_BassGain.TabIndex = 21; - this.Freestyle_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_BassGain_PositionChangeNotify); - this.Freestyle_label_Bass_Gain.AutoSize = true; - this.Freestyle_label_Bass_Gain.Location = new Point(23, 100); - this.Freestyle_label_Bass_Gain.Name = "Freestyle_label_Bass_Gain"; - this.Freestyle_label_Bass_Gain.Size = new Size(101, 12); - this.Freestyle_label_Bass_Gain.TabIndex = 20; - this.Freestyle_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; - this.Freestyle_hSlider_BassSpkSize.BackColor = SystemColors.Control; - this.Freestyle_hSlider_BassSpkSize.Location = new Point(13, 73); - this.Freestyle_hSlider_BassSpkSize.MoveDelta = 1U; - this.Freestyle_hSlider_BassSpkSize.Name = "Freestyle_hSlider_BassSpkSize"; - this.Freestyle_hSlider_BassSpkSize.Position = 0U; - this.Freestyle_hSlider_BassSpkSize.PositionFloat = 0.0f; - this.Freestyle_hSlider_BassSpkSize.Size = new Size(161, 24); - this.Freestyle_hSlider_BassSpkSize.TabIndex = 19; - this.Freestyle_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_BassSpkSize_PositionChangeNotify); - this.Freestyle_label_Bass_SpkSize.AutoSize = true; - this.Freestyle_label_Bass_SpkSize.Location = new Point(23, 58); - this.Freestyle_label_Bass_SpkSize.Name = "Freestyle_label_Bass_SpkSize"; - this.Freestyle_label_Bass_SpkSize.Size = new Size(83, 12); - this.Freestyle_label_Bass_SpkSize.TabIndex = 18; - this.Freestyle_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; - this.Freestyle_onOffSwitch_Bass.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Bass.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Bass.Name = "Freestyle_onOffSwitch_Bass"; - this.Freestyle_onOffSwitch_Bass.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Bass.SwitchedOn = false; - this.Freestyle_onOffSwitch_Bass.TabIndex = 17; - this.Freestyle_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Bass_SwitchChangeNotify); - this.Freestyle_groupBox_VHESurround.Controls.Add((Control) this.Freestyle_buttonBox_SurroundVHERoomSize); - this.Freestyle_groupBox_VHESurround.Controls.Add((Control) this.Freestyle_onOffSwitch_SurroundVHE); - this.Freestyle_groupBox_VHESurround.Location = new Point(606, 6); - this.Freestyle_groupBox_VHESurround.Name = "Freestyle_groupBox_VHESurround"; - this.Freestyle_groupBox_VHESurround.Size = new Size(208, 138); - this.Freestyle_groupBox_VHESurround.TabIndex = 13; - this.Freestyle_groupBox_VHESurround.TabStop = false; - this.Freestyle_groupBox_VHESurround.Text = "$VHE_SURROUND"; - this.Freestyle_buttonBox_SurroundVHERoomSize.BackColor = SystemColors.Control; - this.Freestyle_buttonBox_SurroundVHERoomSize.Location = new Point(68, 23); - this.Freestyle_buttonBox_SurroundVHERoomSize.Name = "Freestyle_buttonBox_SurroundVHERoomSize"; - this.Freestyle_buttonBox_SurroundVHERoomSize.Size = new Size((int) sbyte.MaxValue, 101); - this.Freestyle_buttonBox_SurroundVHERoomSize.TabIndex = 7; - this.Freestyle_buttonBox_SurroundVHERoomSize.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Freestyle_buttonBox_SurroundVHERoomSize_ItemSelectedNotify); - this.Freestyle_onOffSwitch_SurroundVHE.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_SurroundVHE.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_SurroundVHE.Name = "Freestyle_onOffSwitch_SurroundVHE"; - this.Freestyle_onOffSwitch_SurroundVHE.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_SurroundVHE.SwitchedOn = false; - this.Freestyle_onOffSwitch_SurroundVHE.TabIndex = 6; - this.Freestyle_onOffSwitch_SurroundVHE.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_SurroundVHE_SwitchChangeNotify); - this.Freestyle_groupBox_Convolver.Controls.Add((Control) this.Freestyle_irShape_ConvIR); - this.Freestyle_groupBox_Convolver.Controls.Add((Control) this.Freestyle_onOffSwitch_Convolver); - this.Freestyle_groupBox_Convolver.Controls.Add((Control) this.Freestyle_hSlider_ConvIRGain); - this.Freestyle_groupBox_Convolver.Controls.Add((Control) this.Freestyle_openFileBox_ConvIRS); - this.Freestyle_groupBox_Convolver.Controls.Add((Control) this.Freestyle_label_ConvolverIRGain); - this.Freestyle_groupBox_Convolver.Location = new Point(235, 6); - this.Freestyle_groupBox_Convolver.Name = "Freestyle_groupBox_Convolver"; - this.Freestyle_groupBox_Convolver.Size = new Size(235, 179); - this.Freestyle_groupBox_Convolver.TabIndex = 12; - this.Freestyle_groupBox_Convolver.TabStop = false; - this.Freestyle_groupBox_Convolver.Text = "$CONVOLVER"; - this.Freestyle_irShape_ConvIR.Location = new Point(13, 61); - this.Freestyle_irShape_ConvIR.Name = "Freestyle_irShape_ConvIR"; - this.Freestyle_irShape_ConvIR.ShapeBackColor = Color.White; - this.Freestyle_irShape_ConvIR.ShapeForeColor = Color.Black; - this.Freestyle_irShape_ConvIR.Size = new Size(209, 63); - this.Freestyle_irShape_ConvIR.TabIndex = 8; - this.Freestyle_onOffSwitch_Convolver.BackColor = Color.Transparent; - this.Freestyle_onOffSwitch_Convolver.Location = new Point(13, 23); - this.Freestyle_onOffSwitch_Convolver.Name = "Freestyle_onOffSwitch_Convolver"; - this.Freestyle_onOffSwitch_Convolver.Size = new Size(49, 20); - this.Freestyle_onOffSwitch_Convolver.SwitchedOn = false; - this.Freestyle_onOffSwitch_Convolver.TabIndex = 5; - this.Freestyle_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Freestyle_onOffSwitch_Convolver_SwitchChangeNotify); - this.Freestyle_hSlider_ConvIRGain.BackColor = SystemColors.Control; - this.Freestyle_hSlider_ConvIRGain.Location = new Point(85, 31); - this.Freestyle_hSlider_ConvIRGain.MoveDelta = 1U; - this.Freestyle_hSlider_ConvIRGain.Name = "Freestyle_hSlider_ConvIRGain"; - this.Freestyle_hSlider_ConvIRGain.Position = 0U; - this.Freestyle_hSlider_ConvIRGain.PositionFloat = 0.0f; - this.Freestyle_hSlider_ConvIRGain.Size = new Size(137, 24); - this.Freestyle_hSlider_ConvIRGain.TabIndex = 7; - this.Freestyle_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_ConvIRGain_PositionChangeNotify); - this.Freestyle_openFileBox_ConvIRS.BackColor = SystemColors.Control; - this.Freestyle_openFileBox_ConvIRS.FilePathName = ""; - this.Freestyle_openFileBox_ConvIRS.Location = new Point(13, 136); - this.Freestyle_openFileBox_ConvIRS.Name = "Freestyle_openFileBox_ConvIRS"; - this.Freestyle_openFileBox_ConvIRS.Size = new Size(209, 29); - this.Freestyle_openFileBox_ConvIRS.TabIndex = 9; - this.Freestyle_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(this.Freestyle_openFileBox_ConvIRS_FileChangeNotify); - this.Freestyle_label_ConvolverIRGain.AutoSize = true; - this.Freestyle_label_ConvolverIRGain.Location = new Point(95, 16); - this.Freestyle_label_ConvolverIRGain.Name = "Freestyle_label_ConvolverIRGain"; - this.Freestyle_label_ConvolverIRGain.Size = new Size(119, 12); - this.Freestyle_label_ConvolverIRGain.TabIndex = 6; - this.Freestyle_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; - this.Freestyle_hSlider_PostVolume.BackColor = SystemColors.Control; - this.Freestyle_hSlider_PostVolume.Location = new Point(21, 118); - this.Freestyle_hSlider_PostVolume.MoveDelta = 1U; - this.Freestyle_hSlider_PostVolume.Name = "Freestyle_hSlider_PostVolume"; - this.Freestyle_hSlider_PostVolume.Position = 0U; - this.Freestyle_hSlider_PostVolume.PositionFloat = 0.0f; - this.Freestyle_hSlider_PostVolume.Size = new Size(208, 39); - this.Freestyle_hSlider_PostVolume.TabIndex = 3; - this.Freestyle_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_PostVolume_PositionChangeNotify); - this.Freestyle_label_PostVolume.AutoSize = true; - this.Freestyle_label_PostVolume.Location = new Point(40, 100); - this.Freestyle_label_PostVolume.Name = "Freestyle_label_PostVolume"; - this.Freestyle_label_PostVolume.Size = new Size(113, 12); - this.Freestyle_label_PostVolume.TabIndex = 2; - this.Freestyle_label_PostVolume.Text = "$POST_VOLUME : 0dB"; - this.Freestyle_hSlider_PreVolume.BackColor = SystemColors.Control; - this.Freestyle_hSlider_PreVolume.Location = new Point(21, 39); - this.Freestyle_hSlider_PreVolume.MoveDelta = 1U; - this.Freestyle_hSlider_PreVolume.Name = "Freestyle_hSlider_PreVolume"; - this.Freestyle_hSlider_PreVolume.Position = 0U; - this.Freestyle_hSlider_PreVolume.PositionFloat = 0.0f; - this.Freestyle_hSlider_PreVolume.Size = new Size(208, 39); - this.Freestyle_hSlider_PreVolume.TabIndex = 1; - this.Freestyle_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Freestyle_hSlider_PreVolume_PositionChangeNotify); - this.Freestyle_label_PreVolume.AutoSize = true; - this.Freestyle_label_PreVolume.Location = new Point(40, 21); - this.Freestyle_label_PreVolume.Name = "Freestyle_label_PreVolume"; - this.Freestyle_label_PreVolume.Size = new Size(107, 12); - this.Freestyle_label_PreVolume.TabIndex = 0; - this.Freestyle_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; - this.panel_MusicMode.Controls.Add((Control) this.panel_MovieMode); - this.panel_MusicMode.Controls.Add((Control) this.Music_singleButton_Compressor); - this.panel_MusicMode.Controls.Add((Control) this.Music_singleButton_Equalizer); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Reverb); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Cure); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Clarity); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Bass); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Surround); - this.panel_MusicMode.Controls.Add((Control) this.Music_groupBox_Convolver); - this.panel_MusicMode.Controls.Add((Control) this.Music_hSlider_PostVolume); - this.panel_MusicMode.Controls.Add((Control) this.Music_label_PostVolume); - this.panel_MusicMode.Controls.Add((Control) this.Music_hSlider_PreVolume); - this.panel_MusicMode.Controls.Add((Control) this.Music_label_PreVolume); - this.panel_MusicMode.Dock = DockStyle.Fill; - this.panel_MusicMode.Location = new Point(3, 17); - this.panel_MusicMode.Name = "panel_MusicMode"; - this.panel_MusicMode.Size = new Size(835, 552); - this.panel_MusicMode.TabIndex = 0; - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_SmartVolume); - this.panel_MovieMode.Controls.Add((Control) this.Movie_singleButton_Compressor); - this.panel_MovieMode.Controls.Add((Control) this.Movie_singleButton_Equalizer); - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_Reverb); - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_Clarity); - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_Bass); - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_Surround); - this.panel_MovieMode.Controls.Add((Control) this.Movie_groupBox_Convolver); - this.panel_MovieMode.Controls.Add((Control) this.Movie_hSlider_PostVolume); - this.panel_MovieMode.Controls.Add((Control) this.Movie_label_PostVolume); - this.panel_MovieMode.Controls.Add((Control) this.Movie_hSlider_PreVolume); - this.panel_MovieMode.Controls.Add((Control) this.Movie_label_PreVolume); - this.panel_MovieMode.Dock = DockStyle.Fill; - this.panel_MovieMode.Location = new Point(0, 0); - this.panel_MovieMode.Name = "panel_MovieMode"; - this.panel_MovieMode.Size = new Size(835, 552); - this.panel_MovieMode.TabIndex = 9; - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_hSlider_SmartVolumeLevel); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_label_SmartVolume_Level); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_hSlider_SmartVolumeMaxLevel); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_label_SmartVolume_MaxLevel); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_hSlider_SmartVolumeRatio); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_label_SmartVolume_ControlStrength); - this.Movie_groupBox_SmartVolume.Controls.Add((Control) this.Movie_onOffSwitch_SmartVolume); - this.Movie_groupBox_SmartVolume.Location = new Point(21, 391); - this.Movie_groupBox_SmartVolume.Name = "Movie_groupBox_SmartVolume"; - this.Movie_groupBox_SmartVolume.Size = new Size(579, 148); - this.Movie_groupBox_SmartVolume.TabIndex = 22; - this.Movie_groupBox_SmartVolume.TabStop = false; - this.Movie_groupBox_SmartVolume.Text = "$SMART_VOLUME"; - this.Movie_hSlider_SmartVolumeLevel.BackColor = SystemColors.Control; - this.Movie_hSlider_SmartVolumeLevel.Location = new Point(254, 78); - this.Movie_hSlider_SmartVolumeLevel.MoveDelta = 1U; - this.Movie_hSlider_SmartVolumeLevel.Name = "Movie_hSlider_SmartVolumeLevel"; - this.Movie_hSlider_SmartVolumeLevel.Position = 0U; - this.Movie_hSlider_SmartVolumeLevel.PositionFloat = 0.0f; - this.Movie_hSlider_SmartVolumeLevel.Size = new Size(319, 39); - this.Movie_hSlider_SmartVolumeLevel.TabIndex = 23; - this.Movie_hSlider_SmartVolumeLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_SmartVolumeLevel_PositionChangeNotify); - this.Movie_label_SmartVolume_Level.AutoSize = true; - this.Movie_label_SmartVolume_Level.Location = new Point(273, 60); - this.Movie_label_SmartVolume_Level.Name = "Movie_label_SmartVolume_Level"; - this.Movie_label_SmartVolume_Level.Size = new Size(155, 12); - this.Movie_label_SmartVolume_Level.TabIndex = 22; - this.Movie_label_SmartVolume_Level.Text = "$SMART_VOLUME_LEVEL : 0dB"; - this.Movie_hSlider_SmartVolumeMaxLevel.BackColor = SystemColors.Control; - this.Movie_hSlider_SmartVolumeMaxLevel.Location = new Point(13, 115); - this.Movie_hSlider_SmartVolumeMaxLevel.MoveDelta = 1U; - this.Movie_hSlider_SmartVolumeMaxLevel.Name = "Movie_hSlider_SmartVolumeMaxLevel"; - this.Movie_hSlider_SmartVolumeMaxLevel.Position = 0U; - this.Movie_hSlider_SmartVolumeMaxLevel.PositionFloat = 0.0f; - this.Movie_hSlider_SmartVolumeMaxLevel.Size = new Size(161, 24); - this.Movie_hSlider_SmartVolumeMaxLevel.TabIndex = 21; - this.Movie_hSlider_SmartVolumeMaxLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_SmartVolumeMaxLevel_PositionChangeNotify); - this.Movie_label_SmartVolume_MaxLevel.AutoSize = true; - this.Movie_label_SmartVolume_MaxLevel.Location = new Point(23, 100); - this.Movie_label_SmartVolume_MaxLevel.Name = "Movie_label_SmartVolume_MaxLevel"; - this.Movie_label_SmartVolume_MaxLevel.Size = new Size(167, 12); - this.Movie_label_SmartVolume_MaxLevel.TabIndex = 20; - this.Movie_label_SmartVolume_MaxLevel.Text = "$SMART_VOLUME_MAXLEVEL : 1x"; - this.Movie_hSlider_SmartVolumeRatio.BackColor = SystemColors.Control; - this.Movie_hSlider_SmartVolumeRatio.Location = new Point(13, 73); - this.Movie_hSlider_SmartVolumeRatio.MoveDelta = 1U; - this.Movie_hSlider_SmartVolumeRatio.Name = "Movie_hSlider_SmartVolumeRatio"; - this.Movie_hSlider_SmartVolumeRatio.Position = 0U; - this.Movie_hSlider_SmartVolumeRatio.PositionFloat = 0.0f; - this.Movie_hSlider_SmartVolumeRatio.Size = new Size(161, 24); - this.Movie_hSlider_SmartVolumeRatio.TabIndex = 19; - this.Movie_hSlider_SmartVolumeRatio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_SmartVolumeRatio_PositionChangeNotify); - this.Movie_label_SmartVolume_ControlStrength.AutoSize = true; - this.Movie_label_SmartVolume_ControlStrength.Location = new Point(23, 58); - this.Movie_label_SmartVolume_ControlStrength.Name = "Movie_label_SmartVolume_ControlStrength"; - this.Movie_label_SmartVolume_ControlStrength.Size = new Size(185, 12); - this.Movie_label_SmartVolume_ControlStrength.TabIndex = 18; - this.Movie_label_SmartVolume_ControlStrength.Text = "$SMART_VOLUME_CONTROL_STRENGTH"; - this.Movie_onOffSwitch_SmartVolume.BackColor = Color.Transparent; - this.Movie_onOffSwitch_SmartVolume.Location = new Point(13, 23); - this.Movie_onOffSwitch_SmartVolume.Name = "Movie_onOffSwitch_SmartVolume"; - this.Movie_onOffSwitch_SmartVolume.Size = new Size(49, 20); - this.Movie_onOffSwitch_SmartVolume.SwitchedOn = false; - this.Movie_onOffSwitch_SmartVolume.TabIndex = 17; - this.Movie_onOffSwitch_SmartVolume.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_SmartVolume_SwitchChangeNotify); - this.Movie_singleButton_Compressor.BackColor = SystemColors.Control; - this.Movie_singleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; - this.Movie_singleButton_Compressor.Location = new Point(420, 301); - this.Movie_singleButton_Compressor.Name = "Movie_singleButton_Compressor"; - this.Movie_singleButton_Compressor.Size = new Size(174, 39); - this.Movie_singleButton_Compressor.TabIndex = 21; - this.Movie_singleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Movie_singleButton_Compressor_ButtonClickNotify); - this.Movie_singleButton_Equalizer.BackColor = SystemColors.Control; - this.Movie_singleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; - this.Movie_singleButton_Equalizer.Location = new Point(420, 245); - this.Movie_singleButton_Equalizer.Name = "Movie_singleButton_Equalizer"; - this.Movie_singleButton_Equalizer.Size = new Size(174, 39); - this.Movie_singleButton_Equalizer.TabIndex = 20; - this.Movie_singleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Movie_singleButton_Equalizer_ButtonClickNotify); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_singleButton_ReverbPreset); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbMix); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_Mix); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbEarlyMix); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_EarlyMix); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbPreDelay); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_PreDelay); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbDecay); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_Decay); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbBandWidth); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_BandWidth); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbDensity); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_Density); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbDamping); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_Damping); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_hSlider_ReverbSize); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_label_Reverb_Size); - this.Movie_groupBox_Reverb.Controls.Add((Control) this.Movie_onOffSwitch_Reverb); - this.Movie_groupBox_Reverb.Location = new Point(606, 150); - this.Movie_groupBox_Reverb.Name = "Movie_groupBox_Reverb"; - this.Movie_groupBox_Reverb.Size = new Size(208, 389); - this.Movie_groupBox_Reverb.TabIndex = 19; - this.Movie_groupBox_Reverb.TabStop = false; - this.Movie_groupBox_Reverb.Text = "$REVERB"; - this.Movie_singleButton_ReverbPreset.BackColor = SystemColors.Control; - this.Movie_singleButton_ReverbPreset.ButtonText = "$PRESET"; - this.Movie_singleButton_ReverbPreset.Location = new Point(121, 14); - this.Movie_singleButton_ReverbPreset.Name = "Movie_singleButton_ReverbPreset"; - this.Movie_singleButton_ReverbPreset.Size = new Size(81, 29); - this.Movie_singleButton_ReverbPreset.TabIndex = 36; - this.Movie_singleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Movie_singleButton_ReverbPreset_ButtonClickNotify); - this.Movie_hSlider_ReverbMix.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbMix.Location = new Point(24, 356); - this.Movie_hSlider_ReverbMix.MoveDelta = 1U; - this.Movie_hSlider_ReverbMix.Name = "Movie_hSlider_ReverbMix"; - this.Movie_hSlider_ReverbMix.Position = 0U; - this.Movie_hSlider_ReverbMix.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbMix.Size = new Size(161, 24); - this.Movie_hSlider_ReverbMix.TabIndex = 35; - this.Movie_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbMix_PositionChangeNotify); - this.Movie_label_Reverb_Mix.AutoSize = true; - this.Movie_label_Reverb_Mix.Location = new Point(34, 341); - this.Movie_label_Reverb_Mix.Name = "Movie_label_Reverb_Mix"; - this.Movie_label_Reverb_Mix.Size = new Size(71, 12); - this.Movie_label_Reverb_Mix.TabIndex = 34; - this.Movie_label_Reverb_Mix.Text = "$REVERB_MIX"; - this.Movie_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbEarlyMix.Location = new Point(24, 314); - this.Movie_hSlider_ReverbEarlyMix.MoveDelta = 1U; - this.Movie_hSlider_ReverbEarlyMix.Name = "Movie_hSlider_ReverbEarlyMix"; - this.Movie_hSlider_ReverbEarlyMix.Position = 0U; - this.Movie_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbEarlyMix.Size = new Size(161, 24); - this.Movie_hSlider_ReverbEarlyMix.TabIndex = 33; - this.Movie_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbEarlyMix_PositionChangeNotify); - this.Movie_label_Reverb_EarlyMix.AutoSize = true; - this.Movie_label_Reverb_EarlyMix.Location = new Point(34, 299); - this.Movie_label_Reverb_EarlyMix.Name = "Movie_label_Reverb_EarlyMix"; - this.Movie_label_Reverb_EarlyMix.Size = new Size(101, 12); - this.Movie_label_Reverb_EarlyMix.TabIndex = 32; - this.Movie_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; - this.Movie_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbPreDelay.Location = new Point(24, 272); - this.Movie_hSlider_ReverbPreDelay.MoveDelta = 1U; - this.Movie_hSlider_ReverbPreDelay.Name = "Movie_hSlider_ReverbPreDelay"; - this.Movie_hSlider_ReverbPreDelay.Position = 0U; - this.Movie_hSlider_ReverbPreDelay.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbPreDelay.Size = new Size(161, 24); - this.Movie_hSlider_ReverbPreDelay.TabIndex = 31; - this.Movie_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbPreDelay_PositionChangeNotify); - this.Movie_label_Reverb_PreDelay.AutoSize = true; - this.Movie_label_Reverb_PreDelay.Location = new Point(34, 257); - this.Movie_label_Reverb_PreDelay.Name = "Movie_label_Reverb_PreDelay"; - this.Movie_label_Reverb_PreDelay.Size = new Size(101, 12); - this.Movie_label_Reverb_PreDelay.TabIndex = 30; - this.Movie_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; - this.Movie_hSlider_ReverbDecay.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbDecay.Location = new Point(24, 230); - this.Movie_hSlider_ReverbDecay.MoveDelta = 1U; - this.Movie_hSlider_ReverbDecay.Name = "Movie_hSlider_ReverbDecay"; - this.Movie_hSlider_ReverbDecay.Position = 0U; - this.Movie_hSlider_ReverbDecay.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbDecay.Size = new Size(161, 24); - this.Movie_hSlider_ReverbDecay.TabIndex = 29; - this.Movie_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbDecay_PositionChangeNotify); - this.Movie_label_Reverb_Decay.AutoSize = true; - this.Movie_label_Reverb_Decay.Location = new Point(34, 215); - this.Movie_label_Reverb_Decay.Name = "Movie_label_Reverb_Decay"; - this.Movie_label_Reverb_Decay.Size = new Size(83, 12); - this.Movie_label_Reverb_Decay.TabIndex = 28; - this.Movie_label_Reverb_Decay.Text = "$REVERB_DECAY"; - this.Movie_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbBandWidth.Location = new Point(24, 188); - this.Movie_hSlider_ReverbBandWidth.MoveDelta = 1U; - this.Movie_hSlider_ReverbBandWidth.Name = "Movie_hSlider_ReverbBandWidth"; - this.Movie_hSlider_ReverbBandWidth.Position = 0U; - this.Movie_hSlider_ReverbBandWidth.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbBandWidth.Size = new Size(161, 24); - this.Movie_hSlider_ReverbBandWidth.TabIndex = 27; - this.Movie_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbBandWidth_PositionChangeNotify); - this.Movie_label_Reverb_BandWidth.AutoSize = true; - this.Movie_label_Reverb_BandWidth.Location = new Point(34, 173); - this.Movie_label_Reverb_BandWidth.Name = "Movie_label_Reverb_BandWidth"; - this.Movie_label_Reverb_BandWidth.Size = new Size(107, 12); - this.Movie_label_Reverb_BandWidth.TabIndex = 26; - this.Movie_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; - this.Movie_hSlider_ReverbDensity.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbDensity.Location = new Point(24, 146); - this.Movie_hSlider_ReverbDensity.MoveDelta = 1U; - this.Movie_hSlider_ReverbDensity.Name = "Movie_hSlider_ReverbDensity"; - this.Movie_hSlider_ReverbDensity.Position = 0U; - this.Movie_hSlider_ReverbDensity.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbDensity.Size = new Size(161, 24); - this.Movie_hSlider_ReverbDensity.TabIndex = 25; - this.Movie_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbDensity_PositionChangeNotify); - this.Movie_label_Reverb_Density.AutoSize = true; - this.Movie_label_Reverb_Density.Location = new Point(34, 131); - this.Movie_label_Reverb_Density.Name = "Movie_label_Reverb_Density"; - this.Movie_label_Reverb_Density.Size = new Size(95, 12); - this.Movie_label_Reverb_Density.TabIndex = 24; - this.Movie_label_Reverb_Density.Text = "$REVERB_DENSITY"; - this.Movie_hSlider_ReverbDamping.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbDamping.Location = new Point(24, 104); - this.Movie_hSlider_ReverbDamping.MoveDelta = 1U; - this.Movie_hSlider_ReverbDamping.Name = "Movie_hSlider_ReverbDamping"; - this.Movie_hSlider_ReverbDamping.Position = 0U; - this.Movie_hSlider_ReverbDamping.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbDamping.Size = new Size(161, 24); - this.Movie_hSlider_ReverbDamping.TabIndex = 23; - this.Movie_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbDamping_PositionChangeNotify); - this.Movie_label_Reverb_Damping.AutoSize = true; - this.Movie_label_Reverb_Damping.Location = new Point(34, 89); - this.Movie_label_Reverb_Damping.Name = "Movie_label_Reverb_Damping"; - this.Movie_label_Reverb_Damping.Size = new Size(95, 12); - this.Movie_label_Reverb_Damping.TabIndex = 22; - this.Movie_label_Reverb_Damping.Text = "$REVERB_DAMPING"; - this.Movie_hSlider_ReverbSize.BackColor = SystemColors.Control; - this.Movie_hSlider_ReverbSize.Location = new Point(24, 64); - this.Movie_hSlider_ReverbSize.MoveDelta = 1U; - this.Movie_hSlider_ReverbSize.Name = "Movie_hSlider_ReverbSize"; - this.Movie_hSlider_ReverbSize.Position = 0U; - this.Movie_hSlider_ReverbSize.PositionFloat = 0.0f; - this.Movie_hSlider_ReverbSize.Size = new Size(161, 24); - this.Movie_hSlider_ReverbSize.TabIndex = 21; - this.Movie_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ReverbSize_PositionChangeNotify); - this.Movie_label_Reverb_Size.AutoSize = true; - this.Movie_label_Reverb_Size.Location = new Point(34, 49); - this.Movie_label_Reverb_Size.Name = "Movie_label_Reverb_Size"; - this.Movie_label_Reverb_Size.Size = new Size(77, 12); - this.Movie_label_Reverb_Size.TabIndex = 20; - this.Movie_label_Reverb_Size.Text = "$REVERB_SIZE"; - this.Movie_onOffSwitch_Reverb.BackColor = Color.Transparent; - this.Movie_onOffSwitch_Reverb.Location = new Point(13, 23); - this.Movie_onOffSwitch_Reverb.Name = "Movie_onOffSwitch_Reverb"; - this.Movie_onOffSwitch_Reverb.Size = new Size(49, 20); - this.Movie_onOffSwitch_Reverb.SwitchedOn = false; - this.Movie_onOffSwitch_Reverb.TabIndex = 7; - this.Movie_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_Reverb_SwitchChangeNotify); - this.Movie_groupBox_Clarity.Controls.Add((Control) this.Movie_hSlider_Clarity); - this.Movie_groupBox_Clarity.Controls.Add((Control) this.Movie_label_Clarity); - this.Movie_groupBox_Clarity.Controls.Add((Control) this.Movie_onOffSwitch_Clarity); - this.Movie_groupBox_Clarity.Location = new Point(216, 213); - this.Movie_groupBox_Clarity.Name = "Movie_groupBox_Clarity"; - this.Movie_groupBox_Clarity.Size = new Size(189, 148); - this.Movie_groupBox_Clarity.TabIndex = 17; - this.Movie_groupBox_Clarity.TabStop = false; - this.Movie_groupBox_Clarity.Text = "$CLARITY"; - this.Movie_hSlider_Clarity.BackColor = SystemColors.Control; - this.Movie_hSlider_Clarity.Location = new Point(13, 93); - this.Movie_hSlider_Clarity.MoveDelta = 1U; - this.Movie_hSlider_Clarity.Name = "Movie_hSlider_Clarity"; - this.Movie_hSlider_Clarity.Position = 0U; - this.Movie_hSlider_Clarity.PositionFloat = 0.0f; - this.Movie_hSlider_Clarity.Size = new Size(161, 24); - this.Movie_hSlider_Clarity.TabIndex = 21; - this.Movie_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_Clarity_PositionChangeNotify); - this.Movie_label_Clarity.AutoSize = true; - this.Movie_label_Clarity.Location = new Point(23, 78); - this.Movie_label_Clarity.Name = "Movie_label_Clarity"; - this.Movie_label_Clarity.Size = new Size(89, 12); - this.Movie_label_Clarity.TabIndex = 20; - this.Movie_label_Clarity.Text = "$CLARITY : 0dB"; - this.Movie_onOffSwitch_Clarity.BackColor = Color.Transparent; - this.Movie_onOffSwitch_Clarity.Location = new Point(13, 23); - this.Movie_onOffSwitch_Clarity.Name = "Movie_onOffSwitch_Clarity"; - this.Movie_onOffSwitch_Clarity.Size = new Size(49, 20); - this.Movie_onOffSwitch_Clarity.SwitchedOn = false; - this.Movie_onOffSwitch_Clarity.TabIndex = 17; - this.Movie_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_Clarity_SwitchChangeNotify); - this.Movie_groupBox_Bass.Controls.Add((Control) this.Movie_hSlider_BassGain); - this.Movie_groupBox_Bass.Controls.Add((Control) this.Movie_label_Bass_Gain); - this.Movie_groupBox_Bass.Controls.Add((Control) this.Movie_hSlider_BassSpkSize); - this.Movie_groupBox_Bass.Controls.Add((Control) this.Movie_label_Bass_SpkSize); - this.Movie_groupBox_Bass.Controls.Add((Control) this.Movie_onOffSwitch_Bass); - this.Movie_groupBox_Bass.Location = new Point(21, 213); - this.Movie_groupBox_Bass.Name = "Movie_groupBox_Bass"; - this.Movie_groupBox_Bass.Size = new Size(189, 148); - this.Movie_groupBox_Bass.TabIndex = 16; - this.Movie_groupBox_Bass.TabStop = false; - this.Movie_groupBox_Bass.Text = "$BASS"; - this.Movie_hSlider_BassGain.BackColor = SystemColors.Control; - this.Movie_hSlider_BassGain.Location = new Point(13, 115); - this.Movie_hSlider_BassGain.MoveDelta = 1U; - this.Movie_hSlider_BassGain.Name = "Movie_hSlider_BassGain"; - this.Movie_hSlider_BassGain.Position = 0U; - this.Movie_hSlider_BassGain.PositionFloat = 0.0f; - this.Movie_hSlider_BassGain.Size = new Size(161, 24); - this.Movie_hSlider_BassGain.TabIndex = 21; - this.Movie_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_BassGain_PositionChangeNotify); - this.Movie_label_Bass_Gain.AutoSize = true; - this.Movie_label_Bass_Gain.Location = new Point(23, 100); - this.Movie_label_Bass_Gain.Name = "Movie_label_Bass_Gain"; - this.Movie_label_Bass_Gain.Size = new Size(101, 12); - this.Movie_label_Bass_Gain.TabIndex = 20; - this.Movie_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; - this.Movie_hSlider_BassSpkSize.BackColor = SystemColors.Control; - this.Movie_hSlider_BassSpkSize.Location = new Point(13, 73); - this.Movie_hSlider_BassSpkSize.MoveDelta = 1U; - this.Movie_hSlider_BassSpkSize.Name = "Movie_hSlider_BassSpkSize"; - this.Movie_hSlider_BassSpkSize.Position = 0U; - this.Movie_hSlider_BassSpkSize.PositionFloat = 0.0f; - this.Movie_hSlider_BassSpkSize.Size = new Size(161, 24); - this.Movie_hSlider_BassSpkSize.TabIndex = 19; - this.Movie_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_BassSpkSize_PositionChangeNotify); - this.Movie_label_Bass_SpkSize.AutoSize = true; - this.Movie_label_Bass_SpkSize.Location = new Point(23, 58); - this.Movie_label_Bass_SpkSize.Name = "Movie_label_Bass_SpkSize"; - this.Movie_label_Bass_SpkSize.Size = new Size(83, 12); - this.Movie_label_Bass_SpkSize.TabIndex = 18; - this.Movie_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; - this.Movie_onOffSwitch_Bass.BackColor = Color.Transparent; - this.Movie_onOffSwitch_Bass.Location = new Point(13, 23); - this.Movie_onOffSwitch_Bass.Name = "Movie_onOffSwitch_Bass"; - this.Movie_onOffSwitch_Bass.Size = new Size(49, 20); - this.Movie_onOffSwitch_Bass.SwitchedOn = false; - this.Movie_onOffSwitch_Bass.TabIndex = 17; - this.Movie_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_Bass_SwitchChangeNotify); - this.Movie_groupBox_Surround.Controls.Add((Control) this.Movie_hSlider_SurroundImage); - this.Movie_groupBox_Surround.Controls.Add((Control) this.Movie_label_Surround_Image); - this.Movie_groupBox_Surround.Controls.Add((Control) this.Movie_hSlider_Surround3D); - this.Movie_groupBox_Surround.Controls.Add((Control) this.Movie_label_Surround_3D); - this.Movie_groupBox_Surround.Controls.Add((Control) this.Movie_onOffSwitch_Surround); - this.Movie_groupBox_Surround.Location = new Point(606, 6); - this.Movie_groupBox_Surround.Name = "Movie_groupBox_Surround"; - this.Movie_groupBox_Surround.Size = new Size(208, 138); - this.Movie_groupBox_Surround.TabIndex = 13; - this.Movie_groupBox_Surround.TabStop = false; - this.Movie_groupBox_Surround.Text = "$SURROUND"; - this.Movie_hSlider_SurroundImage.BackColor = SystemColors.Control; - this.Movie_hSlider_SurroundImage.Location = new Point(24, 109); - this.Movie_hSlider_SurroundImage.MoveDelta = 1U; - this.Movie_hSlider_SurroundImage.Name = "Movie_hSlider_SurroundImage"; - this.Movie_hSlider_SurroundImage.Position = 0U; - this.Movie_hSlider_SurroundImage.PositionFloat = 0.0f; - this.Movie_hSlider_SurroundImage.Size = new Size(161, 24); - this.Movie_hSlider_SurroundImage.TabIndex = 25; - this.Movie_hSlider_SurroundImage.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_SurroundImage_PositionChangeNotify); - this.Movie_label_Surround_Image.AutoSize = true; - this.Movie_label_Surround_Image.Location = new Point(34, 94); - this.Movie_label_Surround_Image.Name = "Movie_label_Surround_Image"; - this.Movie_label_Surround_Image.Size = new Size(95, 12); - this.Movie_label_Surround_Image.TabIndex = 24; - this.Movie_label_Surround_Image.Text = "$SURROUND_IMAGE"; - this.Movie_hSlider_Surround3D.BackColor = SystemColors.Control; - this.Movie_hSlider_Surround3D.Location = new Point(24, 67); - this.Movie_hSlider_Surround3D.MoveDelta = 1U; - this.Movie_hSlider_Surround3D.Name = "Movie_hSlider_Surround3D"; - this.Movie_hSlider_Surround3D.Position = 0U; - this.Movie_hSlider_Surround3D.PositionFloat = 0.0f; - this.Movie_hSlider_Surround3D.Size = new Size(161, 24); - this.Movie_hSlider_Surround3D.TabIndex = 23; - this.Movie_hSlider_Surround3D.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_Surround3D_PositionChangeNotify); - this.Movie_label_Surround_3D.AutoSize = true; - this.Movie_label_Surround_3D.Location = new Point(34, 52); - this.Movie_label_Surround_3D.Name = "Movie_label_Surround_3D"; - this.Movie_label_Surround_3D.Size = new Size(77, 12); - this.Movie_label_Surround_3D.TabIndex = 22; - this.Movie_label_Surround_3D.Text = "$SURROUND_3D"; - this.Movie_onOffSwitch_Surround.BackColor = Color.Transparent; - this.Movie_onOffSwitch_Surround.Location = new Point(13, 23); - this.Movie_onOffSwitch_Surround.Name = "Movie_onOffSwitch_Surround"; - this.Movie_onOffSwitch_Surround.Size = new Size(49, 20); - this.Movie_onOffSwitch_Surround.SwitchedOn = false; - this.Movie_onOffSwitch_Surround.TabIndex = 6; - this.Movie_onOffSwitch_Surround.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_Surround_SwitchChangeNotify); - this.Movie_groupBox_Convolver.Controls.Add((Control) this.Movie_irShape_ConvIR); - this.Movie_groupBox_Convolver.Controls.Add((Control) this.Movie_onOffSwitch_Convolver); - this.Movie_groupBox_Convolver.Controls.Add((Control) this.Movie_hSlider_ConvIRGain); - this.Movie_groupBox_Convolver.Controls.Add((Control) this.Movie_openFileBox_ConvIRS); - this.Movie_groupBox_Convolver.Controls.Add((Control) this.Movie_label_ConvolverIRGain); - this.Movie_groupBox_Convolver.Location = new Point(312, 6); - this.Movie_groupBox_Convolver.Name = "Movie_groupBox_Convolver"; - this.Movie_groupBox_Convolver.Size = new Size(288, 179); - this.Movie_groupBox_Convolver.TabIndex = 12; - this.Movie_groupBox_Convolver.TabStop = false; - this.Movie_groupBox_Convolver.Text = "$CONVOLVER"; - this.Movie_irShape_ConvIR.Location = new Point(13, 61); - this.Movie_irShape_ConvIR.Name = "Movie_irShape_ConvIR"; - this.Movie_irShape_ConvIR.ShapeBackColor = Color.White; - this.Movie_irShape_ConvIR.ShapeForeColor = Color.Black; - this.Movie_irShape_ConvIR.Size = new Size(260, 63); - this.Movie_irShape_ConvIR.TabIndex = 8; - this.Movie_onOffSwitch_Convolver.BackColor = Color.Transparent; - this.Movie_onOffSwitch_Convolver.Location = new Point(13, 23); - this.Movie_onOffSwitch_Convolver.Name = "Movie_onOffSwitch_Convolver"; - this.Movie_onOffSwitch_Convolver.Size = new Size(49, 20); - this.Movie_onOffSwitch_Convolver.SwitchedOn = false; - this.Movie_onOffSwitch_Convolver.TabIndex = 5; - this.Movie_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Movie_onOffSwitch_Convolver_SwitchChangeNotify); - this.Movie_hSlider_ConvIRGain.BackColor = SystemColors.Control; - this.Movie_hSlider_ConvIRGain.Location = new Point(85, 31); - this.Movie_hSlider_ConvIRGain.MoveDelta = 1U; - this.Movie_hSlider_ConvIRGain.Name = "Movie_hSlider_ConvIRGain"; - this.Movie_hSlider_ConvIRGain.Position = 0U; - this.Movie_hSlider_ConvIRGain.PositionFloat = 0.0f; - this.Movie_hSlider_ConvIRGain.Size = new Size(188, 24); - this.Movie_hSlider_ConvIRGain.TabIndex = 7; - this.Movie_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_ConvIRGain_PositionChangeNotify); - this.Movie_openFileBox_ConvIRS.BackColor = SystemColors.Control; - this.Movie_openFileBox_ConvIRS.FilePathName = ""; - this.Movie_openFileBox_ConvIRS.Location = new Point(13, 136); - this.Movie_openFileBox_ConvIRS.Name = "Movie_openFileBox_ConvIRS"; - this.Movie_openFileBox_ConvIRS.Size = new Size(260, 29); - this.Movie_openFileBox_ConvIRS.TabIndex = 9; - this.Movie_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(this.Movie_openFileBox_ConvIRS_FileChangeNotify); - this.Movie_label_ConvolverIRGain.AutoSize = true; - this.Movie_label_ConvolverIRGain.Location = new Point(95, 16); - this.Movie_label_ConvolverIRGain.Name = "Movie_label_ConvolverIRGain"; - this.Movie_label_ConvolverIRGain.Size = new Size(119, 12); - this.Movie_label_ConvolverIRGain.TabIndex = 6; - this.Movie_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; - this.Movie_hSlider_PostVolume.BackColor = SystemColors.Control; - this.Movie_hSlider_PostVolume.Location = new Point(21, 118); - this.Movie_hSlider_PostVolume.MoveDelta = 1U; - this.Movie_hSlider_PostVolume.Name = "Movie_hSlider_PostVolume"; - this.Movie_hSlider_PostVolume.Position = 0U; - this.Movie_hSlider_PostVolume.PositionFloat = 0.0f; - this.Movie_hSlider_PostVolume.Size = new Size(285, 39); - this.Movie_hSlider_PostVolume.TabIndex = 3; - this.Movie_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_PostVolume_PositionChangeNotify); - this.Movie_label_PostVolume.AutoSize = true; - this.Movie_label_PostVolume.Location = new Point(40, 100); - this.Movie_label_PostVolume.Name = "Movie_label_PostVolume"; - this.Movie_label_PostVolume.Size = new Size(113, 12); - this.Movie_label_PostVolume.TabIndex = 2; - this.Movie_label_PostVolume.Text = "$POST_VOLUME : 0dB"; - this.Movie_hSlider_PreVolume.BackColor = SystemColors.Control; - this.Movie_hSlider_PreVolume.Location = new Point(21, 39); - this.Movie_hSlider_PreVolume.MoveDelta = 1U; - this.Movie_hSlider_PreVolume.Name = "Movie_hSlider_PreVolume"; - this.Movie_hSlider_PreVolume.Position = 0U; - this.Movie_hSlider_PreVolume.PositionFloat = 0.0f; - this.Movie_hSlider_PreVolume.Size = new Size(285, 39); - this.Movie_hSlider_PreVolume.TabIndex = 1; - this.Movie_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Movie_hSlider_PreVolume_PositionChangeNotify); - this.Movie_label_PreVolume.AutoSize = true; - this.Movie_label_PreVolume.Location = new Point(40, 21); - this.Movie_label_PreVolume.Name = "Movie_label_PreVolume"; - this.Movie_label_PreVolume.Size = new Size(107, 12); - this.Movie_label_PreVolume.TabIndex = 0; - this.Movie_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; - this.Music_singleButton_Compressor.BackColor = SystemColors.Control; - this.Music_singleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; - this.Music_singleButton_Compressor.Location = new Point(216, 460); - this.Music_singleButton_Compressor.Name = "Music_singleButton_Compressor"; - this.Music_singleButton_Compressor.Size = new Size(174, 39); - this.Music_singleButton_Compressor.TabIndex = 21; - this.Music_singleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Music_singleButton_Compressor_ButtonClickNotify); - this.Music_singleButton_Equalizer.BackColor = SystemColors.Control; - this.Music_singleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; - this.Music_singleButton_Equalizer.Location = new Point(216, 404); - this.Music_singleButton_Equalizer.Name = "Music_singleButton_Equalizer"; - this.Music_singleButton_Equalizer.Size = new Size(174, 39); - this.Music_singleButton_Equalizer.TabIndex = 20; - this.Music_singleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Music_singleButton_Equalizer_ButtonClickNotify); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_singleButton_ReverbPreset); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbMix); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_Mix); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbEarlyMix); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_EarlyMix); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbPreDelay); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_PreDelay); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbDecay); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_Decay); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbBandWidth); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_BandWidth); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbDensity); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_Density); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbDamping); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_Damping); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_hSlider_ReverbSize); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_label_Reverb_Size); - this.Music_groupBox_Reverb.Controls.Add((Control) this.Music_onOffSwitch_Reverb); - this.Music_groupBox_Reverb.Location = new Point(606, 150); - this.Music_groupBox_Reverb.Name = "Music_groupBox_Reverb"; - this.Music_groupBox_Reverb.Size = new Size(208, 389); - this.Music_groupBox_Reverb.TabIndex = 19; - this.Music_groupBox_Reverb.TabStop = false; - this.Music_groupBox_Reverb.Text = "$REVERB"; - this.Music_singleButton_ReverbPreset.BackColor = SystemColors.Control; - this.Music_singleButton_ReverbPreset.ButtonText = "$PRESET"; - this.Music_singleButton_ReverbPreset.Location = new Point(121, 14); - this.Music_singleButton_ReverbPreset.Name = "Music_singleButton_ReverbPreset"; - this.Music_singleButton_ReverbPreset.Size = new Size(81, 29); - this.Music_singleButton_ReverbPreset.TabIndex = 36; - this.Music_singleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.Music_singleButton_ReverbPreset_ButtonClickNotify); - this.Music_hSlider_ReverbMix.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbMix.Location = new Point(24, 356); - this.Music_hSlider_ReverbMix.MoveDelta = 1U; - this.Music_hSlider_ReverbMix.Name = "Music_hSlider_ReverbMix"; - this.Music_hSlider_ReverbMix.Position = 0U; - this.Music_hSlider_ReverbMix.PositionFloat = 0.0f; - this.Music_hSlider_ReverbMix.Size = new Size(161, 24); - this.Music_hSlider_ReverbMix.TabIndex = 35; - this.Music_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbMix_PositionChangeNotify); - this.Music_label_Reverb_Mix.AutoSize = true; - this.Music_label_Reverb_Mix.Location = new Point(34, 341); - this.Music_label_Reverb_Mix.Name = "Music_label_Reverb_Mix"; - this.Music_label_Reverb_Mix.Size = new Size(71, 12); - this.Music_label_Reverb_Mix.TabIndex = 34; - this.Music_label_Reverb_Mix.Text = "$REVERB_MIX"; - this.Music_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbEarlyMix.Location = new Point(24, 314); - this.Music_hSlider_ReverbEarlyMix.MoveDelta = 1U; - this.Music_hSlider_ReverbEarlyMix.Name = "Music_hSlider_ReverbEarlyMix"; - this.Music_hSlider_ReverbEarlyMix.Position = 0U; - this.Music_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; - this.Music_hSlider_ReverbEarlyMix.Size = new Size(161, 24); - this.Music_hSlider_ReverbEarlyMix.TabIndex = 33; - this.Music_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbEarlyMix_PositionChangeNotify); - this.Music_label_Reverb_EarlyMix.AutoSize = true; - this.Music_label_Reverb_EarlyMix.Location = new Point(34, 299); - this.Music_label_Reverb_EarlyMix.Name = "Music_label_Reverb_EarlyMix"; - this.Music_label_Reverb_EarlyMix.Size = new Size(101, 12); - this.Music_label_Reverb_EarlyMix.TabIndex = 32; - this.Music_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; - this.Music_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbPreDelay.Location = new Point(24, 272); - this.Music_hSlider_ReverbPreDelay.MoveDelta = 1U; - this.Music_hSlider_ReverbPreDelay.Name = "Music_hSlider_ReverbPreDelay"; - this.Music_hSlider_ReverbPreDelay.Position = 0U; - this.Music_hSlider_ReverbPreDelay.PositionFloat = 0.0f; - this.Music_hSlider_ReverbPreDelay.Size = new Size(161, 24); - this.Music_hSlider_ReverbPreDelay.TabIndex = 31; - this.Music_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbPreDelay_PositionChangeNotify); - this.Music_label_Reverb_PreDelay.AutoSize = true; - this.Music_label_Reverb_PreDelay.Location = new Point(34, 257); - this.Music_label_Reverb_PreDelay.Name = "Music_label_Reverb_PreDelay"; - this.Music_label_Reverb_PreDelay.Size = new Size(101, 12); - this.Music_label_Reverb_PreDelay.TabIndex = 30; - this.Music_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; - this.Music_hSlider_ReverbDecay.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbDecay.Location = new Point(24, 230); - this.Music_hSlider_ReverbDecay.MoveDelta = 1U; - this.Music_hSlider_ReverbDecay.Name = "Music_hSlider_ReverbDecay"; - this.Music_hSlider_ReverbDecay.Position = 0U; - this.Music_hSlider_ReverbDecay.PositionFloat = 0.0f; - this.Music_hSlider_ReverbDecay.Size = new Size(161, 24); - this.Music_hSlider_ReverbDecay.TabIndex = 29; - this.Music_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbDecay_PositionChangeNotify); - this.Music_label_Reverb_Decay.AutoSize = true; - this.Music_label_Reverb_Decay.Location = new Point(34, 215); - this.Music_label_Reverb_Decay.Name = "Music_label_Reverb_Decay"; - this.Music_label_Reverb_Decay.Size = new Size(83, 12); - this.Music_label_Reverb_Decay.TabIndex = 28; - this.Music_label_Reverb_Decay.Text = "$REVERB_DECAY"; - this.Music_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbBandWidth.Location = new Point(24, 188); - this.Music_hSlider_ReverbBandWidth.MoveDelta = 1U; - this.Music_hSlider_ReverbBandWidth.Name = "Music_hSlider_ReverbBandWidth"; - this.Music_hSlider_ReverbBandWidth.Position = 0U; - this.Music_hSlider_ReverbBandWidth.PositionFloat = 0.0f; - this.Music_hSlider_ReverbBandWidth.Size = new Size(161, 24); - this.Music_hSlider_ReverbBandWidth.TabIndex = 27; - this.Music_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbBandWidth_PositionChangeNotify); - this.Music_label_Reverb_BandWidth.AutoSize = true; - this.Music_label_Reverb_BandWidth.Location = new Point(34, 173); - this.Music_label_Reverb_BandWidth.Name = "Music_label_Reverb_BandWidth"; - this.Music_label_Reverb_BandWidth.Size = new Size(107, 12); - this.Music_label_Reverb_BandWidth.TabIndex = 26; - this.Music_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; - this.Music_hSlider_ReverbDensity.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbDensity.Location = new Point(24, 146); - this.Music_hSlider_ReverbDensity.MoveDelta = 1U; - this.Music_hSlider_ReverbDensity.Name = "Music_hSlider_ReverbDensity"; - this.Music_hSlider_ReverbDensity.Position = 0U; - this.Music_hSlider_ReverbDensity.PositionFloat = 0.0f; - this.Music_hSlider_ReverbDensity.Size = new Size(161, 24); - this.Music_hSlider_ReverbDensity.TabIndex = 25; - this.Music_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbDensity_PositionChangeNotify); - this.Music_label_Reverb_Density.AutoSize = true; - this.Music_label_Reverb_Density.Location = new Point(34, 131); - this.Music_label_Reverb_Density.Name = "Music_label_Reverb_Density"; - this.Music_label_Reverb_Density.Size = new Size(95, 12); - this.Music_label_Reverb_Density.TabIndex = 24; - this.Music_label_Reverb_Density.Text = "$REVERB_DENSITY"; - this.Music_hSlider_ReverbDamping.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbDamping.Location = new Point(24, 104); - this.Music_hSlider_ReverbDamping.MoveDelta = 1U; - this.Music_hSlider_ReverbDamping.Name = "Music_hSlider_ReverbDamping"; - this.Music_hSlider_ReverbDamping.Position = 0U; - this.Music_hSlider_ReverbDamping.PositionFloat = 0.0f; - this.Music_hSlider_ReverbDamping.Size = new Size(161, 24); - this.Music_hSlider_ReverbDamping.TabIndex = 23; - this.Music_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbDamping_PositionChangeNotify); - this.Music_label_Reverb_Damping.AutoSize = true; - this.Music_label_Reverb_Damping.Location = new Point(34, 89); - this.Music_label_Reverb_Damping.Name = "Music_label_Reverb_Damping"; - this.Music_label_Reverb_Damping.Size = new Size(95, 12); - this.Music_label_Reverb_Damping.TabIndex = 22; - this.Music_label_Reverb_Damping.Text = "$REVERB_DAMPING"; - this.Music_hSlider_ReverbSize.BackColor = SystemColors.Control; - this.Music_hSlider_ReverbSize.Location = new Point(24, 64); - this.Music_hSlider_ReverbSize.MoveDelta = 1U; - this.Music_hSlider_ReverbSize.Name = "Music_hSlider_ReverbSize"; - this.Music_hSlider_ReverbSize.Position = 0U; - this.Music_hSlider_ReverbSize.PositionFloat = 0.0f; - this.Music_hSlider_ReverbSize.Size = new Size(161, 24); - this.Music_hSlider_ReverbSize.TabIndex = 21; - this.Music_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ReverbSize_PositionChangeNotify); - this.Music_label_Reverb_Size.AutoSize = true; - this.Music_label_Reverb_Size.Location = new Point(34, 49); - this.Music_label_Reverb_Size.Name = "Music_label_Reverb_Size"; - this.Music_label_Reverb_Size.Size = new Size(77, 12); - this.Music_label_Reverb_Size.TabIndex = 20; - this.Music_label_Reverb_Size.Text = "$REVERB_SIZE"; - this.Music_onOffSwitch_Reverb.BackColor = Color.Transparent; - this.Music_onOffSwitch_Reverb.Location = new Point(13, 23); - this.Music_onOffSwitch_Reverb.Name = "Music_onOffSwitch_Reverb"; - this.Music_onOffSwitch_Reverb.Size = new Size(49, 20); - this.Music_onOffSwitch_Reverb.SwitchedOn = false; - this.Music_onOffSwitch_Reverb.TabIndex = 7; - this.Music_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Reverb_SwitchChangeNotify); - this.Music_groupBox_Cure.Controls.Add((Control) this.Music_buttonBox_CureLevel); - this.Music_groupBox_Cure.Controls.Add((Control) this.Music_onOffSwitch_Cure); - this.Music_groupBox_Cure.Controls.Add((Control) this.Music_label_Tube); - this.Music_groupBox_Cure.Controls.Add((Control) this.Music_onOffSwitch_Tube); - this.Music_groupBox_Cure.Location = new Point(411, 206); - this.Music_groupBox_Cure.Name = "Music_groupBox_Cure"; - this.Music_groupBox_Cure.Size = new Size(189, 148); - this.Music_groupBox_Cure.TabIndex = 18; - this.Music_groupBox_Cure.TabStop = false; - this.Music_groupBox_Cure.Text = "$CURE"; - this.Music_buttonBox_CureLevel.BackColor = SystemColors.Control; - this.Music_buttonBox_CureLevel.Location = new Point(68, 17); - this.Music_buttonBox_CureLevel.Name = "Music_buttonBox_CureLevel"; - this.Music_buttonBox_CureLevel.Size = new Size(106, 70); - this.Music_buttonBox_CureLevel.TabIndex = 18; - this.Music_buttonBox_CureLevel.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Music_buttonBox_CureLevel_ItemSelectedNotify); - this.Music_onOffSwitch_Cure.BackColor = Color.Transparent; - this.Music_onOffSwitch_Cure.Location = new Point(13, 23); - this.Music_onOffSwitch_Cure.Name = "Music_onOffSwitch_Cure"; - this.Music_onOffSwitch_Cure.Size = new Size(49, 20); - this.Music_onOffSwitch_Cure.SwitchedOn = false; - this.Music_onOffSwitch_Cure.TabIndex = 17; - this.Music_onOffSwitch_Cure.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Cure_SwitchChangeNotify); - this.Music_label_Tube.AutoSize = true; - this.Music_label_Tube.Location = new Point(11, 112); - this.Music_label_Tube.Name = "Music_label_Tube"; - this.Music_label_Tube.Size = new Size(35, 12); - this.Music_label_Tube.TabIndex = 14; - this.Music_label_Tube.Text = "$TUBE"; - this.Music_onOffSwitch_Tube.BackColor = Color.Transparent; - this.Music_onOffSwitch_Tube.Location = new Point(121, 105); - this.Music_onOffSwitch_Tube.Name = "Music_onOffSwitch_Tube"; - this.Music_onOffSwitch_Tube.Size = new Size(53, 26); - this.Music_onOffSwitch_Tube.SwitchedOn = false; - this.Music_onOffSwitch_Tube.TabIndex = 15; - this.Music_onOffSwitch_Tube.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Tube_SwitchChangeNotify); - this.Music_groupBox_Clarity.Controls.Add((Control) this.Music_buttonBox_ClarityMode); - this.Music_groupBox_Clarity.Controls.Add((Control) this.Music_hSlider_Clarity); - this.Music_groupBox_Clarity.Controls.Add((Control) this.Music_label_Clarity); - this.Music_groupBox_Clarity.Controls.Add((Control) this.Music_onOffSwitch_Clarity); - this.Music_groupBox_Clarity.Location = new Point(216, 206); - this.Music_groupBox_Clarity.Name = "Music_groupBox_Clarity"; - this.Music_groupBox_Clarity.Size = new Size(189, 148); - this.Music_groupBox_Clarity.TabIndex = 17; - this.Music_groupBox_Clarity.TabStop = false; - this.Music_groupBox_Clarity.Text = "$CLARITY"; - this.Music_buttonBox_ClarityMode.BackColor = SystemColors.Control; - this.Music_buttonBox_ClarityMode.Location = new Point(68, 17); - this.Music_buttonBox_ClarityMode.Name = "Music_buttonBox_ClarityMode"; - this.Music_buttonBox_ClarityMode.Size = new Size(106, 70); - this.Music_buttonBox_ClarityMode.TabIndex = 18; - this.Music_buttonBox_ClarityMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Music_buttonBox_ClarityMode_ItemSelectedNotify); - this.Music_hSlider_Clarity.BackColor = SystemColors.Control; - this.Music_hSlider_Clarity.Location = new Point(13, 115); - this.Music_hSlider_Clarity.MoveDelta = 1U; - this.Music_hSlider_Clarity.Name = "Music_hSlider_Clarity"; - this.Music_hSlider_Clarity.Position = 0U; - this.Music_hSlider_Clarity.PositionFloat = 0.0f; - this.Music_hSlider_Clarity.Size = new Size(161, 24); - this.Music_hSlider_Clarity.TabIndex = 21; - this.Music_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_Clarity_PositionChangeNotify); - this.Music_label_Clarity.AutoSize = true; - this.Music_label_Clarity.Location = new Point(23, 100); - this.Music_label_Clarity.Name = "Music_label_Clarity"; - this.Music_label_Clarity.Size = new Size(89, 12); - this.Music_label_Clarity.TabIndex = 20; - this.Music_label_Clarity.Text = "$CLARITY : 0dB"; - this.Music_onOffSwitch_Clarity.BackColor = Color.Transparent; - this.Music_onOffSwitch_Clarity.Location = new Point(13, 23); - this.Music_onOffSwitch_Clarity.Name = "Music_onOffSwitch_Clarity"; - this.Music_onOffSwitch_Clarity.Size = new Size(49, 20); - this.Music_onOffSwitch_Clarity.SwitchedOn = false; - this.Music_onOffSwitch_Clarity.TabIndex = 17; - this.Music_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Clarity_SwitchChangeNotify); - this.Music_groupBox_Bass.Controls.Add((Control) this.Music_hSlider_BassGain); - this.Music_groupBox_Bass.Controls.Add((Control) this.Music_label_Bass_Gain); - this.Music_groupBox_Bass.Controls.Add((Control) this.Music_hSlider_BassSpkSize); - this.Music_groupBox_Bass.Controls.Add((Control) this.Music_label_Bass_SpkSize); - this.Music_groupBox_Bass.Controls.Add((Control) this.Music_onOffSwitch_Bass); - this.Music_groupBox_Bass.Location = new Point(21, 206); - this.Music_groupBox_Bass.Name = "Music_groupBox_Bass"; - this.Music_groupBox_Bass.Size = new Size(189, 148); - this.Music_groupBox_Bass.TabIndex = 16; - this.Music_groupBox_Bass.TabStop = false; - this.Music_groupBox_Bass.Text = "$BASS"; - this.Music_hSlider_BassGain.BackColor = SystemColors.Control; - this.Music_hSlider_BassGain.Location = new Point(13, 115); - this.Music_hSlider_BassGain.MoveDelta = 1U; - this.Music_hSlider_BassGain.Name = "Music_hSlider_BassGain"; - this.Music_hSlider_BassGain.Position = 0U; - this.Music_hSlider_BassGain.PositionFloat = 0.0f; - this.Music_hSlider_BassGain.Size = new Size(161, 24); - this.Music_hSlider_BassGain.TabIndex = 21; - this.Music_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_BassGain_PositionChangeNotify); - this.Music_label_Bass_Gain.AutoSize = true; - this.Music_label_Bass_Gain.Location = new Point(23, 100); - this.Music_label_Bass_Gain.Name = "Music_label_Bass_Gain"; - this.Music_label_Bass_Gain.Size = new Size(101, 12); - this.Music_label_Bass_Gain.TabIndex = 20; - this.Music_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; - this.Music_hSlider_BassSpkSize.BackColor = SystemColors.Control; - this.Music_hSlider_BassSpkSize.Location = new Point(13, 73); - this.Music_hSlider_BassSpkSize.MoveDelta = 1U; - this.Music_hSlider_BassSpkSize.Name = "Music_hSlider_BassSpkSize"; - this.Music_hSlider_BassSpkSize.Position = 0U; - this.Music_hSlider_BassSpkSize.PositionFloat = 0.0f; - this.Music_hSlider_BassSpkSize.Size = new Size(161, 24); - this.Music_hSlider_BassSpkSize.TabIndex = 19; - this.Music_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_BassSpkSize_PositionChangeNotify); - this.Music_label_Bass_SpkSize.AutoSize = true; - this.Music_label_Bass_SpkSize.Location = new Point(23, 58); - this.Music_label_Bass_SpkSize.Name = "Music_label_Bass_SpkSize"; - this.Music_label_Bass_SpkSize.Size = new Size(83, 12); - this.Music_label_Bass_SpkSize.TabIndex = 18; - this.Music_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; - this.Music_onOffSwitch_Bass.BackColor = Color.Transparent; - this.Music_onOffSwitch_Bass.Location = new Point(13, 23); - this.Music_onOffSwitch_Bass.Name = "Music_onOffSwitch_Bass"; - this.Music_onOffSwitch_Bass.Size = new Size(49, 20); - this.Music_onOffSwitch_Bass.SwitchedOn = false; - this.Music_onOffSwitch_Bass.TabIndex = 17; - this.Music_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Bass_SwitchChangeNotify); - this.Music_groupBox_Surround.Controls.Add((Control) this.Music_buttonBox_SurroundRoomSize); - this.Music_groupBox_Surround.Controls.Add((Control) this.Music_onOffSwitch_Surround); - this.Music_groupBox_Surround.Location = new Point(606, 6); - this.Music_groupBox_Surround.Name = "Music_groupBox_Surround"; - this.Music_groupBox_Surround.Size = new Size(208, 138); - this.Music_groupBox_Surround.TabIndex = 13; - this.Music_groupBox_Surround.TabStop = false; - this.Music_groupBox_Surround.Text = "$SURROUND"; - this.Music_buttonBox_SurroundRoomSize.BackColor = SystemColors.Control; - this.Music_buttonBox_SurroundRoomSize.Location = new Point(68, 23); - this.Music_buttonBox_SurroundRoomSize.Name = "Music_buttonBox_SurroundRoomSize"; - this.Music_buttonBox_SurroundRoomSize.Size = new Size((int) sbyte.MaxValue, 101); - this.Music_buttonBox_SurroundRoomSize.TabIndex = 7; - this.Music_buttonBox_SurroundRoomSize.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.Music_buttonBox_SurroundRoomSize_ItemSelectedNotify); - this.Music_onOffSwitch_Surround.BackColor = Color.Transparent; - this.Music_onOffSwitch_Surround.Location = new Point(13, 23); - this.Music_onOffSwitch_Surround.Name = "Music_onOffSwitch_Surround"; - this.Music_onOffSwitch_Surround.Size = new Size(49, 20); - this.Music_onOffSwitch_Surround.SwitchedOn = false; - this.Music_onOffSwitch_Surround.TabIndex = 6; - this.Music_onOffSwitch_Surround.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Surround_SwitchChangeNotify); - this.Music_groupBox_Convolver.Controls.Add((Control) this.Music_irShape_ConvIR); - this.Music_groupBox_Convolver.Controls.Add((Control) this.Music_onOffSwitch_Convolver); - this.Music_groupBox_Convolver.Controls.Add((Control) this.Music_hSlider_ConvIRGain); - this.Music_groupBox_Convolver.Controls.Add((Control) this.Music_openFileBox_ConvIRS); - this.Music_groupBox_Convolver.Controls.Add((Control) this.Music_label_ConvolverIRGain); - this.Music_groupBox_Convolver.Location = new Point(312, 6); - this.Music_groupBox_Convolver.Name = "Music_groupBox_Convolver"; - this.Music_groupBox_Convolver.Size = new Size(288, 179); - this.Music_groupBox_Convolver.TabIndex = 12; - this.Music_groupBox_Convolver.TabStop = false; - this.Music_groupBox_Convolver.Text = "$CONVOLVER"; - this.Music_irShape_ConvIR.Location = new Point(13, 61); - this.Music_irShape_ConvIR.Name = "Music_irShape_ConvIR"; - this.Music_irShape_ConvIR.ShapeBackColor = Color.White; - this.Music_irShape_ConvIR.ShapeForeColor = Color.Black; - this.Music_irShape_ConvIR.Size = new Size(260, 63); - this.Music_irShape_ConvIR.TabIndex = 8; - this.Music_onOffSwitch_Convolver.BackColor = Color.Transparent; - this.Music_onOffSwitch_Convolver.Location = new Point(13, 23); - this.Music_onOffSwitch_Convolver.Name = "Music_onOffSwitch_Convolver"; - this.Music_onOffSwitch_Convolver.Size = new Size(49, 20); - this.Music_onOffSwitch_Convolver.SwitchedOn = false; - this.Music_onOffSwitch_Convolver.TabIndex = 5; - this.Music_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.Music_onOffSwitch_Convolver_SwitchChangeNotify); - this.Music_hSlider_ConvIRGain.BackColor = SystemColors.Control; - this.Music_hSlider_ConvIRGain.Location = new Point(85, 31); - this.Music_hSlider_ConvIRGain.MoveDelta = 1U; - this.Music_hSlider_ConvIRGain.Name = "Music_hSlider_ConvIRGain"; - this.Music_hSlider_ConvIRGain.Position = 0U; - this.Music_hSlider_ConvIRGain.PositionFloat = 0.0f; - this.Music_hSlider_ConvIRGain.Size = new Size(188, 24); - this.Music_hSlider_ConvIRGain.TabIndex = 7; - this.Music_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_ConvIRGain_PositionChangeNotify); - this.Music_openFileBox_ConvIRS.BackColor = SystemColors.Control; - this.Music_openFileBox_ConvIRS.FilePathName = ""; - this.Music_openFileBox_ConvIRS.Location = new Point(13, 136); - this.Music_openFileBox_ConvIRS.Name = "Music_openFileBox_ConvIRS"; - this.Music_openFileBox_ConvIRS.Size = new Size(260, 29); - this.Music_openFileBox_ConvIRS.TabIndex = 9; - this.Music_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(this.Music_openFileBox_ConvIRS_FileChangeNotify); - this.Music_label_ConvolverIRGain.AutoSize = true; - this.Music_label_ConvolverIRGain.Location = new Point(95, 16); - this.Music_label_ConvolverIRGain.Name = "Music_label_ConvolverIRGain"; - this.Music_label_ConvolverIRGain.Size = new Size(119, 12); - this.Music_label_ConvolverIRGain.TabIndex = 6; - this.Music_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; - this.Music_hSlider_PostVolume.BackColor = SystemColors.Control; - this.Music_hSlider_PostVolume.Location = new Point(21, 118); - this.Music_hSlider_PostVolume.MoveDelta = 1U; - this.Music_hSlider_PostVolume.Name = "Music_hSlider_PostVolume"; - this.Music_hSlider_PostVolume.Position = 0U; - this.Music_hSlider_PostVolume.PositionFloat = 0.0f; - this.Music_hSlider_PostVolume.Size = new Size(285, 39); - this.Music_hSlider_PostVolume.TabIndex = 3; - this.Music_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_PostVolume_PositionChangeNotify); - this.Music_label_PostVolume.AutoSize = true; - this.Music_label_PostVolume.Location = new Point(40, 100); - this.Music_label_PostVolume.Name = "Music_label_PostVolume"; - this.Music_label_PostVolume.Size = new Size(113, 12); - this.Music_label_PostVolume.TabIndex = 2; - this.Music_label_PostVolume.Text = "$POST_VOLUME : 0dB"; - this.Music_hSlider_PreVolume.BackColor = SystemColors.Control; - this.Music_hSlider_PreVolume.Location = new Point(21, 39); - this.Music_hSlider_PreVolume.MoveDelta = 1U; - this.Music_hSlider_PreVolume.Name = "Music_hSlider_PreVolume"; - this.Music_hSlider_PreVolume.Position = 0U; - this.Music_hSlider_PreVolume.PositionFloat = 0.0f; - this.Music_hSlider_PreVolume.Size = new Size(285, 39); - this.Music_hSlider_PreVolume.TabIndex = 1; - this.Music_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(this.Music_hSlider_PreVolume_PositionChangeNotify); - this.Music_label_PreVolume.AutoSize = true; - this.Music_label_PreVolume.Location = new Point(40, 21); - this.Music_label_PreVolume.Name = "Music_label_PreVolume"; - this.Music_label_PreVolume.Size = new Size(107, 12); - this.Music_label_PreVolume.TabIndex = 0; - this.Music_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; - this.label_Copyright.Location = new Point(472, 604); - this.label_Copyright.Name = "label_Copyright"; - this.label_Copyright.Size = new Size(555, 23); - this.label_Copyright.TabIndex = 6; - this.label_Copyright.Text = "$COPYRIGHT"; - this.label_Copyright.TextAlign = ContentAlignment.MiddleRight; - this.notifyIcon_Main.ContextMenuStrip = this.contextMenuStrip_TrayMenu; - this.notifyIcon_Main.Icon = (Icon) componentResourceManager.GetObject("notifyIcon_Main.Icon"); - this.notifyIcon_Main.Text = "ViPER4Windows"; - this.notifyIcon_Main.MouseUp += new MouseEventHandler(this.notifyIcon_Main_MouseUp); - this.contextMenuStrip_TrayMenu.Name = "contextMenuStrip_TrayMenu"; - this.contextMenuStrip_TrayMenu.Size = new Size(61, 4); - this.singleButton_SavePreset.BackColor = SystemColors.Control; - this.singleButton_SavePreset.ButtonText = "$SAVE_PRESET"; - this.singleButton_SavePreset.Location = new Point(37, 560); - this.singleButton_SavePreset.Name = "singleButton_SavePreset"; - this.singleButton_SavePreset.Size = new Size(112, 40); - this.singleButton_SavePreset.TabIndex = 8; - this.singleButton_SavePreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_SavePreset_ButtonClickNotify); - this.singleButton_LoadPreset.BackColor = SystemColors.Control; - this.singleButton_LoadPreset.ButtonText = "$LOAD_PRESET"; - this.singleButton_LoadPreset.Location = new Point(37, 514); - this.singleButton_LoadPreset.Name = "singleButton_LoadPreset"; - this.singleButton_LoadPreset.Size = new Size(112, 40); - this.singleButton_LoadPreset.TabIndex = 7; - this.singleButton_LoadPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_LoadPreset_ButtonClickNotify); - this.buttonBox_Mode.BackColor = SystemColors.Control; - this.buttonBox_Mode.Location = new Point(16, 312); - this.buttonBox_Mode.Name = "buttonBox_Mode"; - this.buttonBox_Mode.Size = new Size(152, 170); - this.buttonBox_Mode.TabIndex = 3; - this.buttonBox_Mode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.buttonBox_Mode_ItemSelectedNotify); - this.onOffSwitch_Master.BackColor = Color.Transparent; - this.onOffSwitch_Master.Location = new Point(50, 266); - this.onOffSwitch_Master.Name = "onOffSwitch_Master"; - this.onOffSwitch_Master.Size = new Size(81, 28); - this.onOffSwitch_Master.SwitchedOn = false; - this.onOffSwitch_Master.TabIndex = 2; - this.onOffSwitch_Master.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_Master_SwitchChangeNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(1042, 633); - this.Controls.Add((Control) this.singleButton_SavePreset); - this.Controls.Add((Control) this.singleButton_LoadPreset); - this.Controls.Add((Control) this.label_Copyright); - this.Controls.Add((Control) this.groupBox_Main); - this.Controls.Add((Control) this.buttonBox_Mode); - this.Controls.Add((Control) this.onOffSwitch_Master); - this.Controls.Add((Control) this.label_MasterPower); - this.Controls.Add((Control) this.pictureBox_Logo); - this.Controls.Add((Control) this.menuStrip_Main); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MainMenuStrip = this.menuStrip_Main; - this.MaximizeBox = false; - this.Name = nameof (frmMain); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "ViPER4Windows"; - this.FormClosing += new FormClosingEventHandler(this.frmMain_FormClosing); - this.Load += new EventHandler(this.frmMain_Load); - this.SizeChanged += new EventHandler(this.frmMain_SizeChanged); - ((ISupportInitialize) this.pictureBox_Logo).EndInit(); - this.menuStrip_Main.ResumeLayout(false); - this.menuStrip_Main.PerformLayout(); - this.groupBox_Main.ResumeLayout(false); - this.panel_Freestyle.ResumeLayout(false); - this.panel_Freestyle.PerformLayout(); - this.Freestyle_groupBox_SmartVolume.ResumeLayout(false); - this.Freestyle_groupBox_SmartVolume.PerformLayout(); - this.Freestyle_groupBox_3DSurround.ResumeLayout(false); - this.Freestyle_groupBox_3DSurround.PerformLayout(); - this.Freestyle_groupBox_Reverb.ResumeLayout(false); - this.Freestyle_groupBox_Reverb.PerformLayout(); - this.Freestyle_groupBox_Cure.ResumeLayout(false); - this.Freestyle_groupBox_Cure.PerformLayout(); - this.Freestyle_groupBox_Clarity.ResumeLayout(false); - this.Freestyle_groupBox_Clarity.PerformLayout(); - this.Freestyle_groupBox_Bass.ResumeLayout(false); - this.Freestyle_groupBox_Bass.PerformLayout(); - this.Freestyle_groupBox_VHESurround.ResumeLayout(false); - this.Freestyle_groupBox_Convolver.ResumeLayout(false); - this.Freestyle_groupBox_Convolver.PerformLayout(); - this.panel_MusicMode.ResumeLayout(false); - this.panel_MusicMode.PerformLayout(); - this.panel_MovieMode.ResumeLayout(false); - this.panel_MovieMode.PerformLayout(); - this.Movie_groupBox_SmartVolume.ResumeLayout(false); - this.Movie_groupBox_SmartVolume.PerformLayout(); - this.Movie_groupBox_Reverb.ResumeLayout(false); - this.Movie_groupBox_Reverb.PerformLayout(); - this.Movie_groupBox_Clarity.ResumeLayout(false); - this.Movie_groupBox_Clarity.PerformLayout(); - this.Movie_groupBox_Bass.ResumeLayout(false); - this.Movie_groupBox_Bass.PerformLayout(); - this.Movie_groupBox_Surround.ResumeLayout(false); - this.Movie_groupBox_Surround.PerformLayout(); - this.Movie_groupBox_Convolver.ResumeLayout(false); - this.Movie_groupBox_Convolver.PerformLayout(); - this.Music_groupBox_Reverb.ResumeLayout(false); - this.Music_groupBox_Reverb.PerformLayout(); - this.Music_groupBox_Cure.ResumeLayout(false); - this.Music_groupBox_Cure.PerformLayout(); - this.Music_groupBox_Clarity.ResumeLayout(false); - this.Music_groupBox_Clarity.PerformLayout(); - this.Music_groupBox_Bass.ResumeLayout(false); - this.Music_groupBox_Bass.PerformLayout(); - this.Music_groupBox_Surround.ResumeLayout(false); - this.Music_groupBox_Convolver.ResumeLayout(false); - this.Music_groupBox_Convolver.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmMain)); + pictureBox_Logo = new PictureBox(); + label_MasterPower = new Label(); + menuStrip_Main = new MenuStrip(); + ToolStripMenuItem_Language = new ToolStripMenuItem(); + ToolStripMenuItem_Setting = new ToolStripMenuItem(); + ToolStripMenuItem_LatencySetting = new ToolStripMenuItem(); + ToolStripMenuItem_ChannelPan = new ToolStripMenuItem(); + ToolStripMenuItem_Virtualization = new ToolStripMenuItem(); + ToolStripMenuItem_ResetEffect = new ToolStripMenuItem(); + ToolStripMenuItem_Settings = new ToolStripMenuItem(); + ToolStripMenuItem_Help = new ToolStripMenuItem(); + ToolStripMenuItem_CheckUpdate = new ToolStripMenuItem(); + ToolStripMenuItem_AboutV4W = new ToolStripMenuItem(); + groupBox_Main = new GroupBox(); + panel_Freestyle = new Panel(); + Freestyle_groupBox_SmartVolume = new GroupBox(); + Freestyle_hSlider_SmartVolumeLevel = new HSlider(); + Freestyle_label_SmartVolume_Level = new Label(); + Freestyle_hSlider_SmartVolumeMaxLevel = new HSlider(); + Freestyle_label_SmartVolume_MaxLevel = new Label(); + Freestyle_hSlider_SmartVolumeRatio = new HSlider(); + Freestyle_label_SmartVolume_ControlStrength = new Label(); + Freestyle_onOffSwitch_SmartVolume = new OnOffSwitch(); + Freestyle_groupBox_3DSurround = new GroupBox(); + Freestyle_hSlider_SurroundImage = new HSlider(); + Freestyle_label_Surround_Image = new Label(); + Freestyle_hSlider_Surround3D = new HSlider(); + Freestyle_label_Surround_3D = new Label(); + Freestyle_onOffSwitch_Surround3D = new OnOffSwitch(); + Freestyle_SingleButton_Compressor = new SingleButton(); + Freestyle_SingleButton_Equalizer = new SingleButton(); + Freestyle_groupBox_Reverb = new GroupBox(); + Freestyle_SingleButton_ReverbPreset = new SingleButton(); + Freestyle_hSlider_ReverbMix = new HSlider(); + Freestyle_label_Reverb_Mix = new Label(); + Freestyle_hSlider_ReverbEarlyMix = new HSlider(); + Freestyle_label_Reverb_EarlyMix = new Label(); + Freestyle_hSlider_ReverbPreDelay = new HSlider(); + Freestyle_label_Reverb_PreDelay = new Label(); + Freestyle_hSlider_ReverbDecay = new HSlider(); + Freestyle_label_Reverb_Decay = new Label(); + Freestyle_hSlider_ReverbBandWidth = new HSlider(); + Freestyle_label_Reverb_BandWidth = new Label(); + Freestyle_hSlider_ReverbDensity = new HSlider(); + Freestyle_label_Reverb_Density = new Label(); + Freestyle_hSlider_ReverbDamping = new HSlider(); + Freestyle_label_Reverb_Damping = new Label(); + Freestyle_hSlider_ReverbSize = new HSlider(); + Freestyle_label_Reverb_Size = new Label(); + Freestyle_onOffSwitch_Reverb = new OnOffSwitch(); + Freestyle_groupBox_Cure = new GroupBox(); + Freestyle_ButtonBox_CureLevel = new ButtonBox(); + Freestyle_onOffSwitch_Cure = new OnOffSwitch(); + Freestyle_label_Tube = new Label(); + Freestyle_onOffSwitch_Tube = new OnOffSwitch(); + Freestyle_groupBox_Clarity = new GroupBox(); + Freestyle_ButtonBox_ClarityMode = new ButtonBox(); + Freestyle_hSlider_Clarity = new HSlider(); + Freestyle_label_Clarity = new Label(); + Freestyle_onOffSwitch_Clarity = new OnOffSwitch(); + Freestyle_groupBox_Bass = new GroupBox(); + Freestyle_ButtonBox_BassMode = new ButtonBox(); + Freestyle_hSlider_BassGain = new HSlider(); + Freestyle_label_Bass_Gain = new Label(); + Freestyle_hSlider_BassSpkSize = new HSlider(); + Freestyle_label_Bass_SpkSize = new Label(); + Freestyle_onOffSwitch_Bass = new OnOffSwitch(); + Freestyle_groupBox_VHESurround = new GroupBox(); + Freestyle_ButtonBox_SurroundVHERoomSize = new ButtonBox(); + Freestyle_onOffSwitch_SurroundVHE = new OnOffSwitch(); + Freestyle_groupBox_Convolver = new GroupBox(); + Freestyle_irShape_ConvIR = new IRShape(); + Freestyle_onOffSwitch_Convolver = new OnOffSwitch(); + Freestyle_hSlider_ConvIRGain = new HSlider(); + Freestyle_openFileBox_ConvIRS = new OpenFileBox(); + Freestyle_label_ConvolverIRGain = new Label(); + Freestyle_hSlider_PostVolume = new HSlider(); + Freestyle_label_PostVolume = new Label(); + Freestyle_hSlider_PreVolume = new HSlider(); + Freestyle_label_PreVolume = new Label(); + panel_MusicMode = new Panel(); + panel_MovieMode = new Panel(); + Movie_groupBox_SmartVolume = new GroupBox(); + Movie_hSlider_SmartVolumeLevel = new HSlider(); + Movie_label_SmartVolume_Level = new Label(); + Movie_hSlider_SmartVolumeMaxLevel = new HSlider(); + Movie_label_SmartVolume_MaxLevel = new Label(); + Movie_hSlider_SmartVolumeRatio = new HSlider(); + Movie_label_SmartVolume_ControlStrength = new Label(); + Movie_onOffSwitch_SmartVolume = new OnOffSwitch(); + Movie_SingleButton_Compressor = new SingleButton(); + Movie_SingleButton_Equalizer = new SingleButton(); + Movie_groupBox_Reverb = new GroupBox(); + Movie_SingleButton_ReverbPreset = new SingleButton(); + Movie_hSlider_ReverbMix = new HSlider(); + Movie_label_Reverb_Mix = new Label(); + Movie_hSlider_ReverbEarlyMix = new HSlider(); + Movie_label_Reverb_EarlyMix = new Label(); + Movie_hSlider_ReverbPreDelay = new HSlider(); + Movie_label_Reverb_PreDelay = new Label(); + Movie_hSlider_ReverbDecay = new HSlider(); + Movie_label_Reverb_Decay = new Label(); + Movie_hSlider_ReverbBandWidth = new HSlider(); + Movie_label_Reverb_BandWidth = new Label(); + Movie_hSlider_ReverbDensity = new HSlider(); + Movie_label_Reverb_Density = new Label(); + Movie_hSlider_ReverbDamping = new HSlider(); + Movie_label_Reverb_Damping = new Label(); + Movie_hSlider_ReverbSize = new HSlider(); + Movie_label_Reverb_Size = new Label(); + Movie_onOffSwitch_Reverb = new OnOffSwitch(); + Movie_groupBox_Clarity = new GroupBox(); + Movie_hSlider_Clarity = new HSlider(); + Movie_label_Clarity = new Label(); + Movie_onOffSwitch_Clarity = new OnOffSwitch(); + Movie_groupBox_Bass = new GroupBox(); + Movie_hSlider_BassGain = new HSlider(); + Movie_label_Bass_Gain = new Label(); + Movie_hSlider_BassSpkSize = new HSlider(); + Movie_label_Bass_SpkSize = new Label(); + Movie_onOffSwitch_Bass = new OnOffSwitch(); + Movie_groupBox_Surround = new GroupBox(); + Movie_hSlider_SurroundImage = new HSlider(); + Movie_label_Surround_Image = new Label(); + Movie_hSlider_Surround3D = new HSlider(); + Movie_label_Surround_3D = new Label(); + Movie_onOffSwitch_Surround = new OnOffSwitch(); + Movie_groupBox_Convolver = new GroupBox(); + Movie_irShape_ConvIR = new IRShape(); + Movie_onOffSwitch_Convolver = new OnOffSwitch(); + Movie_hSlider_ConvIRGain = new HSlider(); + Movie_openFileBox_ConvIRS = new OpenFileBox(); + Movie_label_ConvolverIRGain = new Label(); + Movie_hSlider_PostVolume = new HSlider(); + Movie_label_PostVolume = new Label(); + Movie_hSlider_PreVolume = new HSlider(); + Movie_label_PreVolume = new Label(); + Music_SingleButton_Compressor = new SingleButton(); + Music_SingleButton_Equalizer = new SingleButton(); + Music_groupBox_Reverb = new GroupBox(); + Music_SingleButton_ReverbPreset = new SingleButton(); + Music_hSlider_ReverbMix = new HSlider(); + Music_label_Reverb_Mix = new Label(); + Music_hSlider_ReverbEarlyMix = new HSlider(); + Music_label_Reverb_EarlyMix = new Label(); + Music_hSlider_ReverbPreDelay = new HSlider(); + Music_label_Reverb_PreDelay = new Label(); + Music_hSlider_ReverbDecay = new HSlider(); + Music_label_Reverb_Decay = new Label(); + Music_hSlider_ReverbBandWidth = new HSlider(); + Music_label_Reverb_BandWidth = new Label(); + Music_hSlider_ReverbDensity = new HSlider(); + Music_label_Reverb_Density = new Label(); + Music_hSlider_ReverbDamping = new HSlider(); + Music_label_Reverb_Damping = new Label(); + Music_hSlider_ReverbSize = new HSlider(); + Music_label_Reverb_Size = new Label(); + Music_onOffSwitch_Reverb = new OnOffSwitch(); + Music_groupBox_Cure = new GroupBox(); + Music_ButtonBox_CureLevel = new ButtonBox(); + Music_onOffSwitch_Cure = new OnOffSwitch(); + Music_label_Tube = new Label(); + Music_onOffSwitch_Tube = new OnOffSwitch(); + Music_groupBox_Clarity = new GroupBox(); + Music_ButtonBox_ClarityMode = new ButtonBox(); + Music_hSlider_Clarity = new HSlider(); + Music_label_Clarity = new Label(); + Music_onOffSwitch_Clarity = new OnOffSwitch(); + Music_groupBox_Bass = new GroupBox(); + Music_hSlider_BassGain = new HSlider(); + Music_label_Bass_Gain = new Label(); + Music_hSlider_BassSpkSize = new HSlider(); + Music_label_Bass_SpkSize = new Label(); + Music_onOffSwitch_Bass = new OnOffSwitch(); + Music_groupBox_Surround = new GroupBox(); + Music_ButtonBox_SurroundRoomSize = new ButtonBox(); + Music_onOffSwitch_Surround = new OnOffSwitch(); + Music_groupBox_Convolver = new GroupBox(); + Music_irShape_ConvIR = new IRShape(); + Music_onOffSwitch_Convolver = new OnOffSwitch(); + Music_hSlider_ConvIRGain = new HSlider(); + Music_openFileBox_ConvIRS = new OpenFileBox(); + Music_label_ConvolverIRGain = new Label(); + Music_hSlider_PostVolume = new HSlider(); + Music_label_PostVolume = new Label(); + Music_hSlider_PreVolume = new HSlider(); + Music_label_PreVolume = new Label(); + label_Copyright = new Label(); + notifyIcon_Main = new NotifyIcon(components); + contextMenuStrip_TrayMenu = new ContextMenuStrip(components); + SingleButton_SavePreset = new SingleButton(); + SingleButton_LoadPreset = new SingleButton(); + ButtonBox_Mode = new ButtonBox(); + onOffSwitch_Master = new OnOffSwitch(); + ((ISupportInitialize)pictureBox_Logo).BeginInit(); + menuStrip_Main.SuspendLayout(); + groupBox_Main.SuspendLayout(); + panel_Freestyle.SuspendLayout(); + Freestyle_groupBox_SmartVolume.SuspendLayout(); + Freestyle_groupBox_3DSurround.SuspendLayout(); + Freestyle_groupBox_Reverb.SuspendLayout(); + Freestyle_groupBox_Cure.SuspendLayout(); + Freestyle_groupBox_Clarity.SuspendLayout(); + Freestyle_groupBox_Bass.SuspendLayout(); + Freestyle_groupBox_VHESurround.SuspendLayout(); + Freestyle_groupBox_Convolver.SuspendLayout(); + panel_MusicMode.SuspendLayout(); + panel_MovieMode.SuspendLayout(); + Movie_groupBox_SmartVolume.SuspendLayout(); + Movie_groupBox_Reverb.SuspendLayout(); + Movie_groupBox_Clarity.SuspendLayout(); + Movie_groupBox_Bass.SuspendLayout(); + Movie_groupBox_Surround.SuspendLayout(); + Movie_groupBox_Convolver.SuspendLayout(); + Music_groupBox_Reverb.SuspendLayout(); + Music_groupBox_Cure.SuspendLayout(); + Music_groupBox_Clarity.SuspendLayout(); + Music_groupBox_Bass.SuspendLayout(); + Music_groupBox_Surround.SuspendLayout(); + Music_groupBox_Convolver.SuspendLayout(); + SuspendLayout(); + pictureBox_Logo.Image = Resources.Logo; + pictureBox_Logo.Location = new Point(28, 69); + pictureBox_Logo.Name = "pictureBox_Logo"; + pictureBox_Logo.Size = new Size(128, 128); + pictureBox_Logo.SizeMode = PictureBoxSizeMode.AutoSize; + pictureBox_Logo.TabIndex = 0; + pictureBox_Logo.TabStop = false; + label_MasterPower.AutoSize = true; + label_MasterPower.Location = new Point(48, 246); + label_MasterPower.Name = "label_MasterPower"; + label_MasterPower.Size = new Size(83, 12); + label_MasterPower.TabIndex = 1; + label_MasterPower.Text = "$MASTER_POWER"; + menuStrip_Main.Items.AddRange(new ToolStripItem[3] + { + ToolStripMenuItem_Language, + ToolStripMenuItem_Setting, + ToolStripMenuItem_Help + }); + menuStrip_Main.Location = new Point(0, 0); + menuStrip_Main.Name = "menuStrip_Main"; + menuStrip_Main.Size = new Size(1042, 25); + menuStrip_Main.TabIndex = 4; + ToolStripMenuItem_Language.Name = "ToolStripMenuItem_Language"; + ToolStripMenuItem_Language.Size = new Size(136, 21); + ToolStripMenuItem_Language.Text = "$MENU_LANGUAGE"; + ToolStripMenuItem_Setting.DropDownItems.AddRange(new ToolStripItem[5] + { + ToolStripMenuItem_LatencySetting, + ToolStripMenuItem_ChannelPan, + ToolStripMenuItem_Virtualization, + ToolStripMenuItem_ResetEffect, + ToolStripMenuItem_Settings + }); + ToolStripMenuItem_Setting.Name = "ToolStripMenuItem_Setting"; + ToolStripMenuItem_Setting.Size = new Size(121, 21); + ToolStripMenuItem_Setting.Text = "$MENU_SETTING"; + ToolStripMenuItem_LatencySetting.Name = "ToolStripMenuItem_LatencySetting"; + ToolStripMenuItem_LatencySetting.Size = new Size(192, 22); + ToolStripMenuItem_LatencySetting.Text = "$LATENCY_SETTING"; + ToolStripMenuItem_LatencySetting.Click += new EventHandler(ToolStripMenuItem_LatencySetting_Click); + ToolStripMenuItem_ChannelPan.Name = "ToolStripMenuItem_ChannelPan"; + ToolStripMenuItem_ChannelPan.Size = new Size(192, 22); + ToolStripMenuItem_ChannelPan.Text = "$CHANNEL_PAN"; + ToolStripMenuItem_ChannelPan.Click += new EventHandler(ToolStripMenuItem_ChannelPan_Click); + ToolStripMenuItem_Virtualization.Name = "ToolStripMenuItem_Virtualization"; + ToolStripMenuItem_Virtualization.Size = new Size(192, 22); + ToolStripMenuItem_Virtualization.Text = "$VIRTUALIZATION"; + ToolStripMenuItem_Virtualization.Click += new EventHandler(ToolStripMenuItem_Virtualization_Click); + ToolStripMenuItem_ResetEffect.Name = "ToolStripMenuItem_ResetEffect"; + ToolStripMenuItem_ResetEffect.Size = new Size(192, 22); + ToolStripMenuItem_ResetEffect.Text = "$RESET_EFFECT"; + ToolStripMenuItem_ResetEffect.Click += new EventHandler(ToolStripMenuItem_ResetEffect_Click); + ToolStripMenuItem_Settings.Name = "ToolStripMenuItem_Settings"; + ToolStripMenuItem_Settings.Size = new Size(192, 22); + ToolStripMenuItem_Settings.Text = "$SETTINGS"; + ToolStripMenuItem_Settings.Click += new EventHandler(ToolStripMenuItem_Settings_Click); + ToolStripMenuItem_Help.DropDownItems.AddRange(new ToolStripItem[2] + { + ToolStripMenuItem_CheckUpdate, + ToolStripMenuItem_AboutV4W + }); + ToolStripMenuItem_Help.Name = "ToolStripMenuItem_Help"; + ToolStripMenuItem_Help.Size = new Size(99, 21); + ToolStripMenuItem_Help.Text = "$MENU_HELP"; + ToolStripMenuItem_CheckUpdate.Name = "ToolStripMenuItem_CheckUpdate"; + ToolStripMenuItem_CheckUpdate.Size = new Size(175, 22); + ToolStripMenuItem_CheckUpdate.Text = "$CHECK_UPDATE"; + ToolStripMenuItem_CheckUpdate.Click += new EventHandler(ToolStripMenuItem_CheckUpdate_Click); + ToolStripMenuItem_AboutV4W.Name = "ToolStripMenuItem_AboutV4W"; + ToolStripMenuItem_AboutV4W.Size = new Size(175, 22); + ToolStripMenuItem_AboutV4W.Text = "$ABOUT"; + ToolStripMenuItem_AboutV4W.Click += new EventHandler(ToolStripMenuItem_AboutV4W_Click); + groupBox_Main.Controls.Add(panel_Freestyle); + groupBox_Main.Controls.Add(panel_MusicMode); + groupBox_Main.Location = new Point(186, 28); + groupBox_Main.Name = "groupBox_Main"; + groupBox_Main.Size = new Size(841, 572); + groupBox_Main.TabIndex = 5; + groupBox_Main.TabStop = false; + panel_Freestyle.Controls.Add(Freestyle_groupBox_SmartVolume); + panel_Freestyle.Controls.Add(Freestyle_groupBox_3DSurround); + panel_Freestyle.Controls.Add(Freestyle_SingleButton_Compressor); + panel_Freestyle.Controls.Add(Freestyle_SingleButton_Equalizer); + panel_Freestyle.Controls.Add(Freestyle_groupBox_Reverb); + panel_Freestyle.Controls.Add(Freestyle_groupBox_Cure); + panel_Freestyle.Controls.Add(Freestyle_groupBox_Clarity); + panel_Freestyle.Controls.Add(Freestyle_groupBox_Bass); + panel_Freestyle.Controls.Add(Freestyle_groupBox_VHESurround); + panel_Freestyle.Controls.Add(Freestyle_groupBox_Convolver); + panel_Freestyle.Controls.Add(Freestyle_hSlider_PostVolume); + panel_Freestyle.Controls.Add(Freestyle_label_PostVolume); + panel_Freestyle.Controls.Add(Freestyle_hSlider_PreVolume); + panel_Freestyle.Controls.Add(Freestyle_label_PreVolume); + panel_Freestyle.Dock = DockStyle.Fill; + panel_Freestyle.Location = new Point(3, 17); + panel_Freestyle.Name = "panel_Freestyle"; + panel_Freestyle.Size = new Size(835, 552); + panel_Freestyle.TabIndex = 10; + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_hSlider_SmartVolumeLevel); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_label_SmartVolume_Level); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_hSlider_SmartVolumeMaxLevel); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_label_SmartVolume_MaxLevel); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_hSlider_SmartVolumeRatio); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_label_SmartVolume_ControlStrength); + Freestyle_groupBox_SmartVolume.Controls.Add(Freestyle_onOffSwitch_SmartVolume); + Freestyle_groupBox_SmartVolume.Location = new Point(216, 391); + Freestyle_groupBox_SmartVolume.Name = "Freestyle_groupBox_SmartVolume"; + Freestyle_groupBox_SmartVolume.Size = new Size(384, 148); + Freestyle_groupBox_SmartVolume.TabIndex = 23; + Freestyle_groupBox_SmartVolume.TabStop = false; + Freestyle_groupBox_SmartVolume.Text = "$SMART_VOLUME"; + Freestyle_hSlider_SmartVolumeLevel.BackColor = SystemColors.Control; + Freestyle_hSlider_SmartVolumeLevel.Location = new Point(195, 85); + Freestyle_hSlider_SmartVolumeLevel.MoveDelta = 1U; + Freestyle_hSlider_SmartVolumeLevel.Name = "Freestyle_hSlider_SmartVolumeLevel"; + Freestyle_hSlider_SmartVolumeLevel.Position = 0U; + Freestyle_hSlider_SmartVolumeLevel.PositionFloat = 0.0f; + Freestyle_hSlider_SmartVolumeLevel.Size = new Size(174, 39); + Freestyle_hSlider_SmartVolumeLevel.TabIndex = 23; + Freestyle_hSlider_SmartVolumeLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_SmartVolumeLevel_PositionChangeNotify); + Freestyle_label_SmartVolume_Level.AutoSize = true; + Freestyle_label_SmartVolume_Level.Location = new Point(214, 67); + Freestyle_label_SmartVolume_Level.Name = "Freestyle_label_SmartVolume_Level"; + Freestyle_label_SmartVolume_Level.Size = new Size(155, 12); + Freestyle_label_SmartVolume_Level.TabIndex = 22; + Freestyle_label_SmartVolume_Level.Text = "$SMART_VOLUME_LEVEL : 0dB"; + Freestyle_hSlider_SmartVolumeMaxLevel.BackColor = SystemColors.Control; + Freestyle_hSlider_SmartVolumeMaxLevel.Location = new Point(9, 115); + Freestyle_hSlider_SmartVolumeMaxLevel.MoveDelta = 1U; + Freestyle_hSlider_SmartVolumeMaxLevel.Name = "Freestyle_hSlider_SmartVolumeMaxLevel"; + Freestyle_hSlider_SmartVolumeMaxLevel.Position = 0U; + Freestyle_hSlider_SmartVolumeMaxLevel.PositionFloat = 0.0f; + Freestyle_hSlider_SmartVolumeMaxLevel.Size = new Size(161, 24); + Freestyle_hSlider_SmartVolumeMaxLevel.TabIndex = 21; + Freestyle_hSlider_SmartVolumeMaxLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_SmartVolumeMaxLevel_PositionChangeNotify); + Freestyle_label_SmartVolume_MaxLevel.AutoSize = true; + Freestyle_label_SmartVolume_MaxLevel.Location = new Point(19, 100); + Freestyle_label_SmartVolume_MaxLevel.Name = "Freestyle_label_SmartVolume_MaxLevel"; + Freestyle_label_SmartVolume_MaxLevel.Size = new Size(167, 12); + Freestyle_label_SmartVolume_MaxLevel.TabIndex = 20; + Freestyle_label_SmartVolume_MaxLevel.Text = "$SMART_VOLUME_MAXLEVEL : 1x"; + Freestyle_hSlider_SmartVolumeRatio.BackColor = SystemColors.Control; + Freestyle_hSlider_SmartVolumeRatio.Location = new Point(9, 73); + Freestyle_hSlider_SmartVolumeRatio.MoveDelta = 1U; + Freestyle_hSlider_SmartVolumeRatio.Name = "Freestyle_hSlider_SmartVolumeRatio"; + Freestyle_hSlider_SmartVolumeRatio.Position = 0U; + Freestyle_hSlider_SmartVolumeRatio.PositionFloat = 0.0f; + Freestyle_hSlider_SmartVolumeRatio.Size = new Size(161, 24); + Freestyle_hSlider_SmartVolumeRatio.TabIndex = 19; + Freestyle_hSlider_SmartVolumeRatio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_SmartVolumeRatio_PositionChangeNotify); + Freestyle_label_SmartVolume_ControlStrength.AutoSize = true; + Freestyle_label_SmartVolume_ControlStrength.Location = new Point(19, 58); + Freestyle_label_SmartVolume_ControlStrength.Name = "Freestyle_label_SmartVolume_ControlStrength"; + Freestyle_label_SmartVolume_ControlStrength.Size = new Size(185, 12); + Freestyle_label_SmartVolume_ControlStrength.TabIndex = 18; + Freestyle_label_SmartVolume_ControlStrength.Text = "$SMART_VOLUME_CONTROL_STRENGTH"; + Freestyle_onOffSwitch_SmartVolume.BackColor = Color.Transparent; + Freestyle_onOffSwitch_SmartVolume.Location = new Point(13, 23); + Freestyle_onOffSwitch_SmartVolume.Name = "Freestyle_onOffSwitch_SmartVolume"; + Freestyle_onOffSwitch_SmartVolume.Size = new Size(49, 20); + Freestyle_onOffSwitch_SmartVolume.SwitchedOn = false; + Freestyle_onOffSwitch_SmartVolume.TabIndex = 17; + Freestyle_onOffSwitch_SmartVolume.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_SmartVolume_SwitchChangeNotify); + Freestyle_groupBox_3DSurround.Controls.Add(Freestyle_hSlider_SurroundImage); + Freestyle_groupBox_3DSurround.Controls.Add(Freestyle_label_Surround_Image); + Freestyle_groupBox_3DSurround.Controls.Add(Freestyle_hSlider_Surround3D); + Freestyle_groupBox_3DSurround.Controls.Add(Freestyle_label_Surround_3D); + Freestyle_groupBox_3DSurround.Controls.Add(Freestyle_onOffSwitch_Surround3D); + Freestyle_groupBox_3DSurround.Location = new Point(476, 6); + Freestyle_groupBox_3DSurround.Name = "Freestyle_groupBox_3DSurround"; + Freestyle_groupBox_3DSurround.Size = new Size(121, 179); + Freestyle_groupBox_3DSurround.TabIndex = 22; + Freestyle_groupBox_3DSurround.TabStop = false; + Freestyle_groupBox_3DSurround.Text = "$3D_SURROUND"; + Freestyle_hSlider_SurroundImage.BackColor = SystemColors.Control; + Freestyle_hSlider_SurroundImage.Location = new Point(6, 126); + Freestyle_hSlider_SurroundImage.MoveDelta = 1U; + Freestyle_hSlider_SurroundImage.Name = "Freestyle_hSlider_SurroundImage"; + Freestyle_hSlider_SurroundImage.Position = 0U; + Freestyle_hSlider_SurroundImage.PositionFloat = 0.0f; + Freestyle_hSlider_SurroundImage.Size = new Size(110, 24); + Freestyle_hSlider_SurroundImage.TabIndex = 25; + Freestyle_hSlider_SurroundImage.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_SurroundImage_PositionChangeNotify); + Freestyle_label_Surround_Image.AutoSize = true; + Freestyle_label_Surround_Image.Location = new Point(16, 111); + Freestyle_label_Surround_Image.Name = "Freestyle_label_Surround_Image"; + Freestyle_label_Surround_Image.Size = new Size(95, 12); + Freestyle_label_Surround_Image.TabIndex = 24; + Freestyle_label_Surround_Image.Text = "$SURROUND_IMAGE"; + Freestyle_hSlider_Surround3D.BackColor = SystemColors.Control; + Freestyle_hSlider_Surround3D.Location = new Point(6, 84); + Freestyle_hSlider_Surround3D.MoveDelta = 1U; + Freestyle_hSlider_Surround3D.Name = "Freestyle_hSlider_Surround3D"; + Freestyle_hSlider_Surround3D.Position = 0U; + Freestyle_hSlider_Surround3D.PositionFloat = 0.0f; + Freestyle_hSlider_Surround3D.Size = new Size(110, 24); + Freestyle_hSlider_Surround3D.TabIndex = 23; + Freestyle_hSlider_Surround3D.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_Surround3D_PositionChangeNotify); + Freestyle_label_Surround_3D.AutoSize = true; + Freestyle_label_Surround_3D.Location = new Point(16, 69); + Freestyle_label_Surround_3D.Name = "Freestyle_label_Surround_3D"; + Freestyle_label_Surround_3D.Size = new Size(77, 12); + Freestyle_label_Surround_3D.TabIndex = 22; + Freestyle_label_Surround_3D.Text = "$SURROUND_3D"; + Freestyle_onOffSwitch_Surround3D.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Surround3D.Location = new Point(13, 23); + Freestyle_onOffSwitch_Surround3D.Name = "Freestyle_onOffSwitch_Surround3D"; + Freestyle_onOffSwitch_Surround3D.Size = new Size(49, 20); + Freestyle_onOffSwitch_Surround3D.SwitchedOn = false; + Freestyle_onOffSwitch_Surround3D.TabIndex = 6; + Freestyle_onOffSwitch_Surround3D.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Surround3D_SwitchChangeNotify); + Freestyle_SingleButton_Compressor.BackColor = SystemColors.Control; + Freestyle_SingleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; + Freestyle_SingleButton_Compressor.Location = new Point(30, 500); + Freestyle_SingleButton_Compressor.Name = "Freestyle_SingleButton_Compressor"; + Freestyle_SingleButton_Compressor.Size = new Size(174, 39); + Freestyle_SingleButton_Compressor.TabIndex = 21; + Freestyle_SingleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Freestyle_SingleButton_Compressor_ButtonClickNotify); + Freestyle_SingleButton_Equalizer.BackColor = SystemColors.Control; + Freestyle_SingleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; + Freestyle_SingleButton_Equalizer.Location = new Point(30, 455); + Freestyle_SingleButton_Equalizer.Name = "Freestyle_SingleButton_Equalizer"; + Freestyle_SingleButton_Equalizer.Size = new Size(174, 39); + Freestyle_SingleButton_Equalizer.TabIndex = 20; + Freestyle_SingleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Freestyle_SingleButton_Equalizer_ButtonClickNotify); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_SingleButton_ReverbPreset); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbMix); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_Mix); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbEarlyMix); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_EarlyMix); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbPreDelay); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_PreDelay); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbDecay); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_Decay); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbBandWidth); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_BandWidth); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbDensity); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_Density); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbDamping); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_Damping); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_hSlider_ReverbSize); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_label_Reverb_Size); + Freestyle_groupBox_Reverb.Controls.Add(Freestyle_onOffSwitch_Reverb); + Freestyle_groupBox_Reverb.Location = new Point(606, 150); + Freestyle_groupBox_Reverb.Name = "Freestyle_groupBox_Reverb"; + Freestyle_groupBox_Reverb.Size = new Size(208, 389); + Freestyle_groupBox_Reverb.TabIndex = 19; + Freestyle_groupBox_Reverb.TabStop = false; + Freestyle_groupBox_Reverb.Text = "$REVERB"; + Freestyle_SingleButton_ReverbPreset.BackColor = SystemColors.Control; + Freestyle_SingleButton_ReverbPreset.ButtonText = "$PRESET"; + Freestyle_SingleButton_ReverbPreset.Location = new Point(121, 14); + Freestyle_SingleButton_ReverbPreset.Name = "Freestyle_SingleButton_ReverbPreset"; + Freestyle_SingleButton_ReverbPreset.Size = new Size(81, 29); + Freestyle_SingleButton_ReverbPreset.TabIndex = 36; + Freestyle_SingleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Freestyle_SingleButton_ReverbPreset_ButtonClickNotify); + Freestyle_hSlider_ReverbMix.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbMix.Location = new Point(24, 356); + Freestyle_hSlider_ReverbMix.MoveDelta = 1U; + Freestyle_hSlider_ReverbMix.Name = "Freestyle_hSlider_ReverbMix"; + Freestyle_hSlider_ReverbMix.Position = 0U; + Freestyle_hSlider_ReverbMix.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbMix.Size = new Size(161, 24); + Freestyle_hSlider_ReverbMix.TabIndex = 35; + Freestyle_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbMix_PositionChangeNotify); + Freestyle_label_Reverb_Mix.AutoSize = true; + Freestyle_label_Reverb_Mix.Location = new Point(34, 341); + Freestyle_label_Reverb_Mix.Name = "Freestyle_label_Reverb_Mix"; + Freestyle_label_Reverb_Mix.Size = new Size(71, 12); + Freestyle_label_Reverb_Mix.TabIndex = 34; + Freestyle_label_Reverb_Mix.Text = "$REVERB_MIX"; + Freestyle_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbEarlyMix.Location = new Point(24, 314); + Freestyle_hSlider_ReverbEarlyMix.MoveDelta = 1U; + Freestyle_hSlider_ReverbEarlyMix.Name = "Freestyle_hSlider_ReverbEarlyMix"; + Freestyle_hSlider_ReverbEarlyMix.Position = 0U; + Freestyle_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbEarlyMix.Size = new Size(161, 24); + Freestyle_hSlider_ReverbEarlyMix.TabIndex = 33; + Freestyle_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbEarlyMix_PositionChangeNotify); + Freestyle_label_Reverb_EarlyMix.AutoSize = true; + Freestyle_label_Reverb_EarlyMix.Location = new Point(34, 299); + Freestyle_label_Reverb_EarlyMix.Name = "Freestyle_label_Reverb_EarlyMix"; + Freestyle_label_Reverb_EarlyMix.Size = new Size(101, 12); + Freestyle_label_Reverb_EarlyMix.TabIndex = 32; + Freestyle_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; + Freestyle_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbPreDelay.Location = new Point(24, 272); + Freestyle_hSlider_ReverbPreDelay.MoveDelta = 1U; + Freestyle_hSlider_ReverbPreDelay.Name = "Freestyle_hSlider_ReverbPreDelay"; + Freestyle_hSlider_ReverbPreDelay.Position = 0U; + Freestyle_hSlider_ReverbPreDelay.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbPreDelay.Size = new Size(161, 24); + Freestyle_hSlider_ReverbPreDelay.TabIndex = 31; + Freestyle_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbPreDelay_PositionChangeNotify); + Freestyle_label_Reverb_PreDelay.AutoSize = true; + Freestyle_label_Reverb_PreDelay.Location = new Point(34, 257); + Freestyle_label_Reverb_PreDelay.Name = "Freestyle_label_Reverb_PreDelay"; + Freestyle_label_Reverb_PreDelay.Size = new Size(101, 12); + Freestyle_label_Reverb_PreDelay.TabIndex = 30; + Freestyle_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; + Freestyle_hSlider_ReverbDecay.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbDecay.Location = new Point(24, 230); + Freestyle_hSlider_ReverbDecay.MoveDelta = 1U; + Freestyle_hSlider_ReverbDecay.Name = "Freestyle_hSlider_ReverbDecay"; + Freestyle_hSlider_ReverbDecay.Position = 0U; + Freestyle_hSlider_ReverbDecay.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbDecay.Size = new Size(161, 24); + Freestyle_hSlider_ReverbDecay.TabIndex = 29; + Freestyle_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbDecay_PositionChangeNotify); + Freestyle_label_Reverb_Decay.AutoSize = true; + Freestyle_label_Reverb_Decay.Location = new Point(34, 215); + Freestyle_label_Reverb_Decay.Name = "Freestyle_label_Reverb_Decay"; + Freestyle_label_Reverb_Decay.Size = new Size(83, 12); + Freestyle_label_Reverb_Decay.TabIndex = 28; + Freestyle_label_Reverb_Decay.Text = "$REVERB_DECAY"; + Freestyle_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbBandWidth.Location = new Point(24, 188); + Freestyle_hSlider_ReverbBandWidth.MoveDelta = 1U; + Freestyle_hSlider_ReverbBandWidth.Name = "Freestyle_hSlider_ReverbBandWidth"; + Freestyle_hSlider_ReverbBandWidth.Position = 0U; + Freestyle_hSlider_ReverbBandWidth.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbBandWidth.Size = new Size(161, 24); + Freestyle_hSlider_ReverbBandWidth.TabIndex = 27; + Freestyle_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbBandWidth_PositionChangeNotify); + Freestyle_label_Reverb_BandWidth.AutoSize = true; + Freestyle_label_Reverb_BandWidth.Location = new Point(34, 173); + Freestyle_label_Reverb_BandWidth.Name = "Freestyle_label_Reverb_BandWidth"; + Freestyle_label_Reverb_BandWidth.Size = new Size(107, 12); + Freestyle_label_Reverb_BandWidth.TabIndex = 26; + Freestyle_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; + Freestyle_hSlider_ReverbDensity.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbDensity.Location = new Point(24, 146); + Freestyle_hSlider_ReverbDensity.MoveDelta = 1U; + Freestyle_hSlider_ReverbDensity.Name = "Freestyle_hSlider_ReverbDensity"; + Freestyle_hSlider_ReverbDensity.Position = 0U; + Freestyle_hSlider_ReverbDensity.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbDensity.Size = new Size(161, 24); + Freestyle_hSlider_ReverbDensity.TabIndex = 25; + Freestyle_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbDensity_PositionChangeNotify); + Freestyle_label_Reverb_Density.AutoSize = true; + Freestyle_label_Reverb_Density.Location = new Point(34, 131); + Freestyle_label_Reverb_Density.Name = "Freestyle_label_Reverb_Density"; + Freestyle_label_Reverb_Density.Size = new Size(95, 12); + Freestyle_label_Reverb_Density.TabIndex = 24; + Freestyle_label_Reverb_Density.Text = "$REVERB_DENSITY"; + Freestyle_hSlider_ReverbDamping.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbDamping.Location = new Point(24, 104); + Freestyle_hSlider_ReverbDamping.MoveDelta = 1U; + Freestyle_hSlider_ReverbDamping.Name = "Freestyle_hSlider_ReverbDamping"; + Freestyle_hSlider_ReverbDamping.Position = 0U; + Freestyle_hSlider_ReverbDamping.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbDamping.Size = new Size(161, 24); + Freestyle_hSlider_ReverbDamping.TabIndex = 23; + Freestyle_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbDamping_PositionChangeNotify); + Freestyle_label_Reverb_Damping.AutoSize = true; + Freestyle_label_Reverb_Damping.Location = new Point(34, 89); + Freestyle_label_Reverb_Damping.Name = "Freestyle_label_Reverb_Damping"; + Freestyle_label_Reverb_Damping.Size = new Size(95, 12); + Freestyle_label_Reverb_Damping.TabIndex = 22; + Freestyle_label_Reverb_Damping.Text = "$REVERB_DAMPING"; + Freestyle_hSlider_ReverbSize.BackColor = SystemColors.Control; + Freestyle_hSlider_ReverbSize.Location = new Point(24, 64); + Freestyle_hSlider_ReverbSize.MoveDelta = 1U; + Freestyle_hSlider_ReverbSize.Name = "Freestyle_hSlider_ReverbSize"; + Freestyle_hSlider_ReverbSize.Position = 0U; + Freestyle_hSlider_ReverbSize.PositionFloat = 0.0f; + Freestyle_hSlider_ReverbSize.Size = new Size(161, 24); + Freestyle_hSlider_ReverbSize.TabIndex = 21; + Freestyle_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ReverbSize_PositionChangeNotify); + Freestyle_label_Reverb_Size.AutoSize = true; + Freestyle_label_Reverb_Size.Location = new Point(34, 49); + Freestyle_label_Reverb_Size.Name = "Freestyle_label_Reverb_Size"; + Freestyle_label_Reverb_Size.Size = new Size(77, 12); + Freestyle_label_Reverb_Size.TabIndex = 20; + Freestyle_label_Reverb_Size.Text = "$REVERB_SIZE"; + Freestyle_onOffSwitch_Reverb.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Reverb.Location = new Point(13, 23); + Freestyle_onOffSwitch_Reverb.Name = "Freestyle_onOffSwitch_Reverb"; + Freestyle_onOffSwitch_Reverb.Size = new Size(49, 20); + Freestyle_onOffSwitch_Reverb.SwitchedOn = false; + Freestyle_onOffSwitch_Reverb.TabIndex = 7; + Freestyle_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Reverb_SwitchChangeNotify); + Freestyle_groupBox_Cure.Controls.Add(Freestyle_ButtonBox_CureLevel); + Freestyle_groupBox_Cure.Controls.Add(Freestyle_onOffSwitch_Cure); + Freestyle_groupBox_Cure.Controls.Add(Freestyle_label_Tube); + Freestyle_groupBox_Cure.Controls.Add(Freestyle_onOffSwitch_Tube); + Freestyle_groupBox_Cure.Location = new Point(411, 214); + Freestyle_groupBox_Cure.Name = "Freestyle_groupBox_Cure"; + Freestyle_groupBox_Cure.Size = new Size(189, 148); + Freestyle_groupBox_Cure.TabIndex = 18; + Freestyle_groupBox_Cure.TabStop = false; + Freestyle_groupBox_Cure.Text = "$CURE"; + Freestyle_ButtonBox_CureLevel.BackColor = SystemColors.Control; + Freestyle_ButtonBox_CureLevel.Location = new Point(68, 17); + Freestyle_ButtonBox_CureLevel.Name = "Freestyle_ButtonBox_CureLevel"; + Freestyle_ButtonBox_CureLevel.Size = new Size(106, 70); + Freestyle_ButtonBox_CureLevel.TabIndex = 18; + Freestyle_ButtonBox_CureLevel.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Freestyle_ButtonBox_CureLevel_ItemSelectedNotify); + Freestyle_onOffSwitch_Cure.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Cure.Location = new Point(13, 23); + Freestyle_onOffSwitch_Cure.Name = "Freestyle_onOffSwitch_Cure"; + Freestyle_onOffSwitch_Cure.Size = new Size(49, 20); + Freestyle_onOffSwitch_Cure.SwitchedOn = false; + Freestyle_onOffSwitch_Cure.TabIndex = 17; + Freestyle_onOffSwitch_Cure.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Cure_SwitchChangeNotify); + Freestyle_label_Tube.AutoSize = true; + Freestyle_label_Tube.Location = new Point(11, 113); + Freestyle_label_Tube.Name = "Freestyle_label_Tube"; + Freestyle_label_Tube.Size = new Size(35, 12); + Freestyle_label_Tube.TabIndex = 14; + Freestyle_label_Tube.Text = "$TUBE"; + Freestyle_onOffSwitch_Tube.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Tube.Location = new Point(121, 105); + Freestyle_onOffSwitch_Tube.Name = "Freestyle_onOffSwitch_Tube"; + Freestyle_onOffSwitch_Tube.Size = new Size(53, 26); + Freestyle_onOffSwitch_Tube.SwitchedOn = false; + Freestyle_onOffSwitch_Tube.TabIndex = 15; + Freestyle_onOffSwitch_Tube.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Tube_SwitchChangeNotify); + Freestyle_groupBox_Clarity.Controls.Add(Freestyle_ButtonBox_ClarityMode); + Freestyle_groupBox_Clarity.Controls.Add(Freestyle_hSlider_Clarity); + Freestyle_groupBox_Clarity.Controls.Add(Freestyle_label_Clarity); + Freestyle_groupBox_Clarity.Controls.Add(Freestyle_onOffSwitch_Clarity); + Freestyle_groupBox_Clarity.Location = new Point(216, 214); + Freestyle_groupBox_Clarity.Name = "Freestyle_groupBox_Clarity"; + Freestyle_groupBox_Clarity.Size = new Size(189, 148); + Freestyle_groupBox_Clarity.TabIndex = 17; + Freestyle_groupBox_Clarity.TabStop = false; + Freestyle_groupBox_Clarity.Text = "$CLARITY"; + Freestyle_ButtonBox_ClarityMode.BackColor = SystemColors.Control; + Freestyle_ButtonBox_ClarityMode.Location = new Point(68, 17); + Freestyle_ButtonBox_ClarityMode.Name = "Freestyle_ButtonBox_ClarityMode"; + Freestyle_ButtonBox_ClarityMode.Size = new Size(106, 70); + Freestyle_ButtonBox_ClarityMode.TabIndex = 18; + Freestyle_ButtonBox_ClarityMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Freestyle_ButtonBox_ClarityMode_ItemSelectedNotify); + Freestyle_hSlider_Clarity.BackColor = SystemColors.Control; + Freestyle_hSlider_Clarity.Location = new Point(13, 115); + Freestyle_hSlider_Clarity.MoveDelta = 1U; + Freestyle_hSlider_Clarity.Name = "Freestyle_hSlider_Clarity"; + Freestyle_hSlider_Clarity.Position = 0U; + Freestyle_hSlider_Clarity.PositionFloat = 0.0f; + Freestyle_hSlider_Clarity.Size = new Size(161, 24); + Freestyle_hSlider_Clarity.TabIndex = 21; + Freestyle_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_Clarity_PositionChangeNotify); + Freestyle_label_Clarity.AutoSize = true; + Freestyle_label_Clarity.Location = new Point(23, 100); + Freestyle_label_Clarity.Name = "Freestyle_label_Clarity"; + Freestyle_label_Clarity.Size = new Size(89, 12); + Freestyle_label_Clarity.TabIndex = 20; + Freestyle_label_Clarity.Text = "$CLARITY : 0dB"; + Freestyle_onOffSwitch_Clarity.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Clarity.Location = new Point(13, 23); + Freestyle_onOffSwitch_Clarity.Name = "Freestyle_onOffSwitch_Clarity"; + Freestyle_onOffSwitch_Clarity.Size = new Size(49, 20); + Freestyle_onOffSwitch_Clarity.SwitchedOn = false; + Freestyle_onOffSwitch_Clarity.TabIndex = 17; + Freestyle_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Clarity_SwitchChangeNotify); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_ButtonBox_BassMode); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_hSlider_BassGain); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_label_Bass_Gain); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_hSlider_BassSpkSize); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_label_Bass_SpkSize); + Freestyle_groupBox_Bass.Controls.Add(Freestyle_onOffSwitch_Bass); + Freestyle_groupBox_Bass.Location = new Point(21, 214); + Freestyle_groupBox_Bass.Name = "Freestyle_groupBox_Bass"; + Freestyle_groupBox_Bass.Size = new Size(189, 223); + Freestyle_groupBox_Bass.TabIndex = 16; + Freestyle_groupBox_Bass.TabStop = false; + Freestyle_groupBox_Bass.Text = "$BASS"; + Freestyle_ButtonBox_BassMode.BackColor = SystemColors.Control; + Freestyle_ButtonBox_BassMode.Location = new Point(21, 150); + Freestyle_ButtonBox_BassMode.Name = "Freestyle_ButtonBox_BassMode"; + Freestyle_ButtonBox_BassMode.Size = new Size(143, 61); + Freestyle_ButtonBox_BassMode.TabIndex = 22; + Freestyle_ButtonBox_BassMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Freestyle_ButtonBox_BassMode_ItemSelectedNotify); + Freestyle_hSlider_BassGain.BackColor = SystemColors.Control; + Freestyle_hSlider_BassGain.Location = new Point(13, 115); + Freestyle_hSlider_BassGain.MoveDelta = 1U; + Freestyle_hSlider_BassGain.Name = "Freestyle_hSlider_BassGain"; + Freestyle_hSlider_BassGain.Position = 0U; + Freestyle_hSlider_BassGain.PositionFloat = 0.0f; + Freestyle_hSlider_BassGain.Size = new Size(161, 24); + Freestyle_hSlider_BassGain.TabIndex = 21; + Freestyle_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_BassGain_PositionChangeNotify); + Freestyle_label_Bass_Gain.AutoSize = true; + Freestyle_label_Bass_Gain.Location = new Point(23, 100); + Freestyle_label_Bass_Gain.Name = "Freestyle_label_Bass_Gain"; + Freestyle_label_Bass_Gain.Size = new Size(101, 12); + Freestyle_label_Bass_Gain.TabIndex = 20; + Freestyle_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; + Freestyle_hSlider_BassSpkSize.BackColor = SystemColors.Control; + Freestyle_hSlider_BassSpkSize.Location = new Point(13, 73); + Freestyle_hSlider_BassSpkSize.MoveDelta = 1U; + Freestyle_hSlider_BassSpkSize.Name = "Freestyle_hSlider_BassSpkSize"; + Freestyle_hSlider_BassSpkSize.Position = 0U; + Freestyle_hSlider_BassSpkSize.PositionFloat = 0.0f; + Freestyle_hSlider_BassSpkSize.Size = new Size(161, 24); + Freestyle_hSlider_BassSpkSize.TabIndex = 19; + Freestyle_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_BassSpkSize_PositionChangeNotify); + Freestyle_label_Bass_SpkSize.AutoSize = true; + Freestyle_label_Bass_SpkSize.Location = new Point(23, 58); + Freestyle_label_Bass_SpkSize.Name = "Freestyle_label_Bass_SpkSize"; + Freestyle_label_Bass_SpkSize.Size = new Size(83, 12); + Freestyle_label_Bass_SpkSize.TabIndex = 18; + Freestyle_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; + Freestyle_onOffSwitch_Bass.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Bass.Location = new Point(13, 23); + Freestyle_onOffSwitch_Bass.Name = "Freestyle_onOffSwitch_Bass"; + Freestyle_onOffSwitch_Bass.Size = new Size(49, 20); + Freestyle_onOffSwitch_Bass.SwitchedOn = false; + Freestyle_onOffSwitch_Bass.TabIndex = 17; + Freestyle_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Bass_SwitchChangeNotify); + Freestyle_groupBox_VHESurround.Controls.Add(Freestyle_ButtonBox_SurroundVHERoomSize); + Freestyle_groupBox_VHESurround.Controls.Add(Freestyle_onOffSwitch_SurroundVHE); + Freestyle_groupBox_VHESurround.Location = new Point(606, 6); + Freestyle_groupBox_VHESurround.Name = "Freestyle_groupBox_VHESurround"; + Freestyle_groupBox_VHESurround.Size = new Size(208, 138); + Freestyle_groupBox_VHESurround.TabIndex = 13; + Freestyle_groupBox_VHESurround.TabStop = false; + Freestyle_groupBox_VHESurround.Text = "$VHE_SURROUND"; + Freestyle_ButtonBox_SurroundVHERoomSize.BackColor = SystemColors.Control; + Freestyle_ButtonBox_SurroundVHERoomSize.Location = new Point(68, 23); + Freestyle_ButtonBox_SurroundVHERoomSize.Name = "Freestyle_ButtonBox_SurroundVHERoomSize"; + Freestyle_ButtonBox_SurroundVHERoomSize.Size = new Size(sbyte.MaxValue, 101); + Freestyle_ButtonBox_SurroundVHERoomSize.TabIndex = 7; + Freestyle_ButtonBox_SurroundVHERoomSize.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Freestyle_ButtonBox_SurroundVHERoomSize_ItemSelectedNotify); + Freestyle_onOffSwitch_SurroundVHE.BackColor = Color.Transparent; + Freestyle_onOffSwitch_SurroundVHE.Location = new Point(13, 23); + Freestyle_onOffSwitch_SurroundVHE.Name = "Freestyle_onOffSwitch_SurroundVHE"; + Freestyle_onOffSwitch_SurroundVHE.Size = new Size(49, 20); + Freestyle_onOffSwitch_SurroundVHE.SwitchedOn = false; + Freestyle_onOffSwitch_SurroundVHE.TabIndex = 6; + Freestyle_onOffSwitch_SurroundVHE.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_SurroundVHE_SwitchChangeNotify); + Freestyle_groupBox_Convolver.Controls.Add(Freestyle_irShape_ConvIR); + Freestyle_groupBox_Convolver.Controls.Add(Freestyle_onOffSwitch_Convolver); + Freestyle_groupBox_Convolver.Controls.Add(Freestyle_hSlider_ConvIRGain); + Freestyle_groupBox_Convolver.Controls.Add(Freestyle_openFileBox_ConvIRS); + Freestyle_groupBox_Convolver.Controls.Add(Freestyle_label_ConvolverIRGain); + Freestyle_groupBox_Convolver.Location = new Point(235, 6); + Freestyle_groupBox_Convolver.Name = "Freestyle_groupBox_Convolver"; + Freestyle_groupBox_Convolver.Size = new Size(235, 179); + Freestyle_groupBox_Convolver.TabIndex = 12; + Freestyle_groupBox_Convolver.TabStop = false; + Freestyle_groupBox_Convolver.Text = "$CONVOLVER"; + Freestyle_irShape_ConvIR.Location = new Point(13, 61); + Freestyle_irShape_ConvIR.Name = "Freestyle_irShape_ConvIR"; + Freestyle_irShape_ConvIR.ShapeBackColor = Color.White; + Freestyle_irShape_ConvIR.ShapeForeColor = Color.Black; + Freestyle_irShape_ConvIR.Size = new Size(209, 63); + Freestyle_irShape_ConvIR.TabIndex = 8; + Freestyle_onOffSwitch_Convolver.BackColor = Color.Transparent; + Freestyle_onOffSwitch_Convolver.Location = new Point(13, 23); + Freestyle_onOffSwitch_Convolver.Name = "Freestyle_onOffSwitch_Convolver"; + Freestyle_onOffSwitch_Convolver.Size = new Size(49, 20); + Freestyle_onOffSwitch_Convolver.SwitchedOn = false; + Freestyle_onOffSwitch_Convolver.TabIndex = 5; + Freestyle_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Freestyle_onOffSwitch_Convolver_SwitchChangeNotify); + Freestyle_hSlider_ConvIRGain.BackColor = SystemColors.Control; + Freestyle_hSlider_ConvIRGain.Location = new Point(85, 31); + Freestyle_hSlider_ConvIRGain.MoveDelta = 1U; + Freestyle_hSlider_ConvIRGain.Name = "Freestyle_hSlider_ConvIRGain"; + Freestyle_hSlider_ConvIRGain.Position = 0U; + Freestyle_hSlider_ConvIRGain.PositionFloat = 0.0f; + Freestyle_hSlider_ConvIRGain.Size = new Size(137, 24); + Freestyle_hSlider_ConvIRGain.TabIndex = 7; + Freestyle_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_ConvIRGain_PositionChangeNotify); + Freestyle_openFileBox_ConvIRS.BackColor = SystemColors.Control; + Freestyle_openFileBox_ConvIRS.FilePathName = ""; + Freestyle_openFileBox_ConvIRS.Location = new Point(13, 136); + Freestyle_openFileBox_ConvIRS.Name = "Freestyle_openFileBox_ConvIRS"; + Freestyle_openFileBox_ConvIRS.Size = new Size(209, 29); + Freestyle_openFileBox_ConvIRS.TabIndex = 9; + Freestyle_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(Freestyle_openFileBox_ConvIRS_FileChangeNotify); + Freestyle_label_ConvolverIRGain.AutoSize = true; + Freestyle_label_ConvolverIRGain.Location = new Point(95, 16); + Freestyle_label_ConvolverIRGain.Name = "Freestyle_label_ConvolverIRGain"; + Freestyle_label_ConvolverIRGain.Size = new Size(119, 12); + Freestyle_label_ConvolverIRGain.TabIndex = 6; + Freestyle_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; + Freestyle_hSlider_PostVolume.BackColor = SystemColors.Control; + Freestyle_hSlider_PostVolume.Location = new Point(21, 118); + Freestyle_hSlider_PostVolume.MoveDelta = 1U; + Freestyle_hSlider_PostVolume.Name = "Freestyle_hSlider_PostVolume"; + Freestyle_hSlider_PostVolume.Position = 0U; + Freestyle_hSlider_PostVolume.PositionFloat = 0.0f; + Freestyle_hSlider_PostVolume.Size = new Size(208, 39); + Freestyle_hSlider_PostVolume.TabIndex = 3; + Freestyle_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_PostVolume_PositionChangeNotify); + Freestyle_label_PostVolume.AutoSize = true; + Freestyle_label_PostVolume.Location = new Point(40, 100); + Freestyle_label_PostVolume.Name = "Freestyle_label_PostVolume"; + Freestyle_label_PostVolume.Size = new Size(113, 12); + Freestyle_label_PostVolume.TabIndex = 2; + Freestyle_label_PostVolume.Text = "$POST_VOLUME : 0dB"; + Freestyle_hSlider_PreVolume.BackColor = SystemColors.Control; + Freestyle_hSlider_PreVolume.Location = new Point(21, 39); + Freestyle_hSlider_PreVolume.MoveDelta = 1U; + Freestyle_hSlider_PreVolume.Name = "Freestyle_hSlider_PreVolume"; + Freestyle_hSlider_PreVolume.Position = 0U; + Freestyle_hSlider_PreVolume.PositionFloat = 0.0f; + Freestyle_hSlider_PreVolume.Size = new Size(208, 39); + Freestyle_hSlider_PreVolume.TabIndex = 1; + Freestyle_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Freestyle_hSlider_PreVolume_PositionChangeNotify); + Freestyle_label_PreVolume.AutoSize = true; + Freestyle_label_PreVolume.Location = new Point(40, 21); + Freestyle_label_PreVolume.Name = "Freestyle_label_PreVolume"; + Freestyle_label_PreVolume.Size = new Size(107, 12); + Freestyle_label_PreVolume.TabIndex = 0; + Freestyle_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; + panel_MusicMode.Controls.Add(panel_MovieMode); + panel_MusicMode.Controls.Add(Music_SingleButton_Compressor); + panel_MusicMode.Controls.Add(Music_SingleButton_Equalizer); + panel_MusicMode.Controls.Add(Music_groupBox_Reverb); + panel_MusicMode.Controls.Add(Music_groupBox_Cure); + panel_MusicMode.Controls.Add(Music_groupBox_Clarity); + panel_MusicMode.Controls.Add(Music_groupBox_Bass); + panel_MusicMode.Controls.Add(Music_groupBox_Surround); + panel_MusicMode.Controls.Add(Music_groupBox_Convolver); + panel_MusicMode.Controls.Add(Music_hSlider_PostVolume); + panel_MusicMode.Controls.Add(Music_label_PostVolume); + panel_MusicMode.Controls.Add(Music_hSlider_PreVolume); + panel_MusicMode.Controls.Add(Music_label_PreVolume); + panel_MusicMode.Dock = DockStyle.Fill; + panel_MusicMode.Location = new Point(3, 17); + panel_MusicMode.Name = "panel_MusicMode"; + panel_MusicMode.Size = new Size(835, 552); + panel_MusicMode.TabIndex = 0; + panel_MovieMode.Controls.Add(Movie_groupBox_SmartVolume); + panel_MovieMode.Controls.Add(Movie_SingleButton_Compressor); + panel_MovieMode.Controls.Add(Movie_SingleButton_Equalizer); + panel_MovieMode.Controls.Add(Movie_groupBox_Reverb); + panel_MovieMode.Controls.Add(Movie_groupBox_Clarity); + panel_MovieMode.Controls.Add(Movie_groupBox_Bass); + panel_MovieMode.Controls.Add(Movie_groupBox_Surround); + panel_MovieMode.Controls.Add(Movie_groupBox_Convolver); + panel_MovieMode.Controls.Add(Movie_hSlider_PostVolume); + panel_MovieMode.Controls.Add(Movie_label_PostVolume); + panel_MovieMode.Controls.Add(Movie_hSlider_PreVolume); + panel_MovieMode.Controls.Add(Movie_label_PreVolume); + panel_MovieMode.Dock = DockStyle.Fill; + panel_MovieMode.Location = new Point(0, 0); + panel_MovieMode.Name = "panel_MovieMode"; + panel_MovieMode.Size = new Size(835, 552); + panel_MovieMode.TabIndex = 9; + Movie_groupBox_SmartVolume.Controls.Add(Movie_hSlider_SmartVolumeLevel); + Movie_groupBox_SmartVolume.Controls.Add(Movie_label_SmartVolume_Level); + Movie_groupBox_SmartVolume.Controls.Add(Movie_hSlider_SmartVolumeMaxLevel); + Movie_groupBox_SmartVolume.Controls.Add(Movie_label_SmartVolume_MaxLevel); + Movie_groupBox_SmartVolume.Controls.Add(Movie_hSlider_SmartVolumeRatio); + Movie_groupBox_SmartVolume.Controls.Add(Movie_label_SmartVolume_ControlStrength); + Movie_groupBox_SmartVolume.Controls.Add(Movie_onOffSwitch_SmartVolume); + Movie_groupBox_SmartVolume.Location = new Point(21, 391); + Movie_groupBox_SmartVolume.Name = "Movie_groupBox_SmartVolume"; + Movie_groupBox_SmartVolume.Size = new Size(579, 148); + Movie_groupBox_SmartVolume.TabIndex = 22; + Movie_groupBox_SmartVolume.TabStop = false; + Movie_groupBox_SmartVolume.Text = "$SMART_VOLUME"; + Movie_hSlider_SmartVolumeLevel.BackColor = SystemColors.Control; + Movie_hSlider_SmartVolumeLevel.Location = new Point(254, 78); + Movie_hSlider_SmartVolumeLevel.MoveDelta = 1U; + Movie_hSlider_SmartVolumeLevel.Name = "Movie_hSlider_SmartVolumeLevel"; + Movie_hSlider_SmartVolumeLevel.Position = 0U; + Movie_hSlider_SmartVolumeLevel.PositionFloat = 0.0f; + Movie_hSlider_SmartVolumeLevel.Size = new Size(319, 39); + Movie_hSlider_SmartVolumeLevel.TabIndex = 23; + Movie_hSlider_SmartVolumeLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_SmartVolumeLevel_PositionChangeNotify); + Movie_label_SmartVolume_Level.AutoSize = true; + Movie_label_SmartVolume_Level.Location = new Point(273, 60); + Movie_label_SmartVolume_Level.Name = "Movie_label_SmartVolume_Level"; + Movie_label_SmartVolume_Level.Size = new Size(155, 12); + Movie_label_SmartVolume_Level.TabIndex = 22; + Movie_label_SmartVolume_Level.Text = "$SMART_VOLUME_LEVEL : 0dB"; + Movie_hSlider_SmartVolumeMaxLevel.BackColor = SystemColors.Control; + Movie_hSlider_SmartVolumeMaxLevel.Location = new Point(13, 115); + Movie_hSlider_SmartVolumeMaxLevel.MoveDelta = 1U; + Movie_hSlider_SmartVolumeMaxLevel.Name = "Movie_hSlider_SmartVolumeMaxLevel"; + Movie_hSlider_SmartVolumeMaxLevel.Position = 0U; + Movie_hSlider_SmartVolumeMaxLevel.PositionFloat = 0.0f; + Movie_hSlider_SmartVolumeMaxLevel.Size = new Size(161, 24); + Movie_hSlider_SmartVolumeMaxLevel.TabIndex = 21; + Movie_hSlider_SmartVolumeMaxLevel.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_SmartVolumeMaxLevel_PositionChangeNotify); + Movie_label_SmartVolume_MaxLevel.AutoSize = true; + Movie_label_SmartVolume_MaxLevel.Location = new Point(23, 100); + Movie_label_SmartVolume_MaxLevel.Name = "Movie_label_SmartVolume_MaxLevel"; + Movie_label_SmartVolume_MaxLevel.Size = new Size(167, 12); + Movie_label_SmartVolume_MaxLevel.TabIndex = 20; + Movie_label_SmartVolume_MaxLevel.Text = "$SMART_VOLUME_MAXLEVEL : 1x"; + Movie_hSlider_SmartVolumeRatio.BackColor = SystemColors.Control; + Movie_hSlider_SmartVolumeRatio.Location = new Point(13, 73); + Movie_hSlider_SmartVolumeRatio.MoveDelta = 1U; + Movie_hSlider_SmartVolumeRatio.Name = "Movie_hSlider_SmartVolumeRatio"; + Movie_hSlider_SmartVolumeRatio.Position = 0U; + Movie_hSlider_SmartVolumeRatio.PositionFloat = 0.0f; + Movie_hSlider_SmartVolumeRatio.Size = new Size(161, 24); + Movie_hSlider_SmartVolumeRatio.TabIndex = 19; + Movie_hSlider_SmartVolumeRatio.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_SmartVolumeRatio_PositionChangeNotify); + Movie_label_SmartVolume_ControlStrength.AutoSize = true; + Movie_label_SmartVolume_ControlStrength.Location = new Point(23, 58); + Movie_label_SmartVolume_ControlStrength.Name = "Movie_label_SmartVolume_ControlStrength"; + Movie_label_SmartVolume_ControlStrength.Size = new Size(185, 12); + Movie_label_SmartVolume_ControlStrength.TabIndex = 18; + Movie_label_SmartVolume_ControlStrength.Text = "$SMART_VOLUME_CONTROL_STRENGTH"; + Movie_onOffSwitch_SmartVolume.BackColor = Color.Transparent; + Movie_onOffSwitch_SmartVolume.Location = new Point(13, 23); + Movie_onOffSwitch_SmartVolume.Name = "Movie_onOffSwitch_SmartVolume"; + Movie_onOffSwitch_SmartVolume.Size = new Size(49, 20); + Movie_onOffSwitch_SmartVolume.SwitchedOn = false; + Movie_onOffSwitch_SmartVolume.TabIndex = 17; + Movie_onOffSwitch_SmartVolume.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_SmartVolume_SwitchChangeNotify); + Movie_SingleButton_Compressor.BackColor = SystemColors.Control; + Movie_SingleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; + Movie_SingleButton_Compressor.Location = new Point(420, 301); + Movie_SingleButton_Compressor.Name = "Movie_SingleButton_Compressor"; + Movie_SingleButton_Compressor.Size = new Size(174, 39); + Movie_SingleButton_Compressor.TabIndex = 21; + Movie_SingleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Movie_SingleButton_Compressor_ButtonClickNotify); + Movie_SingleButton_Equalizer.BackColor = SystemColors.Control; + Movie_SingleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; + Movie_SingleButton_Equalizer.Location = new Point(420, 245); + Movie_SingleButton_Equalizer.Name = "Movie_SingleButton_Equalizer"; + Movie_SingleButton_Equalizer.Size = new Size(174, 39); + Movie_SingleButton_Equalizer.TabIndex = 20; + Movie_SingleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Movie_SingleButton_Equalizer_ButtonClickNotify); + Movie_groupBox_Reverb.Controls.Add(Movie_SingleButton_ReverbPreset); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbMix); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_Mix); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbEarlyMix); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_EarlyMix); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbPreDelay); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_PreDelay); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbDecay); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_Decay); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbBandWidth); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_BandWidth); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbDensity); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_Density); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbDamping); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_Damping); + Movie_groupBox_Reverb.Controls.Add(Movie_hSlider_ReverbSize); + Movie_groupBox_Reverb.Controls.Add(Movie_label_Reverb_Size); + Movie_groupBox_Reverb.Controls.Add(Movie_onOffSwitch_Reverb); + Movie_groupBox_Reverb.Location = new Point(606, 150); + Movie_groupBox_Reverb.Name = "Movie_groupBox_Reverb"; + Movie_groupBox_Reverb.Size = new Size(208, 389); + Movie_groupBox_Reverb.TabIndex = 19; + Movie_groupBox_Reverb.TabStop = false; + Movie_groupBox_Reverb.Text = "$REVERB"; + Movie_SingleButton_ReverbPreset.BackColor = SystemColors.Control; + Movie_SingleButton_ReverbPreset.ButtonText = "$PRESET"; + Movie_SingleButton_ReverbPreset.Location = new Point(121, 14); + Movie_SingleButton_ReverbPreset.Name = "Movie_SingleButton_ReverbPreset"; + Movie_SingleButton_ReverbPreset.Size = new Size(81, 29); + Movie_SingleButton_ReverbPreset.TabIndex = 36; + Movie_SingleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Movie_SingleButton_ReverbPreset_ButtonClickNotify); + Movie_hSlider_ReverbMix.BackColor = SystemColors.Control; + Movie_hSlider_ReverbMix.Location = new Point(24, 356); + Movie_hSlider_ReverbMix.MoveDelta = 1U; + Movie_hSlider_ReverbMix.Name = "Movie_hSlider_ReverbMix"; + Movie_hSlider_ReverbMix.Position = 0U; + Movie_hSlider_ReverbMix.PositionFloat = 0.0f; + Movie_hSlider_ReverbMix.Size = new Size(161, 24); + Movie_hSlider_ReverbMix.TabIndex = 35; + Movie_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbMix_PositionChangeNotify); + Movie_label_Reverb_Mix.AutoSize = true; + Movie_label_Reverb_Mix.Location = new Point(34, 341); + Movie_label_Reverb_Mix.Name = "Movie_label_Reverb_Mix"; + Movie_label_Reverb_Mix.Size = new Size(71, 12); + Movie_label_Reverb_Mix.TabIndex = 34; + Movie_label_Reverb_Mix.Text = "$REVERB_MIX"; + Movie_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; + Movie_hSlider_ReverbEarlyMix.Location = new Point(24, 314); + Movie_hSlider_ReverbEarlyMix.MoveDelta = 1U; + Movie_hSlider_ReverbEarlyMix.Name = "Movie_hSlider_ReverbEarlyMix"; + Movie_hSlider_ReverbEarlyMix.Position = 0U; + Movie_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; + Movie_hSlider_ReverbEarlyMix.Size = new Size(161, 24); + Movie_hSlider_ReverbEarlyMix.TabIndex = 33; + Movie_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbEarlyMix_PositionChangeNotify); + Movie_label_Reverb_EarlyMix.AutoSize = true; + Movie_label_Reverb_EarlyMix.Location = new Point(34, 299); + Movie_label_Reverb_EarlyMix.Name = "Movie_label_Reverb_EarlyMix"; + Movie_label_Reverb_EarlyMix.Size = new Size(101, 12); + Movie_label_Reverb_EarlyMix.TabIndex = 32; + Movie_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; + Movie_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; + Movie_hSlider_ReverbPreDelay.Location = new Point(24, 272); + Movie_hSlider_ReverbPreDelay.MoveDelta = 1U; + Movie_hSlider_ReverbPreDelay.Name = "Movie_hSlider_ReverbPreDelay"; + Movie_hSlider_ReverbPreDelay.Position = 0U; + Movie_hSlider_ReverbPreDelay.PositionFloat = 0.0f; + Movie_hSlider_ReverbPreDelay.Size = new Size(161, 24); + Movie_hSlider_ReverbPreDelay.TabIndex = 31; + Movie_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbPreDelay_PositionChangeNotify); + Movie_label_Reverb_PreDelay.AutoSize = true; + Movie_label_Reverb_PreDelay.Location = new Point(34, 257); + Movie_label_Reverb_PreDelay.Name = "Movie_label_Reverb_PreDelay"; + Movie_label_Reverb_PreDelay.Size = new Size(101, 12); + Movie_label_Reverb_PreDelay.TabIndex = 30; + Movie_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; + Movie_hSlider_ReverbDecay.BackColor = SystemColors.Control; + Movie_hSlider_ReverbDecay.Location = new Point(24, 230); + Movie_hSlider_ReverbDecay.MoveDelta = 1U; + Movie_hSlider_ReverbDecay.Name = "Movie_hSlider_ReverbDecay"; + Movie_hSlider_ReverbDecay.Position = 0U; + Movie_hSlider_ReverbDecay.PositionFloat = 0.0f; + Movie_hSlider_ReverbDecay.Size = new Size(161, 24); + Movie_hSlider_ReverbDecay.TabIndex = 29; + Movie_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbDecay_PositionChangeNotify); + Movie_label_Reverb_Decay.AutoSize = true; + Movie_label_Reverb_Decay.Location = new Point(34, 215); + Movie_label_Reverb_Decay.Name = "Movie_label_Reverb_Decay"; + Movie_label_Reverb_Decay.Size = new Size(83, 12); + Movie_label_Reverb_Decay.TabIndex = 28; + Movie_label_Reverb_Decay.Text = "$REVERB_DECAY"; + Movie_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; + Movie_hSlider_ReverbBandWidth.Location = new Point(24, 188); + Movie_hSlider_ReverbBandWidth.MoveDelta = 1U; + Movie_hSlider_ReverbBandWidth.Name = "Movie_hSlider_ReverbBandWidth"; + Movie_hSlider_ReverbBandWidth.Position = 0U; + Movie_hSlider_ReverbBandWidth.PositionFloat = 0.0f; + Movie_hSlider_ReverbBandWidth.Size = new Size(161, 24); + Movie_hSlider_ReverbBandWidth.TabIndex = 27; + Movie_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbBandWidth_PositionChangeNotify); + Movie_label_Reverb_BandWidth.AutoSize = true; + Movie_label_Reverb_BandWidth.Location = new Point(34, 173); + Movie_label_Reverb_BandWidth.Name = "Movie_label_Reverb_BandWidth"; + Movie_label_Reverb_BandWidth.Size = new Size(107, 12); + Movie_label_Reverb_BandWidth.TabIndex = 26; + Movie_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; + Movie_hSlider_ReverbDensity.BackColor = SystemColors.Control; + Movie_hSlider_ReverbDensity.Location = new Point(24, 146); + Movie_hSlider_ReverbDensity.MoveDelta = 1U; + Movie_hSlider_ReverbDensity.Name = "Movie_hSlider_ReverbDensity"; + Movie_hSlider_ReverbDensity.Position = 0U; + Movie_hSlider_ReverbDensity.PositionFloat = 0.0f; + Movie_hSlider_ReverbDensity.Size = new Size(161, 24); + Movie_hSlider_ReverbDensity.TabIndex = 25; + Movie_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbDensity_PositionChangeNotify); + Movie_label_Reverb_Density.AutoSize = true; + Movie_label_Reverb_Density.Location = new Point(34, 131); + Movie_label_Reverb_Density.Name = "Movie_label_Reverb_Density"; + Movie_label_Reverb_Density.Size = new Size(95, 12); + Movie_label_Reverb_Density.TabIndex = 24; + Movie_label_Reverb_Density.Text = "$REVERB_DENSITY"; + Movie_hSlider_ReverbDamping.BackColor = SystemColors.Control; + Movie_hSlider_ReverbDamping.Location = new Point(24, 104); + Movie_hSlider_ReverbDamping.MoveDelta = 1U; + Movie_hSlider_ReverbDamping.Name = "Movie_hSlider_ReverbDamping"; + Movie_hSlider_ReverbDamping.Position = 0U; + Movie_hSlider_ReverbDamping.PositionFloat = 0.0f; + Movie_hSlider_ReverbDamping.Size = new Size(161, 24); + Movie_hSlider_ReverbDamping.TabIndex = 23; + Movie_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbDamping_PositionChangeNotify); + Movie_label_Reverb_Damping.AutoSize = true; + Movie_label_Reverb_Damping.Location = new Point(34, 89); + Movie_label_Reverb_Damping.Name = "Movie_label_Reverb_Damping"; + Movie_label_Reverb_Damping.Size = new Size(95, 12); + Movie_label_Reverb_Damping.TabIndex = 22; + Movie_label_Reverb_Damping.Text = "$REVERB_DAMPING"; + Movie_hSlider_ReverbSize.BackColor = SystemColors.Control; + Movie_hSlider_ReverbSize.Location = new Point(24, 64); + Movie_hSlider_ReverbSize.MoveDelta = 1U; + Movie_hSlider_ReverbSize.Name = "Movie_hSlider_ReverbSize"; + Movie_hSlider_ReverbSize.Position = 0U; + Movie_hSlider_ReverbSize.PositionFloat = 0.0f; + Movie_hSlider_ReverbSize.Size = new Size(161, 24); + Movie_hSlider_ReverbSize.TabIndex = 21; + Movie_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ReverbSize_PositionChangeNotify); + Movie_label_Reverb_Size.AutoSize = true; + Movie_label_Reverb_Size.Location = new Point(34, 49); + Movie_label_Reverb_Size.Name = "Movie_label_Reverb_Size"; + Movie_label_Reverb_Size.Size = new Size(77, 12); + Movie_label_Reverb_Size.TabIndex = 20; + Movie_label_Reverb_Size.Text = "$REVERB_SIZE"; + Movie_onOffSwitch_Reverb.BackColor = Color.Transparent; + Movie_onOffSwitch_Reverb.Location = new Point(13, 23); + Movie_onOffSwitch_Reverb.Name = "Movie_onOffSwitch_Reverb"; + Movie_onOffSwitch_Reverb.Size = new Size(49, 20); + Movie_onOffSwitch_Reverb.SwitchedOn = false; + Movie_onOffSwitch_Reverb.TabIndex = 7; + Movie_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_Reverb_SwitchChangeNotify); + Movie_groupBox_Clarity.Controls.Add(Movie_hSlider_Clarity); + Movie_groupBox_Clarity.Controls.Add(Movie_label_Clarity); + Movie_groupBox_Clarity.Controls.Add(Movie_onOffSwitch_Clarity); + Movie_groupBox_Clarity.Location = new Point(216, 213); + Movie_groupBox_Clarity.Name = "Movie_groupBox_Clarity"; + Movie_groupBox_Clarity.Size = new Size(189, 148); + Movie_groupBox_Clarity.TabIndex = 17; + Movie_groupBox_Clarity.TabStop = false; + Movie_groupBox_Clarity.Text = "$CLARITY"; + Movie_hSlider_Clarity.BackColor = SystemColors.Control; + Movie_hSlider_Clarity.Location = new Point(13, 93); + Movie_hSlider_Clarity.MoveDelta = 1U; + Movie_hSlider_Clarity.Name = "Movie_hSlider_Clarity"; + Movie_hSlider_Clarity.Position = 0U; + Movie_hSlider_Clarity.PositionFloat = 0.0f; + Movie_hSlider_Clarity.Size = new Size(161, 24); + Movie_hSlider_Clarity.TabIndex = 21; + Movie_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_Clarity_PositionChangeNotify); + Movie_label_Clarity.AutoSize = true; + Movie_label_Clarity.Location = new Point(23, 78); + Movie_label_Clarity.Name = "Movie_label_Clarity"; + Movie_label_Clarity.Size = new Size(89, 12); + Movie_label_Clarity.TabIndex = 20; + Movie_label_Clarity.Text = "$CLARITY : 0dB"; + Movie_onOffSwitch_Clarity.BackColor = Color.Transparent; + Movie_onOffSwitch_Clarity.Location = new Point(13, 23); + Movie_onOffSwitch_Clarity.Name = "Movie_onOffSwitch_Clarity"; + Movie_onOffSwitch_Clarity.Size = new Size(49, 20); + Movie_onOffSwitch_Clarity.SwitchedOn = false; + Movie_onOffSwitch_Clarity.TabIndex = 17; + Movie_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_Clarity_SwitchChangeNotify); + Movie_groupBox_Bass.Controls.Add(Movie_hSlider_BassGain); + Movie_groupBox_Bass.Controls.Add(Movie_label_Bass_Gain); + Movie_groupBox_Bass.Controls.Add(Movie_hSlider_BassSpkSize); + Movie_groupBox_Bass.Controls.Add(Movie_label_Bass_SpkSize); + Movie_groupBox_Bass.Controls.Add(Movie_onOffSwitch_Bass); + Movie_groupBox_Bass.Location = new Point(21, 213); + Movie_groupBox_Bass.Name = "Movie_groupBox_Bass"; + Movie_groupBox_Bass.Size = new Size(189, 148); + Movie_groupBox_Bass.TabIndex = 16; + Movie_groupBox_Bass.TabStop = false; + Movie_groupBox_Bass.Text = "$BASS"; + Movie_hSlider_BassGain.BackColor = SystemColors.Control; + Movie_hSlider_BassGain.Location = new Point(13, 115); + Movie_hSlider_BassGain.MoveDelta = 1U; + Movie_hSlider_BassGain.Name = "Movie_hSlider_BassGain"; + Movie_hSlider_BassGain.Position = 0U; + Movie_hSlider_BassGain.PositionFloat = 0.0f; + Movie_hSlider_BassGain.Size = new Size(161, 24); + Movie_hSlider_BassGain.TabIndex = 21; + Movie_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_BassGain_PositionChangeNotify); + Movie_label_Bass_Gain.AutoSize = true; + Movie_label_Bass_Gain.Location = new Point(23, 100); + Movie_label_Bass_Gain.Name = "Movie_label_Bass_Gain"; + Movie_label_Bass_Gain.Size = new Size(101, 12); + Movie_label_Bass_Gain.TabIndex = 20; + Movie_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; + Movie_hSlider_BassSpkSize.BackColor = SystemColors.Control; + Movie_hSlider_BassSpkSize.Location = new Point(13, 73); + Movie_hSlider_BassSpkSize.MoveDelta = 1U; + Movie_hSlider_BassSpkSize.Name = "Movie_hSlider_BassSpkSize"; + Movie_hSlider_BassSpkSize.Position = 0U; + Movie_hSlider_BassSpkSize.PositionFloat = 0.0f; + Movie_hSlider_BassSpkSize.Size = new Size(161, 24); + Movie_hSlider_BassSpkSize.TabIndex = 19; + Movie_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_BassSpkSize_PositionChangeNotify); + Movie_label_Bass_SpkSize.AutoSize = true; + Movie_label_Bass_SpkSize.Location = new Point(23, 58); + Movie_label_Bass_SpkSize.Name = "Movie_label_Bass_SpkSize"; + Movie_label_Bass_SpkSize.Size = new Size(83, 12); + Movie_label_Bass_SpkSize.TabIndex = 18; + Movie_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; + Movie_onOffSwitch_Bass.BackColor = Color.Transparent; + Movie_onOffSwitch_Bass.Location = new Point(13, 23); + Movie_onOffSwitch_Bass.Name = "Movie_onOffSwitch_Bass"; + Movie_onOffSwitch_Bass.Size = new Size(49, 20); + Movie_onOffSwitch_Bass.SwitchedOn = false; + Movie_onOffSwitch_Bass.TabIndex = 17; + Movie_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_Bass_SwitchChangeNotify); + Movie_groupBox_Surround.Controls.Add(Movie_hSlider_SurroundImage); + Movie_groupBox_Surround.Controls.Add(Movie_label_Surround_Image); + Movie_groupBox_Surround.Controls.Add(Movie_hSlider_Surround3D); + Movie_groupBox_Surround.Controls.Add(Movie_label_Surround_3D); + Movie_groupBox_Surround.Controls.Add(Movie_onOffSwitch_Surround); + Movie_groupBox_Surround.Location = new Point(606, 6); + Movie_groupBox_Surround.Name = "Movie_groupBox_Surround"; + Movie_groupBox_Surround.Size = new Size(208, 138); + Movie_groupBox_Surround.TabIndex = 13; + Movie_groupBox_Surround.TabStop = false; + Movie_groupBox_Surround.Text = "$SURROUND"; + Movie_hSlider_SurroundImage.BackColor = SystemColors.Control; + Movie_hSlider_SurroundImage.Location = new Point(24, 109); + Movie_hSlider_SurroundImage.MoveDelta = 1U; + Movie_hSlider_SurroundImage.Name = "Movie_hSlider_SurroundImage"; + Movie_hSlider_SurroundImage.Position = 0U; + Movie_hSlider_SurroundImage.PositionFloat = 0.0f; + Movie_hSlider_SurroundImage.Size = new Size(161, 24); + Movie_hSlider_SurroundImage.TabIndex = 25; + Movie_hSlider_SurroundImage.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_SurroundImage_PositionChangeNotify); + Movie_label_Surround_Image.AutoSize = true; + Movie_label_Surround_Image.Location = new Point(34, 94); + Movie_label_Surround_Image.Name = "Movie_label_Surround_Image"; + Movie_label_Surround_Image.Size = new Size(95, 12); + Movie_label_Surround_Image.TabIndex = 24; + Movie_label_Surround_Image.Text = "$SURROUND_IMAGE"; + Movie_hSlider_Surround3D.BackColor = SystemColors.Control; + Movie_hSlider_Surround3D.Location = new Point(24, 67); + Movie_hSlider_Surround3D.MoveDelta = 1U; + Movie_hSlider_Surround3D.Name = "Movie_hSlider_Surround3D"; + Movie_hSlider_Surround3D.Position = 0U; + Movie_hSlider_Surround3D.PositionFloat = 0.0f; + Movie_hSlider_Surround3D.Size = new Size(161, 24); + Movie_hSlider_Surround3D.TabIndex = 23; + Movie_hSlider_Surround3D.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_Surround3D_PositionChangeNotify); + Movie_label_Surround_3D.AutoSize = true; + Movie_label_Surround_3D.Location = new Point(34, 52); + Movie_label_Surround_3D.Name = "Movie_label_Surround_3D"; + Movie_label_Surround_3D.Size = new Size(77, 12); + Movie_label_Surround_3D.TabIndex = 22; + Movie_label_Surround_3D.Text = "$SURROUND_3D"; + Movie_onOffSwitch_Surround.BackColor = Color.Transparent; + Movie_onOffSwitch_Surround.Location = new Point(13, 23); + Movie_onOffSwitch_Surround.Name = "Movie_onOffSwitch_Surround"; + Movie_onOffSwitch_Surround.Size = new Size(49, 20); + Movie_onOffSwitch_Surround.SwitchedOn = false; + Movie_onOffSwitch_Surround.TabIndex = 6; + Movie_onOffSwitch_Surround.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_Surround_SwitchChangeNotify); + Movie_groupBox_Convolver.Controls.Add(Movie_irShape_ConvIR); + Movie_groupBox_Convolver.Controls.Add(Movie_onOffSwitch_Convolver); + Movie_groupBox_Convolver.Controls.Add(Movie_hSlider_ConvIRGain); + Movie_groupBox_Convolver.Controls.Add(Movie_openFileBox_ConvIRS); + Movie_groupBox_Convolver.Controls.Add(Movie_label_ConvolverIRGain); + Movie_groupBox_Convolver.Location = new Point(312, 6); + Movie_groupBox_Convolver.Name = "Movie_groupBox_Convolver"; + Movie_groupBox_Convolver.Size = new Size(288, 179); + Movie_groupBox_Convolver.TabIndex = 12; + Movie_groupBox_Convolver.TabStop = false; + Movie_groupBox_Convolver.Text = "$CONVOLVER"; + Movie_irShape_ConvIR.Location = new Point(13, 61); + Movie_irShape_ConvIR.Name = "Movie_irShape_ConvIR"; + Movie_irShape_ConvIR.ShapeBackColor = Color.White; + Movie_irShape_ConvIR.ShapeForeColor = Color.Black; + Movie_irShape_ConvIR.Size = new Size(260, 63); + Movie_irShape_ConvIR.TabIndex = 8; + Movie_onOffSwitch_Convolver.BackColor = Color.Transparent; + Movie_onOffSwitch_Convolver.Location = new Point(13, 23); + Movie_onOffSwitch_Convolver.Name = "Movie_onOffSwitch_Convolver"; + Movie_onOffSwitch_Convolver.Size = new Size(49, 20); + Movie_onOffSwitch_Convolver.SwitchedOn = false; + Movie_onOffSwitch_Convolver.TabIndex = 5; + Movie_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Movie_onOffSwitch_Convolver_SwitchChangeNotify); + Movie_hSlider_ConvIRGain.BackColor = SystemColors.Control; + Movie_hSlider_ConvIRGain.Location = new Point(85, 31); + Movie_hSlider_ConvIRGain.MoveDelta = 1U; + Movie_hSlider_ConvIRGain.Name = "Movie_hSlider_ConvIRGain"; + Movie_hSlider_ConvIRGain.Position = 0U; + Movie_hSlider_ConvIRGain.PositionFloat = 0.0f; + Movie_hSlider_ConvIRGain.Size = new Size(188, 24); + Movie_hSlider_ConvIRGain.TabIndex = 7; + Movie_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_ConvIRGain_PositionChangeNotify); + Movie_openFileBox_ConvIRS.BackColor = SystemColors.Control; + Movie_openFileBox_ConvIRS.FilePathName = ""; + Movie_openFileBox_ConvIRS.Location = new Point(13, 136); + Movie_openFileBox_ConvIRS.Name = "Movie_openFileBox_ConvIRS"; + Movie_openFileBox_ConvIRS.Size = new Size(260, 29); + Movie_openFileBox_ConvIRS.TabIndex = 9; + Movie_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(Movie_openFileBox_ConvIRS_FileChangeNotify); + Movie_label_ConvolverIRGain.AutoSize = true; + Movie_label_ConvolverIRGain.Location = new Point(95, 16); + Movie_label_ConvolverIRGain.Name = "Movie_label_ConvolverIRGain"; + Movie_label_ConvolverIRGain.Size = new Size(119, 12); + Movie_label_ConvolverIRGain.TabIndex = 6; + Movie_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; + Movie_hSlider_PostVolume.BackColor = SystemColors.Control; + Movie_hSlider_PostVolume.Location = new Point(21, 118); + Movie_hSlider_PostVolume.MoveDelta = 1U; + Movie_hSlider_PostVolume.Name = "Movie_hSlider_PostVolume"; + Movie_hSlider_PostVolume.Position = 0U; + Movie_hSlider_PostVolume.PositionFloat = 0.0f; + Movie_hSlider_PostVolume.Size = new Size(285, 39); + Movie_hSlider_PostVolume.TabIndex = 3; + Movie_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_PostVolume_PositionChangeNotify); + Movie_label_PostVolume.AutoSize = true; + Movie_label_PostVolume.Location = new Point(40, 100); + Movie_label_PostVolume.Name = "Movie_label_PostVolume"; + Movie_label_PostVolume.Size = new Size(113, 12); + Movie_label_PostVolume.TabIndex = 2; + Movie_label_PostVolume.Text = "$POST_VOLUME : 0dB"; + Movie_hSlider_PreVolume.BackColor = SystemColors.Control; + Movie_hSlider_PreVolume.Location = new Point(21, 39); + Movie_hSlider_PreVolume.MoveDelta = 1U; + Movie_hSlider_PreVolume.Name = "Movie_hSlider_PreVolume"; + Movie_hSlider_PreVolume.Position = 0U; + Movie_hSlider_PreVolume.PositionFloat = 0.0f; + Movie_hSlider_PreVolume.Size = new Size(285, 39); + Movie_hSlider_PreVolume.TabIndex = 1; + Movie_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Movie_hSlider_PreVolume_PositionChangeNotify); + Movie_label_PreVolume.AutoSize = true; + Movie_label_PreVolume.Location = new Point(40, 21); + Movie_label_PreVolume.Name = "Movie_label_PreVolume"; + Movie_label_PreVolume.Size = new Size(107, 12); + Movie_label_PreVolume.TabIndex = 0; + Movie_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; + Music_SingleButton_Compressor.BackColor = SystemColors.Control; + Music_SingleButton_Compressor.ButtonText = "$COMPRESSOR_ADJUST"; + Music_SingleButton_Compressor.Location = new Point(216, 460); + Music_SingleButton_Compressor.Name = "Music_SingleButton_Compressor"; + Music_SingleButton_Compressor.Size = new Size(174, 39); + Music_SingleButton_Compressor.TabIndex = 21; + Music_SingleButton_Compressor.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Music_SingleButton_Compressor_ButtonClickNotify); + Music_SingleButton_Equalizer.BackColor = SystemColors.Control; + Music_SingleButton_Equalizer.ButtonText = "$EQUALIZER_ADJUST"; + Music_SingleButton_Equalizer.Location = new Point(216, 404); + Music_SingleButton_Equalizer.Name = "Music_SingleButton_Equalizer"; + Music_SingleButton_Equalizer.Size = new Size(174, 39); + Music_SingleButton_Equalizer.TabIndex = 20; + Music_SingleButton_Equalizer.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Music_SingleButton_Equalizer_ButtonClickNotify); + Music_groupBox_Reverb.Controls.Add(Music_SingleButton_ReverbPreset); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbMix); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_Mix); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbEarlyMix); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_EarlyMix); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbPreDelay); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_PreDelay); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbDecay); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_Decay); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbBandWidth); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_BandWidth); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbDensity); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_Density); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbDamping); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_Damping); + Music_groupBox_Reverb.Controls.Add(Music_hSlider_ReverbSize); + Music_groupBox_Reverb.Controls.Add(Music_label_Reverb_Size); + Music_groupBox_Reverb.Controls.Add(Music_onOffSwitch_Reverb); + Music_groupBox_Reverb.Location = new Point(606, 150); + Music_groupBox_Reverb.Name = "Music_groupBox_Reverb"; + Music_groupBox_Reverb.Size = new Size(208, 389); + Music_groupBox_Reverb.TabIndex = 19; + Music_groupBox_Reverb.TabStop = false; + Music_groupBox_Reverb.Text = "$REVERB"; + Music_SingleButton_ReverbPreset.BackColor = SystemColors.Control; + Music_SingleButton_ReverbPreset.ButtonText = "$PRESET"; + Music_SingleButton_ReverbPreset.Location = new Point(121, 14); + Music_SingleButton_ReverbPreset.Name = "Music_SingleButton_ReverbPreset"; + Music_SingleButton_ReverbPreset.Size = new Size(81, 29); + Music_SingleButton_ReverbPreset.TabIndex = 36; + Music_SingleButton_ReverbPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(Music_SingleButton_ReverbPreset_ButtonClickNotify); + Music_hSlider_ReverbMix.BackColor = SystemColors.Control; + Music_hSlider_ReverbMix.Location = new Point(24, 356); + Music_hSlider_ReverbMix.MoveDelta = 1U; + Music_hSlider_ReverbMix.Name = "Music_hSlider_ReverbMix"; + Music_hSlider_ReverbMix.Position = 0U; + Music_hSlider_ReverbMix.PositionFloat = 0.0f; + Music_hSlider_ReverbMix.Size = new Size(161, 24); + Music_hSlider_ReverbMix.TabIndex = 35; + Music_hSlider_ReverbMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbMix_PositionChangeNotify); + Music_label_Reverb_Mix.AutoSize = true; + Music_label_Reverb_Mix.Location = new Point(34, 341); + Music_label_Reverb_Mix.Name = "Music_label_Reverb_Mix"; + Music_label_Reverb_Mix.Size = new Size(71, 12); + Music_label_Reverb_Mix.TabIndex = 34; + Music_label_Reverb_Mix.Text = "$REVERB_MIX"; + Music_hSlider_ReverbEarlyMix.BackColor = SystemColors.Control; + Music_hSlider_ReverbEarlyMix.Location = new Point(24, 314); + Music_hSlider_ReverbEarlyMix.MoveDelta = 1U; + Music_hSlider_ReverbEarlyMix.Name = "Music_hSlider_ReverbEarlyMix"; + Music_hSlider_ReverbEarlyMix.Position = 0U; + Music_hSlider_ReverbEarlyMix.PositionFloat = 0.0f; + Music_hSlider_ReverbEarlyMix.Size = new Size(161, 24); + Music_hSlider_ReverbEarlyMix.TabIndex = 33; + Music_hSlider_ReverbEarlyMix.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbEarlyMix_PositionChangeNotify); + Music_label_Reverb_EarlyMix.AutoSize = true; + Music_label_Reverb_EarlyMix.Location = new Point(34, 299); + Music_label_Reverb_EarlyMix.Name = "Music_label_Reverb_EarlyMix"; + Music_label_Reverb_EarlyMix.Size = new Size(101, 12); + Music_label_Reverb_EarlyMix.TabIndex = 32; + Music_label_Reverb_EarlyMix.Text = "$REVERB_EARLYMIX"; + Music_hSlider_ReverbPreDelay.BackColor = SystemColors.Control; + Music_hSlider_ReverbPreDelay.Location = new Point(24, 272); + Music_hSlider_ReverbPreDelay.MoveDelta = 1U; + Music_hSlider_ReverbPreDelay.Name = "Music_hSlider_ReverbPreDelay"; + Music_hSlider_ReverbPreDelay.Position = 0U; + Music_hSlider_ReverbPreDelay.PositionFloat = 0.0f; + Music_hSlider_ReverbPreDelay.Size = new Size(161, 24); + Music_hSlider_ReverbPreDelay.TabIndex = 31; + Music_hSlider_ReverbPreDelay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbPreDelay_PositionChangeNotify); + Music_label_Reverb_PreDelay.AutoSize = true; + Music_label_Reverb_PreDelay.Location = new Point(34, 257); + Music_label_Reverb_PreDelay.Name = "Music_label_Reverb_PreDelay"; + Music_label_Reverb_PreDelay.Size = new Size(101, 12); + Music_label_Reverb_PreDelay.TabIndex = 30; + Music_label_Reverb_PreDelay.Text = "$REVERB_PREDELAY"; + Music_hSlider_ReverbDecay.BackColor = SystemColors.Control; + Music_hSlider_ReverbDecay.Location = new Point(24, 230); + Music_hSlider_ReverbDecay.MoveDelta = 1U; + Music_hSlider_ReverbDecay.Name = "Music_hSlider_ReverbDecay"; + Music_hSlider_ReverbDecay.Position = 0U; + Music_hSlider_ReverbDecay.PositionFloat = 0.0f; + Music_hSlider_ReverbDecay.Size = new Size(161, 24); + Music_hSlider_ReverbDecay.TabIndex = 29; + Music_hSlider_ReverbDecay.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbDecay_PositionChangeNotify); + Music_label_Reverb_Decay.AutoSize = true; + Music_label_Reverb_Decay.Location = new Point(34, 215); + Music_label_Reverb_Decay.Name = "Music_label_Reverb_Decay"; + Music_label_Reverb_Decay.Size = new Size(83, 12); + Music_label_Reverb_Decay.TabIndex = 28; + Music_label_Reverb_Decay.Text = "$REVERB_DECAY"; + Music_hSlider_ReverbBandWidth.BackColor = SystemColors.Control; + Music_hSlider_ReverbBandWidth.Location = new Point(24, 188); + Music_hSlider_ReverbBandWidth.MoveDelta = 1U; + Music_hSlider_ReverbBandWidth.Name = "Music_hSlider_ReverbBandWidth"; + Music_hSlider_ReverbBandWidth.Position = 0U; + Music_hSlider_ReverbBandWidth.PositionFloat = 0.0f; + Music_hSlider_ReverbBandWidth.Size = new Size(161, 24); + Music_hSlider_ReverbBandWidth.TabIndex = 27; + Music_hSlider_ReverbBandWidth.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbBandWidth_PositionChangeNotify); + Music_label_Reverb_BandWidth.AutoSize = true; + Music_label_Reverb_BandWidth.Location = new Point(34, 173); + Music_label_Reverb_BandWidth.Name = "Music_label_Reverb_BandWidth"; + Music_label_Reverb_BandWidth.Size = new Size(107, 12); + Music_label_Reverb_BandWidth.TabIndex = 26; + Music_label_Reverb_BandWidth.Text = "$REVERB_BANDWIDTH"; + Music_hSlider_ReverbDensity.BackColor = SystemColors.Control; + Music_hSlider_ReverbDensity.Location = new Point(24, 146); + Music_hSlider_ReverbDensity.MoveDelta = 1U; + Music_hSlider_ReverbDensity.Name = "Music_hSlider_ReverbDensity"; + Music_hSlider_ReverbDensity.Position = 0U; + Music_hSlider_ReverbDensity.PositionFloat = 0.0f; + Music_hSlider_ReverbDensity.Size = new Size(161, 24); + Music_hSlider_ReverbDensity.TabIndex = 25; + Music_hSlider_ReverbDensity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbDensity_PositionChangeNotify); + Music_label_Reverb_Density.AutoSize = true; + Music_label_Reverb_Density.Location = new Point(34, 131); + Music_label_Reverb_Density.Name = "Music_label_Reverb_Density"; + Music_label_Reverb_Density.Size = new Size(95, 12); + Music_label_Reverb_Density.TabIndex = 24; + Music_label_Reverb_Density.Text = "$REVERB_DENSITY"; + Music_hSlider_ReverbDamping.BackColor = SystemColors.Control; + Music_hSlider_ReverbDamping.Location = new Point(24, 104); + Music_hSlider_ReverbDamping.MoveDelta = 1U; + Music_hSlider_ReverbDamping.Name = "Music_hSlider_ReverbDamping"; + Music_hSlider_ReverbDamping.Position = 0U; + Music_hSlider_ReverbDamping.PositionFloat = 0.0f; + Music_hSlider_ReverbDamping.Size = new Size(161, 24); + Music_hSlider_ReverbDamping.TabIndex = 23; + Music_hSlider_ReverbDamping.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbDamping_PositionChangeNotify); + Music_label_Reverb_Damping.AutoSize = true; + Music_label_Reverb_Damping.Location = new Point(34, 89); + Music_label_Reverb_Damping.Name = "Music_label_Reverb_Damping"; + Music_label_Reverb_Damping.Size = new Size(95, 12); + Music_label_Reverb_Damping.TabIndex = 22; + Music_label_Reverb_Damping.Text = "$REVERB_DAMPING"; + Music_hSlider_ReverbSize.BackColor = SystemColors.Control; + Music_hSlider_ReverbSize.Location = new Point(24, 64); + Music_hSlider_ReverbSize.MoveDelta = 1U; + Music_hSlider_ReverbSize.Name = "Music_hSlider_ReverbSize"; + Music_hSlider_ReverbSize.Position = 0U; + Music_hSlider_ReverbSize.PositionFloat = 0.0f; + Music_hSlider_ReverbSize.Size = new Size(161, 24); + Music_hSlider_ReverbSize.TabIndex = 21; + Music_hSlider_ReverbSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ReverbSize_PositionChangeNotify); + Music_label_Reverb_Size.AutoSize = true; + Music_label_Reverb_Size.Location = new Point(34, 49); + Music_label_Reverb_Size.Name = "Music_label_Reverb_Size"; + Music_label_Reverb_Size.Size = new Size(77, 12); + Music_label_Reverb_Size.TabIndex = 20; + Music_label_Reverb_Size.Text = "$REVERB_SIZE"; + Music_onOffSwitch_Reverb.BackColor = Color.Transparent; + Music_onOffSwitch_Reverb.Location = new Point(13, 23); + Music_onOffSwitch_Reverb.Name = "Music_onOffSwitch_Reverb"; + Music_onOffSwitch_Reverb.Size = new Size(49, 20); + Music_onOffSwitch_Reverb.SwitchedOn = false; + Music_onOffSwitch_Reverb.TabIndex = 7; + Music_onOffSwitch_Reverb.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Reverb_SwitchChangeNotify); + Music_groupBox_Cure.Controls.Add(Music_ButtonBox_CureLevel); + Music_groupBox_Cure.Controls.Add(Music_onOffSwitch_Cure); + Music_groupBox_Cure.Controls.Add(Music_label_Tube); + Music_groupBox_Cure.Controls.Add(Music_onOffSwitch_Tube); + Music_groupBox_Cure.Location = new Point(411, 206); + Music_groupBox_Cure.Name = "Music_groupBox_Cure"; + Music_groupBox_Cure.Size = new Size(189, 148); + Music_groupBox_Cure.TabIndex = 18; + Music_groupBox_Cure.TabStop = false; + Music_groupBox_Cure.Text = "$CURE"; + Music_ButtonBox_CureLevel.BackColor = SystemColors.Control; + Music_ButtonBox_CureLevel.Location = new Point(68, 17); + Music_ButtonBox_CureLevel.Name = "Music_ButtonBox_CureLevel"; + Music_ButtonBox_CureLevel.Size = new Size(106, 70); + Music_ButtonBox_CureLevel.TabIndex = 18; + Music_ButtonBox_CureLevel.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Music_ButtonBox_CureLevel_ItemSelectedNotify); + Music_onOffSwitch_Cure.BackColor = Color.Transparent; + Music_onOffSwitch_Cure.Location = new Point(13, 23); + Music_onOffSwitch_Cure.Name = "Music_onOffSwitch_Cure"; + Music_onOffSwitch_Cure.Size = new Size(49, 20); + Music_onOffSwitch_Cure.SwitchedOn = false; + Music_onOffSwitch_Cure.TabIndex = 17; + Music_onOffSwitch_Cure.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Cure_SwitchChangeNotify); + Music_label_Tube.AutoSize = true; + Music_label_Tube.Location = new Point(11, 112); + Music_label_Tube.Name = "Music_label_Tube"; + Music_label_Tube.Size = new Size(35, 12); + Music_label_Tube.TabIndex = 14; + Music_label_Tube.Text = "$TUBE"; + Music_onOffSwitch_Tube.BackColor = Color.Transparent; + Music_onOffSwitch_Tube.Location = new Point(121, 105); + Music_onOffSwitch_Tube.Name = "Music_onOffSwitch_Tube"; + Music_onOffSwitch_Tube.Size = new Size(53, 26); + Music_onOffSwitch_Tube.SwitchedOn = false; + Music_onOffSwitch_Tube.TabIndex = 15; + Music_onOffSwitch_Tube.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Tube_SwitchChangeNotify); + Music_groupBox_Clarity.Controls.Add(Music_ButtonBox_ClarityMode); + Music_groupBox_Clarity.Controls.Add(Music_hSlider_Clarity); + Music_groupBox_Clarity.Controls.Add(Music_label_Clarity); + Music_groupBox_Clarity.Controls.Add(Music_onOffSwitch_Clarity); + Music_groupBox_Clarity.Location = new Point(216, 206); + Music_groupBox_Clarity.Name = "Music_groupBox_Clarity"; + Music_groupBox_Clarity.Size = new Size(189, 148); + Music_groupBox_Clarity.TabIndex = 17; + Music_groupBox_Clarity.TabStop = false; + Music_groupBox_Clarity.Text = "$CLARITY"; + Music_ButtonBox_ClarityMode.BackColor = SystemColors.Control; + Music_ButtonBox_ClarityMode.Location = new Point(68, 17); + Music_ButtonBox_ClarityMode.Name = "Music_ButtonBox_ClarityMode"; + Music_ButtonBox_ClarityMode.Size = new Size(106, 70); + Music_ButtonBox_ClarityMode.TabIndex = 18; + Music_ButtonBox_ClarityMode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Music_ButtonBox_ClarityMode_ItemSelectedNotify); + Music_hSlider_Clarity.BackColor = SystemColors.Control; + Music_hSlider_Clarity.Location = new Point(13, 115); + Music_hSlider_Clarity.MoveDelta = 1U; + Music_hSlider_Clarity.Name = "Music_hSlider_Clarity"; + Music_hSlider_Clarity.Position = 0U; + Music_hSlider_Clarity.PositionFloat = 0.0f; + Music_hSlider_Clarity.Size = new Size(161, 24); + Music_hSlider_Clarity.TabIndex = 21; + Music_hSlider_Clarity.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_Clarity_PositionChangeNotify); + Music_label_Clarity.AutoSize = true; + Music_label_Clarity.Location = new Point(23, 100); + Music_label_Clarity.Name = "Music_label_Clarity"; + Music_label_Clarity.Size = new Size(89, 12); + Music_label_Clarity.TabIndex = 20; + Music_label_Clarity.Text = "$CLARITY : 0dB"; + Music_onOffSwitch_Clarity.BackColor = Color.Transparent; + Music_onOffSwitch_Clarity.Location = new Point(13, 23); + Music_onOffSwitch_Clarity.Name = "Music_onOffSwitch_Clarity"; + Music_onOffSwitch_Clarity.Size = new Size(49, 20); + Music_onOffSwitch_Clarity.SwitchedOn = false; + Music_onOffSwitch_Clarity.TabIndex = 17; + Music_onOffSwitch_Clarity.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Clarity_SwitchChangeNotify); + Music_groupBox_Bass.Controls.Add(Music_hSlider_BassGain); + Music_groupBox_Bass.Controls.Add(Music_label_Bass_Gain); + Music_groupBox_Bass.Controls.Add(Music_hSlider_BassSpkSize); + Music_groupBox_Bass.Controls.Add(Music_label_Bass_SpkSize); + Music_groupBox_Bass.Controls.Add(Music_onOffSwitch_Bass); + Music_groupBox_Bass.Location = new Point(21, 206); + Music_groupBox_Bass.Name = "Music_groupBox_Bass"; + Music_groupBox_Bass.Size = new Size(189, 148); + Music_groupBox_Bass.TabIndex = 16; + Music_groupBox_Bass.TabStop = false; + Music_groupBox_Bass.Text = "$BASS"; + Music_hSlider_BassGain.BackColor = SystemColors.Control; + Music_hSlider_BassGain.Location = new Point(13, 115); + Music_hSlider_BassGain.MoveDelta = 1U; + Music_hSlider_BassGain.Name = "Music_hSlider_BassGain"; + Music_hSlider_BassGain.Position = 0U; + Music_hSlider_BassGain.PositionFloat = 0.0f; + Music_hSlider_BassGain.Size = new Size(161, 24); + Music_hSlider_BassGain.TabIndex = 21; + Music_hSlider_BassGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_BassGain_PositionChangeNotify); + Music_label_Bass_Gain.AutoSize = true; + Music_label_Bass_Gain.Location = new Point(23, 100); + Music_label_Bass_Gain.Name = "Music_label_Bass_Gain"; + Music_label_Bass_Gain.Size = new Size(101, 12); + Music_label_Bass_Gain.TabIndex = 20; + Music_label_Bass_Gain.Text = "$BASS_GAIN : 0dB"; + Music_hSlider_BassSpkSize.BackColor = SystemColors.Control; + Music_hSlider_BassSpkSize.Location = new Point(13, 73); + Music_hSlider_BassSpkSize.MoveDelta = 1U; + Music_hSlider_BassSpkSize.Name = "Music_hSlider_BassSpkSize"; + Music_hSlider_BassSpkSize.Position = 0U; + Music_hSlider_BassSpkSize.PositionFloat = 0.0f; + Music_hSlider_BassSpkSize.Size = new Size(161, 24); + Music_hSlider_BassSpkSize.TabIndex = 19; + Music_hSlider_BassSpkSize.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_BassSpkSize_PositionChangeNotify); + Music_label_Bass_SpkSize.AutoSize = true; + Music_label_Bass_SpkSize.Location = new Point(23, 58); + Music_label_Bass_SpkSize.Name = "Music_label_Bass_SpkSize"; + Music_label_Bass_SpkSize.Size = new Size(83, 12); + Music_label_Bass_SpkSize.TabIndex = 18; + Music_label_Bass_SpkSize.Text = "$BASS_SPKSIZE"; + Music_onOffSwitch_Bass.BackColor = Color.Transparent; + Music_onOffSwitch_Bass.Location = new Point(13, 23); + Music_onOffSwitch_Bass.Name = "Music_onOffSwitch_Bass"; + Music_onOffSwitch_Bass.Size = new Size(49, 20); + Music_onOffSwitch_Bass.SwitchedOn = false; + Music_onOffSwitch_Bass.TabIndex = 17; + Music_onOffSwitch_Bass.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Bass_SwitchChangeNotify); + Music_groupBox_Surround.Controls.Add(Music_ButtonBox_SurroundRoomSize); + Music_groupBox_Surround.Controls.Add(Music_onOffSwitch_Surround); + Music_groupBox_Surround.Location = new Point(606, 6); + Music_groupBox_Surround.Name = "Music_groupBox_Surround"; + Music_groupBox_Surround.Size = new Size(208, 138); + Music_groupBox_Surround.TabIndex = 13; + Music_groupBox_Surround.TabStop = false; + Music_groupBox_Surround.Text = "$SURROUND"; + Music_ButtonBox_SurroundRoomSize.BackColor = SystemColors.Control; + Music_ButtonBox_SurroundRoomSize.Location = new Point(68, 23); + Music_ButtonBox_SurroundRoomSize.Name = "Music_ButtonBox_SurroundRoomSize"; + Music_ButtonBox_SurroundRoomSize.Size = new Size(sbyte.MaxValue, 101); + Music_ButtonBox_SurroundRoomSize.TabIndex = 7; + Music_ButtonBox_SurroundRoomSize.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(Music_ButtonBox_SurroundRoomSize_ItemSelectedNotify); + Music_onOffSwitch_Surround.BackColor = Color.Transparent; + Music_onOffSwitch_Surround.Location = new Point(13, 23); + Music_onOffSwitch_Surround.Name = "Music_onOffSwitch_Surround"; + Music_onOffSwitch_Surround.Size = new Size(49, 20); + Music_onOffSwitch_Surround.SwitchedOn = false; + Music_onOffSwitch_Surround.TabIndex = 6; + Music_onOffSwitch_Surround.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Surround_SwitchChangeNotify); + Music_groupBox_Convolver.Controls.Add(Music_irShape_ConvIR); + Music_groupBox_Convolver.Controls.Add(Music_onOffSwitch_Convolver); + Music_groupBox_Convolver.Controls.Add(Music_hSlider_ConvIRGain); + Music_groupBox_Convolver.Controls.Add(Music_openFileBox_ConvIRS); + Music_groupBox_Convolver.Controls.Add(Music_label_ConvolverIRGain); + Music_groupBox_Convolver.Location = new Point(312, 6); + Music_groupBox_Convolver.Name = "Music_groupBox_Convolver"; + Music_groupBox_Convolver.Size = new Size(288, 179); + Music_groupBox_Convolver.TabIndex = 12; + Music_groupBox_Convolver.TabStop = false; + Music_groupBox_Convolver.Text = "$CONVOLVER"; + Music_irShape_ConvIR.Location = new Point(13, 61); + Music_irShape_ConvIR.Name = "Music_irShape_ConvIR"; + Music_irShape_ConvIR.ShapeBackColor = Color.White; + Music_irShape_ConvIR.ShapeForeColor = Color.Black; + Music_irShape_ConvIR.Size = new Size(260, 63); + Music_irShape_ConvIR.TabIndex = 8; + Music_onOffSwitch_Convolver.BackColor = Color.Transparent; + Music_onOffSwitch_Convolver.Location = new Point(13, 23); + Music_onOffSwitch_Convolver.Name = "Music_onOffSwitch_Convolver"; + Music_onOffSwitch_Convolver.Size = new Size(49, 20); + Music_onOffSwitch_Convolver.SwitchedOn = false; + Music_onOffSwitch_Convolver.TabIndex = 5; + Music_onOffSwitch_Convolver.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(Music_onOffSwitch_Convolver_SwitchChangeNotify); + Music_hSlider_ConvIRGain.BackColor = SystemColors.Control; + Music_hSlider_ConvIRGain.Location = new Point(85, 31); + Music_hSlider_ConvIRGain.MoveDelta = 1U; + Music_hSlider_ConvIRGain.Name = "Music_hSlider_ConvIRGain"; + Music_hSlider_ConvIRGain.Position = 0U; + Music_hSlider_ConvIRGain.PositionFloat = 0.0f; + Music_hSlider_ConvIRGain.Size = new Size(188, 24); + Music_hSlider_ConvIRGain.TabIndex = 7; + Music_hSlider_ConvIRGain.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_ConvIRGain_PositionChangeNotify); + Music_openFileBox_ConvIRS.BackColor = SystemColors.Control; + Music_openFileBox_ConvIRS.FilePathName = ""; + Music_openFileBox_ConvIRS.Location = new Point(13, 136); + Music_openFileBox_ConvIRS.Name = "Music_openFileBox_ConvIRS"; + Music_openFileBox_ConvIRS.Size = new Size(260, 29); + Music_openFileBox_ConvIRS.TabIndex = 9; + Music_openFileBox_ConvIRS.FileChangeNotify += new OpenFileBox.FileChangeEventDelegate(Music_openFileBox_ConvIRS_FileChangeNotify); + Music_label_ConvolverIRGain.AutoSize = true; + Music_label_ConvolverIRGain.Location = new Point(95, 16); + Music_label_ConvolverIRGain.Name = "Music_label_ConvolverIRGain"; + Music_label_ConvolverIRGain.Size = new Size(119, 12); + Music_label_ConvolverIRGain.TabIndex = 6; + Music_label_ConvolverIRGain.Text = "$CONV_IR_GAIN : 0dB"; + Music_hSlider_PostVolume.BackColor = SystemColors.Control; + Music_hSlider_PostVolume.Location = new Point(21, 118); + Music_hSlider_PostVolume.MoveDelta = 1U; + Music_hSlider_PostVolume.Name = "Music_hSlider_PostVolume"; + Music_hSlider_PostVolume.Position = 0U; + Music_hSlider_PostVolume.PositionFloat = 0.0f; + Music_hSlider_PostVolume.Size = new Size(285, 39); + Music_hSlider_PostVolume.TabIndex = 3; + Music_hSlider_PostVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_PostVolume_PositionChangeNotify); + Music_label_PostVolume.AutoSize = true; + Music_label_PostVolume.Location = new Point(40, 100); + Music_label_PostVolume.Name = "Music_label_PostVolume"; + Music_label_PostVolume.Size = new Size(113, 12); + Music_label_PostVolume.TabIndex = 2; + Music_label_PostVolume.Text = "$POST_VOLUME : 0dB"; + Music_hSlider_PreVolume.BackColor = SystemColors.Control; + Music_hSlider_PreVolume.Location = new Point(21, 39); + Music_hSlider_PreVolume.MoveDelta = 1U; + Music_hSlider_PreVolume.Name = "Music_hSlider_PreVolume"; + Music_hSlider_PreVolume.Position = 0U; + Music_hSlider_PreVolume.PositionFloat = 0.0f; + Music_hSlider_PreVolume.Size = new Size(285, 39); + Music_hSlider_PreVolume.TabIndex = 1; + Music_hSlider_PreVolume.PositionChangeNotify += new HSlider.PositionChangeEventDelegate(Music_hSlider_PreVolume_PositionChangeNotify); + Music_label_PreVolume.AutoSize = true; + Music_label_PreVolume.Location = new Point(40, 21); + Music_label_PreVolume.Name = "Music_label_PreVolume"; + Music_label_PreVolume.Size = new Size(107, 12); + Music_label_PreVolume.TabIndex = 0; + Music_label_PreVolume.Text = "$PRE_VOLUME : 0dB"; + label_Copyright.Location = new Point(472, 604); + label_Copyright.Name = "label_Copyright"; + label_Copyright.Size = new Size(555, 23); + label_Copyright.TabIndex = 6; + label_Copyright.Text = "$COPYRIGHT"; + label_Copyright.TextAlign = ContentAlignment.MiddleRight; + notifyIcon_Main.ContextMenuStrip = contextMenuStrip_TrayMenu; + notifyIcon_Main.Icon = (Icon)componentResourceManager.GetObject("notifyIcon_Main.Icon"); + notifyIcon_Main.Text = "ViPER4Windows"; + notifyIcon_Main.MouseUp += new MouseEventHandler(NotifyIcon_Main_MouseUp); + contextMenuStrip_TrayMenu.Name = "contextMenuStrip_TrayMenu"; + contextMenuStrip_TrayMenu.Size = new Size(61, 4); + SingleButton_SavePreset.BackColor = SystemColors.Control; + SingleButton_SavePreset.ButtonText = "$SAVE_PRESET"; + SingleButton_SavePreset.Location = new Point(37, 560); + SingleButton_SavePreset.Name = "SingleButton_SavePreset"; + SingleButton_SavePreset.Size = new Size(112, 40); + SingleButton_SavePreset.TabIndex = 8; + SingleButton_SavePreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_SavePreset_ButtonClickNotify); + SingleButton_LoadPreset.BackColor = SystemColors.Control; + SingleButton_LoadPreset.ButtonText = "$LOAD_PRESET"; + SingleButton_LoadPreset.Location = new Point(37, 514); + SingleButton_LoadPreset.Name = "SingleButton_LoadPreset"; + SingleButton_LoadPreset.Size = new Size(112, 40); + SingleButton_LoadPreset.TabIndex = 7; + SingleButton_LoadPreset.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_LoadPreset_ButtonClickNotify); + ButtonBox_Mode.BackColor = SystemColors.Control; + ButtonBox_Mode.Location = new Point(16, 312); + ButtonBox_Mode.Name = "ButtonBox_Mode"; + ButtonBox_Mode.Size = new Size(152, 170); + ButtonBox_Mode.TabIndex = 3; + ButtonBox_Mode.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(ButtonBox_Mode_ItemSelectedNotify); + onOffSwitch_Master.BackColor = Color.Transparent; + onOffSwitch_Master.Location = new Point(50, 266); + onOffSwitch_Master.Name = "onOffSwitch_Master"; + onOffSwitch_Master.Size = new Size(81, 28); + onOffSwitch_Master.SwitchedOn = false; + onOffSwitch_Master.TabIndex = 2; + onOffSwitch_Master.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_Master_SwitchChangeNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1042, 633); + Controls.Add(SingleButton_SavePreset); + Controls.Add(SingleButton_LoadPreset); + Controls.Add(label_Copyright); + Controls.Add(groupBox_Main); + Controls.Add(ButtonBox_Mode); + Controls.Add(onOffSwitch_Master); + Controls.Add(label_MasterPower); + Controls.Add(pictureBox_Logo); + Controls.Add(menuStrip_Main); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MainMenuStrip = menuStrip_Main; + MaximizeBox = false; + Name = nameof(FrmMain); + StartPosition = FormStartPosition.CenterScreen; + Text = "ViPER4Windows"; + FormClosing += new FormClosingEventHandler(FrmMain_FormClosing); + Load += new EventHandler(FrmMain_Load); + SizeChanged += new EventHandler(FrmMain_SizeChanged); + ((ISupportInitialize)pictureBox_Logo).EndInit(); + menuStrip_Main.ResumeLayout(false); + menuStrip_Main.PerformLayout(); + groupBox_Main.ResumeLayout(false); + panel_Freestyle.ResumeLayout(false); + panel_Freestyle.PerformLayout(); + Freestyle_groupBox_SmartVolume.ResumeLayout(false); + Freestyle_groupBox_SmartVolume.PerformLayout(); + Freestyle_groupBox_3DSurround.ResumeLayout(false); + Freestyle_groupBox_3DSurround.PerformLayout(); + Freestyle_groupBox_Reverb.ResumeLayout(false); + Freestyle_groupBox_Reverb.PerformLayout(); + Freestyle_groupBox_Cure.ResumeLayout(false); + Freestyle_groupBox_Cure.PerformLayout(); + Freestyle_groupBox_Clarity.ResumeLayout(false); + Freestyle_groupBox_Clarity.PerformLayout(); + Freestyle_groupBox_Bass.ResumeLayout(false); + Freestyle_groupBox_Bass.PerformLayout(); + Freestyle_groupBox_VHESurround.ResumeLayout(false); + Freestyle_groupBox_Convolver.ResumeLayout(false); + Freestyle_groupBox_Convolver.PerformLayout(); + panel_MusicMode.ResumeLayout(false); + panel_MusicMode.PerformLayout(); + panel_MovieMode.ResumeLayout(false); + panel_MovieMode.PerformLayout(); + Movie_groupBox_SmartVolume.ResumeLayout(false); + Movie_groupBox_SmartVolume.PerformLayout(); + Movie_groupBox_Reverb.ResumeLayout(false); + Movie_groupBox_Reverb.PerformLayout(); + Movie_groupBox_Clarity.ResumeLayout(false); + Movie_groupBox_Clarity.PerformLayout(); + Movie_groupBox_Bass.ResumeLayout(false); + Movie_groupBox_Bass.PerformLayout(); + Movie_groupBox_Surround.ResumeLayout(false); + Movie_groupBox_Surround.PerformLayout(); + Movie_groupBox_Convolver.ResumeLayout(false); + Movie_groupBox_Convolver.PerformLayout(); + Music_groupBox_Reverb.ResumeLayout(false); + Music_groupBox_Reverb.PerformLayout(); + Music_groupBox_Cure.ResumeLayout(false); + Music_groupBox_Cure.PerformLayout(); + Music_groupBox_Clarity.ResumeLayout(false); + Music_groupBox_Clarity.PerformLayout(); + Music_groupBox_Bass.ResumeLayout(false); + Music_groupBox_Bass.PerformLayout(); + Music_groupBox_Surround.ResumeLayout(false); + Music_groupBox_Convolver.ResumeLayout(false); + Music_groupBox_Convolver.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } } - } } diff --git a/frmReverbPreset.cs b/frmReverbPreset.cs index c0eacfd..a1dfb35 100644 --- a/frmReverbPreset.cs +++ b/frmReverbPreset.cs @@ -5,293 +5,298 @@ namespace ViPER4WindowsBin { - public class frmReverbPreset : Form - { - private float m_rReverbSize; - private float m_rReverbPredelay; - private float m_rReverbDamping; - private float m_rReverbDensity; - private float m_rReverbBandwidth = 1f; - private float m_rReverbDecay; - private float m_rReverbEarlyMix; - private float m_rReverbMix; - private IContainer components; - private SingleButton singleButton_Cancel; - private SingleButton singleButton_Load; - private ButtonBox buttonBox_Preset; - - public float ReverbSize + public class FrmReverbPreset : Form { - get => this.m_rReverbSize; - set => this.m_rReverbSize = value; - } + private float m_rReverbSize; + private float m_rReverbPredelay; + private float m_rReverbDamping; + private float m_rReverbDensity; + private float m_rReverbBandwidth = 1f; + private float m_rReverbDecay; + private float m_rReverbEarlyMix; + private float m_rReverbMix; + private readonly IContainer components; + private SingleButton singleButton_Cancel; + private SingleButton singleButton_Load; + private ButtonBox buttonBox_Preset; - public float ReverbPredelay - { - get => this.m_rReverbPredelay; - set => this.m_rReverbPredelay = value; - } + public float ReverbSize + { + get => m_rReverbSize; + set => m_rReverbSize = value; + } - public float ReverbDamping - { - get => this.m_rReverbDamping; - set => this.m_rReverbDamping = value; - } + public float ReverbPredelay + { + get => m_rReverbPredelay; + set => m_rReverbPredelay = value; + } - public float ReverbDensity - { - get => this.m_rReverbDensity; - set => this.m_rReverbDensity = value; - } + public float ReverbDamping + { + get => m_rReverbDamping; + set => m_rReverbDamping = value; + } - public float ReverbBandwidth - { - get => this.m_rReverbBandwidth; - set => this.m_rReverbBandwidth = value; - } + public float ReverbDensity + { + get => m_rReverbDensity; + set => m_rReverbDensity = value; + } - public float ReverbDecay - { - get => this.m_rReverbDecay; - set => this.m_rReverbDecay = value; - } + public float ReverbBandwidth + { + get => m_rReverbBandwidth; + set => m_rReverbBandwidth = value; + } - public float ReverbEarlyMix - { - get => this.m_rReverbEarlyMix; - set => this.m_rReverbEarlyMix = value; - } + public float ReverbDecay + { + get => m_rReverbDecay; + set => m_rReverbDecay = value; + } - public float ReverbMix - { - get => this.m_rReverbMix; - set => this.m_rReverbMix = value; - } + public float ReverbEarlyMix + { + get => m_rReverbEarlyMix; + set => m_rReverbEarlyMix = value; + } - public frmReverbPreset() - { - this.InitializeComponent(); - this.Text = GlobalMessages.REVERB_PRESET; - this.singleButton_Load.ButtonText = GlobalMessages.LOAD_PRESET; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_LIVINGROOM, (object) "0")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BATHROOM, (object) "1")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BATHROOM_BATHING, (object) "2")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BEDROOM, (object) "3")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_THEATER, (object) "4")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_AUDITORIUM, (object) "5")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_UNDERGROUND_PLAZA, (object) "6")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_UNDERGROUND_PARKING, (object) "7")); - this.buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_SCENE_SHOW, (object) "8")); - this.buttonBox_Preset.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.PresetSelected); - } + public float ReverbMix + { + get => m_rReverbMix; + set => m_rReverbMix = value; + } - private void Apply01Preset() - { - this.m_rReverbDamping = 0.3f; - this.m_rReverbDensity = 0.3f; - this.m_rReverbBandwidth = 0.96f; - this.m_rReverbPredelay = 0.2f; - this.m_rReverbSize = 0.15f; - this.m_rReverbDecay = 0.41f; - this.m_rReverbMix = 0.36f; - this.m_rReverbEarlyMix = 0.51f; - } + public FrmReverbPreset() + { + InitializeComponent(); + Text = GlobalMessages.REVERB_PRESET; + singleButton_Load.ButtonText = GlobalMessages.LOAD_PRESET; + singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_LIVINGROOM, "0")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BATHROOM, "1")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BATHROOM_BATHING, "2")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_BEDROOM, "3")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_THEATER, "4")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_AUDITORIUM, "5")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_UNDERGROUND_PLAZA, "6")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_UNDERGROUND_PARKING, "7")); + buttonBox_Preset.AddItem(new ButtonBox.Item(GlobalMessages.REVERB_PRESET_SCENE_SHOW, "8")); + buttonBox_Preset.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(PresetSelected); + } - private void Apply02Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.8f; - this.m_rReverbBandwidth = 1f; - this.m_rReverbPredelay = 0.0f; - this.m_rReverbSize = 0.05f; - this.m_rReverbDecay = 0.26f; - this.m_rReverbMix = 0.51f; - this.m_rReverbEarlyMix = 0.59f; - } + private void Apply01Preset() + { + m_rReverbDamping = 0.3f; + m_rReverbDensity = 0.3f; + m_rReverbBandwidth = 0.96f; + m_rReverbPredelay = 0.2f; + m_rReverbSize = 0.15f; + m_rReverbDecay = 0.41f; + m_rReverbMix = 0.36f; + m_rReverbEarlyMix = 0.51f; + } - private void Apply03Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.8f; - this.m_rReverbBandwidth = 0.11f; - this.m_rReverbPredelay = 0.0f; - this.m_rReverbSize = 0.05f; - this.m_rReverbDecay = 0.26f; - this.m_rReverbMix = 0.51f; - this.m_rReverbEarlyMix = 0.59f; - } + private void Apply02Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.8f; + m_rReverbBandwidth = 1f; + m_rReverbPredelay = 0.0f; + m_rReverbSize = 0.05f; + m_rReverbDecay = 0.26f; + m_rReverbMix = 0.51f; + m_rReverbEarlyMix = 0.59f; + } - private void Apply04Preset() - { - this.m_rReverbDamping = 0.3f; - this.m_rReverbDensity = 0.3f; - this.m_rReverbBandwidth = 0.8f; - this.m_rReverbPredelay = 0.14f; - this.m_rReverbSize = 0.08f; - this.m_rReverbDecay = 0.41f; - this.m_rReverbMix = 0.29f; - this.m_rReverbEarlyMix = 0.41f; - } + private void Apply03Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.8f; + m_rReverbBandwidth = 0.11f; + m_rReverbPredelay = 0.0f; + m_rReverbSize = 0.05f; + m_rReverbDecay = 0.26f; + m_rReverbMix = 0.51f; + m_rReverbEarlyMix = 0.59f; + } - private void Apply05Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.3f; - this.m_rReverbBandwidth = 0.25f; - this.m_rReverbPredelay = 0.0f; - this.m_rReverbSize = 0.51f; - this.m_rReverbDecay = 0.06f; - this.m_rReverbMix = 0.39f; - this.m_rReverbEarlyMix = 0.5f; - } + private void Apply04Preset() + { + m_rReverbDamping = 0.3f; + m_rReverbDensity = 0.3f; + m_rReverbBandwidth = 0.8f; + m_rReverbPredelay = 0.14f; + m_rReverbSize = 0.08f; + m_rReverbDecay = 0.41f; + m_rReverbMix = 0.29f; + m_rReverbEarlyMix = 0.41f; + } - private void Apply06Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.16f; - this.m_rReverbBandwidth = 1f; - this.m_rReverbPredelay = 0.37f; - this.m_rReverbSize = 0.6f; - this.m_rReverbDecay = 0.26f; - this.m_rReverbMix = 0.51f; - this.m_rReverbEarlyMix = 0.59f; - } + private void Apply05Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.3f; + m_rReverbBandwidth = 0.25f; + m_rReverbPredelay = 0.0f; + m_rReverbSize = 0.51f; + m_rReverbDecay = 0.06f; + m_rReverbMix = 0.39f; + m_rReverbEarlyMix = 0.5f; + } - private void Apply07Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.3f; - this.m_rReverbBandwidth = 0.0f; - this.m_rReverbPredelay = 0.0f; - this.m_rReverbSize = 1f; - this.m_rReverbDecay = 0.0f; - this.m_rReverbMix = 0.39f; - this.m_rReverbEarlyMix = 0.5f; - } + private void Apply06Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.16f; + m_rReverbBandwidth = 1f; + m_rReverbPredelay = 0.37f; + m_rReverbSize = 0.6f; + m_rReverbDecay = 0.26f; + m_rReverbMix = 0.51f; + m_rReverbEarlyMix = 0.59f; + } - private void Apply08Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.16f; - this.m_rReverbBandwidth = 0.91f; - this.m_rReverbPredelay = 0.18f; - this.m_rReverbSize = 1f; - this.m_rReverbDecay = 0.0f; - this.m_rReverbMix = 0.59f; - this.m_rReverbEarlyMix = 0.33f; - } + private void Apply07Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.3f; + m_rReverbBandwidth = 0.0f; + m_rReverbPredelay = 0.0f; + m_rReverbSize = 1f; + m_rReverbDecay = 0.0f; + m_rReverbMix = 0.39f; + m_rReverbEarlyMix = 0.5f; + } - private void Apply09Preset() - { - this.m_rReverbDamping = 0.65f; - this.m_rReverbDensity = 0.33f; - this.m_rReverbBandwidth = 0.15f; - this.m_rReverbPredelay = 0.0f; - this.m_rReverbSize = 0.81f; - this.m_rReverbDecay = 0.0f; - this.m_rReverbMix = 0.4f; - this.m_rReverbEarlyMix = 0.25f; - } + private void Apply08Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.16f; + m_rReverbBandwidth = 0.91f; + m_rReverbPredelay = 0.18f; + m_rReverbSize = 1f; + m_rReverbDecay = 0.0f; + m_rReverbMix = 0.59f; + m_rReverbEarlyMix = 0.33f; + } - private void PresetSelected( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem.Tag == null || !(itCurrItem.Tag is string)) - return; - string tag = itCurrItem.Tag as string; - if (tag == "") - return; - int result = -1; - if (!int.TryParse(tag, out result)) - return; - switch (result) - { - case 0: - this.Apply01Preset(); - break; - case 1: - this.Apply02Preset(); - break; - case 2: - this.Apply03Preset(); - break; - case 3: - this.Apply04Preset(); - break; - case 4: - this.Apply05Preset(); - break; - case 5: - this.Apply06Preset(); - break; - case 6: - this.Apply07Preset(); - break; - case 7: - this.Apply08Preset(); - break; - case 8: - this.Apply09Preset(); - break; - } - } + private void Apply09Preset() + { + m_rReverbDamping = 0.65f; + m_rReverbDensity = 0.33f; + m_rReverbBandwidth = 0.15f; + m_rReverbPredelay = 0.0f; + m_rReverbSize = 0.81f; + m_rReverbDecay = 0.0f; + m_rReverbMix = 0.4f; + m_rReverbEarlyMix = 0.25f; + } - private void singleButton_Load_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void PresetSelected( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem.Tag == null || !(itCurrItem.Tag is string)) + return; + string tag = itCurrItem.Tag as string; + if (tag == "") + return; + if (!int.TryParse(tag, out int result)) + return; + switch (result) + { + case 0: + Apply01Preset(); + break; + case 1: + Apply02Preset(); + break; + case 2: + Apply03Preset(); + break; + case 3: + Apply04Preset(); + break; + case 4: + Apply05Preset(); + break; + case 5: + Apply06Preset(); + break; + case 6: + Apply07Preset(); + break; + case 7: + Apply08Preset(); + break; + case 8: + Apply09Preset(); + break; + } + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; + private void SingleButton_Load_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } - private void InitializeComponent() - { - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmReverbPreset)); - this.singleButton_Cancel = new SingleButton(); - this.singleButton_Load = new SingleButton(); - this.buttonBox_Preset = new ButtonBox(); - this.SuspendLayout(); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(193, 303); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(112, 40); - this.singleButton_Cancel.TabIndex = 5; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.singleButton_Load.BackColor = SystemColors.Control; - this.singleButton_Load.ButtonText = "$LOAD_PRESET"; - this.singleButton_Load.Location = new Point(193, 12); - this.singleButton_Load.Name = "singleButton_Load"; - this.singleButton_Load.Size = new Size(112, 40); - this.singleButton_Load.TabIndex = 4; - this.singleButton_Load.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Load_ButtonClickNotify); - this.buttonBox_Preset.BackColor = SystemColors.Control; - this.buttonBox_Preset.Location = new Point(12, 12); - this.buttonBox_Preset.Name = "buttonBox_Preset"; - this.buttonBox_Preset.Size = new Size(175, 331); - this.buttonBox_Preset.TabIndex = 3; - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(318, 355); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.singleButton_Load); - this.Controls.Add((Control) this.buttonBox_Preset); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmReverbPreset); - this.ShowInTaskbar = false; - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$REVERB_PRESET"; - this.ResumeLayout(false); + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } + + private void InitializeComponent() + { + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmReverbPreset)); + singleButton_Cancel = new SingleButton(); + singleButton_Load = new SingleButton(); + buttonBox_Preset = new ButtonBox(); + SuspendLayout(); + singleButton_Cancel.BackColor = SystemColors.Control; + singleButton_Cancel.ButtonText = "$CANCEL"; + singleButton_Cancel.Location = new Point(193, 303); + singleButton_Cancel.Name = "singleButton_Cancel"; + singleButton_Cancel.Size = new Size(112, 40); + singleButton_Cancel.TabIndex = 5; + singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + singleButton_Load.BackColor = SystemColors.Control; + singleButton_Load.ButtonText = "$LOAD_PRESET"; + singleButton_Load.Location = new Point(193, 12); + singleButton_Load.Name = "singleButton_Load"; + singleButton_Load.Size = new Size(112, 40); + singleButton_Load.TabIndex = 4; + singleButton_Load.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Load_ButtonClickNotify); + buttonBox_Preset.BackColor = SystemColors.Control; + buttonBox_Preset.Location = new Point(12, 12); + buttonBox_Preset.Name = "buttonBox_Preset"; + buttonBox_Preset.Size = new Size(175, 331); + buttonBox_Preset.TabIndex = 3; + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(318, 355); + Controls.Add(singleButton_Cancel); + Controls.Add(singleButton_Load); + Controls.Add(buttonBox_Preset); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmReverbPreset); + ShowInTaskbar = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "$REVERB_PRESET"; + ResumeLayout(false); + } } - } } diff --git a/frmSettings.cs b/frmSettings.cs index 95d4566..58906c9 100644 --- a/frmSettings.cs +++ b/frmSettings.cs @@ -7,433 +7,465 @@ namespace ViPER4WindowsBin { - public class frmSettings : Form - { - private List m_lstTrayMenuPreset = new List(); - private bool m_bCloseToTray; - private string m_szPresetPath = ""; - private IContainer components; - private Label label_CloseToTray; - private OnOffSwitch onOffSwitch_CloseToTray; - private GroupBox groupBox_TrayMenuSetting; - private ListView listView_TrayMenuSetting; - private ColumnHeader columnHeader_PresetName; - private ColumnHeader columnHeader_PresetMode; - private ColumnHeader columnHeader_PresetFile; - private SingleButton singleButton_AddNewItem; - private SingleButton singleButton_OK; - private SingleButton singleButton_Cancel; - private ContextMenuStrip contextMenuStrip_TrayItem; - private ToolStripMenuItem toolStripMenuItem_RemoveItem; - private ToolStripSeparator toolStripSeparator1; - private ToolStripMenuItem toolStripMenuItem_Name; - private ToolStripTextBox toolStripTextBox_Name; - private ToolStripSeparator toolStripSeparator2; - private ToolStripMenuItem toolStripMenuItem_Mode; - private ToolStripComboBox toolStripComboBox_Mode; - private ToolStripSeparator toolStripSeparator3; - private ToolStripMenuItem toolStripMenuItem_Preset; - private Label label_EnableCoexist; - private OnOffSwitch onOffSwitch_EnableCoexist; - - private string EffectModeToString(int nMode) + public class FrmSettings : Form { - switch (nMode) - { - case 0: - return GlobalMessages.MUSIC_MODE; - case 1: - return GlobalMessages.MOVIE_MODE; - case 2: - return GlobalMessages.FREESTYLE_MODE; - default: - return ""; - } - } + private readonly List m_lstTrayMenuPreset = new List(); + private bool m_bCloseToTray; + private string m_szPresetPath = ""; + private IContainer components; + private Label label_CloseToTray; + private OnOffSwitch onOffSwitch_CloseToTray; + private GroupBox groupBox_TrayMenuSetting; + private ListView listView_TrayMenuSetting; + private ColumnHeader columnHeader_PresetName; + private ColumnHeader columnHeader_PresetMode; + private ColumnHeader columnHeader_PresetFile; + private SingleButton SingleButton_AddNewItem; + private SingleButton SingleButton_OK; + private SingleButton SingleButton_Cancel; + private ContextMenuStrip contextMenuStrip_TrayItem; + private ToolStripMenuItem ToolStripMenuItem_RemoveItem; + private ToolStripSeparator ToolStripSeparator1; + private ToolStripMenuItem ToolStripMenuItem_Name; + private ToolStripTextBox ToolStripTextBox_Name; + private ToolStripSeparator ToolStripSeparator2; + private ToolStripMenuItem ToolStripMenuItem_Mode; + private ToolStripComboBox ToolStripComboBox_Mode; + private ToolStripSeparator ToolStripSeparator3; + private ToolStripMenuItem ToolStripMenuItem_Preset; + private Label label_EnableCoexist; + private OnOffSwitch onOffSwitch_EnableCoexist; - public void SetPresetPath(string szPath) => this.m_szPresetPath = szPath; + private string EffectModeToString(int nMode) + { + switch (nMode) + { + case 0: + return GlobalMessages.MUSIC_MODE; + case 1: + return GlobalMessages.MOVIE_MODE; + case 2: + return GlobalMessages.FREESTYLE_MODE; + default: + return ""; + } + } - public void SetCloseToTray(bool bValue) - { - this.m_bCloseToTray = bValue; - this.onOffSwitch_CloseToTray.SwitchedOn = this.m_bCloseToTray; - } + public void SetPresetPath(string szPath) + { + m_szPresetPath = szPath; + } - public bool GetCloseToTray() => this.m_bCloseToTray; + public void SetCloseToTray(bool bValue) + { + m_bCloseToTray = bValue; + onOffSwitch_CloseToTray.SwitchedOn = m_bCloseToTray; + } - public void SetTrayMenuPresetList(List lstTrayMenuPreset) - { - this.m_lstTrayMenuPreset.Clear(); - this.listView_TrayMenuSetting.Items.Clear(); - if (lstTrayMenuPreset == null || lstTrayMenuPreset.Count <= 0) - return; - foreach (TrayMenuPreset trayMenuPreset1 in lstTrayMenuPreset) - { - if (trayMenuPreset1.Valid()) + public bool GetCloseToTray() + { + return m_bCloseToTray; + } + + public void SetTrayMenuPresetList(List lstTrayMenuPreset) { - if (string.IsNullOrEmpty(trayMenuPreset1.PresetName)) - trayMenuPreset1.PresetName = GlobalMessages.UNNAMED; - TrayMenuPreset trayMenuPreset2 = trayMenuPreset1.Clone(); - this.listView_TrayMenuSetting.Items.Add(new ListViewItem() - { - Text = trayMenuPreset2.PresetName, - SubItems = { - this.EffectModeToString(trayMenuPreset2.PresetMode), + m_lstTrayMenuPreset.Clear(); + listView_TrayMenuSetting.Items.Clear(); + if (lstTrayMenuPreset == null || lstTrayMenuPreset.Count <= 0) + return; + foreach (TrayMenuPreset trayMenuPreset1 in lstTrayMenuPreset) + { + if (trayMenuPreset1.Valid()) + { + if (string.IsNullOrEmpty(trayMenuPreset1.PresetName)) + trayMenuPreset1.PresetName = GlobalMessages.UNNAMED; + TrayMenuPreset trayMenuPreset2 = trayMenuPreset1.Clone(); + listView_TrayMenuSetting.Items.Add(new ListViewItem() + { + Text = trayMenuPreset2.PresetName, + SubItems = { + EffectModeToString(trayMenuPreset2.PresetMode), trayMenuPreset2.PresetFileShort }, - Tag = (object) trayMenuPreset2 - }); - this.m_lstTrayMenuPreset.Add(trayMenuPreset2); + Tag = trayMenuPreset2 + }); + m_lstTrayMenuPreset.Add(trayMenuPreset2); + } + } } - } - } - public List GetTrayMenuPresetList() => this.m_lstTrayMenuPreset; + public List GetTrayMenuPresetList() + { + return m_lstTrayMenuPreset; + } - public bool GetAPOCoexistEnabled() => this.onOffSwitch_EnableCoexist.SwitchedOn; + public bool GetAPOCoexistEnabled() + { + return onOffSwitch_EnableCoexist.SwitchedOn; + } - public frmSettings() - { - this.InitializeComponent(); - this.Text = GlobalMessages.SETTINGS; - this.label_CloseToTray.Text = GlobalMessages.CLOSE_TO_TRAY; - this.groupBox_TrayMenuSetting.Text = GlobalMessages.TRAY_MENU_SETTING; - this.listView_TrayMenuSetting.Items.Clear(); - this.listView_TrayMenuSetting.Columns[0].Text = GlobalMessages.TRAY_MENU_PRESETNAME; - this.listView_TrayMenuSetting.Columns[1].Text = GlobalMessages.TRAY_MENU_PRESETMODE; - this.listView_TrayMenuSetting.Columns[2].Text = GlobalMessages.TRAY_MENU_PRESETFILE; - this.singleButton_AddNewItem.ButtonText = GlobalMessages.ADD_NEW_ITEM; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.toolStripMenuItem_RemoveItem.Text = GlobalMessages.REMOVE_ITEM; - this.toolStripMenuItem_Name.Text = GlobalMessages.MENU_TIPS_NAME; - this.toolStripMenuItem_Mode.Text = GlobalMessages.MENU_TIPS_MODE; - this.toolStripMenuItem_Preset.Text = GlobalMessages.SELECT_PRESET_FILE; - this.toolStripComboBox_Mode.Items.Clear(); - this.toolStripComboBox_Mode.Items.Add((object) new frmSettings.PresetModeItem(0)); - this.toolStripComboBox_Mode.Items.Add((object) new frmSettings.PresetModeItem(1)); - this.toolStripComboBox_Mode.Items.Add((object) new frmSettings.PresetModeItem(2)); - this.m_lstTrayMenuPreset.Clear(); - this.m_bCloseToTray = false; - this.onOffSwitch_CloseToTray.SwitchedOn = false; - this.label_EnableCoexist.Text = GlobalMessages.ENABLE_APO_COEXIST; - if (RegHelper.QueryDWORD("LoadChildAPO", 0U) == 1U) - this.onOffSwitch_EnableCoexist.SwitchedOn = true; - else - this.onOffSwitch_EnableCoexist.SwitchedOn = false; - } + public FrmSettings() + { + InitializeComponent(); + Text = GlobalMessages.SETTINGS; + label_CloseToTray.Text = GlobalMessages.CLOSE_TO_TRAY; + groupBox_TrayMenuSetting.Text = GlobalMessages.TRAY_MENU_SETTING; + listView_TrayMenuSetting.Items.Clear(); + listView_TrayMenuSetting.Columns[0].Text = GlobalMessages.TRAY_MENU_PRESETNAME; + listView_TrayMenuSetting.Columns[1].Text = GlobalMessages.TRAY_MENU_PRESETMODE; + listView_TrayMenuSetting.Columns[2].Text = GlobalMessages.TRAY_MENU_PRESETFILE; + SingleButton_AddNewItem.ButtonText = GlobalMessages.ADD_NEW_ITEM; + SingleButton_OK.ButtonText = GlobalMessages.OK; + SingleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + ToolStripMenuItem_RemoveItem.Text = GlobalMessages.REMOVE_ITEM; + ToolStripMenuItem_Name.Text = GlobalMessages.MENU_TIPS_NAME; + ToolStripMenuItem_Mode.Text = GlobalMessages.MENU_TIPS_MODE; + ToolStripMenuItem_Preset.Text = GlobalMessages.SELECT_PRESET_FILE; + ToolStripComboBox_Mode.Items.Clear(); + ToolStripComboBox_Mode.Items.Add(new PresetModeItem(0)); + ToolStripComboBox_Mode.Items.Add(new PresetModeItem(1)); + ToolStripComboBox_Mode.Items.Add(new PresetModeItem(2)); + m_lstTrayMenuPreset.Clear(); + m_bCloseToTray = false; + onOffSwitch_CloseToTray.SwitchedOn = false; + label_EnableCoexist.Text = GlobalMessages.ENABLE_APO_COEXIST; + if (RegHelper.QueryDWORD("LoadChildAPO", 0U) == 1U) + onOffSwitch_EnableCoexist.SwitchedOn = true; + else + onOffSwitch_EnableCoexist.SwitchedOn = false; + } - private void RefreshList() - { - this.listView_TrayMenuSetting.Items.Clear(); - foreach (TrayMenuPreset trayMenuPreset in this.m_lstTrayMenuPreset) - { - if (trayMenuPreset.Valid()) + private void RefreshList() { - if (string.IsNullOrEmpty(trayMenuPreset.PresetName)) - trayMenuPreset.PresetName = GlobalMessages.UNNAMED; - this.listView_TrayMenuSetting.Items.Add(new ListViewItem() - { - Text = trayMenuPreset.PresetName, - SubItems = { - this.EffectModeToString(trayMenuPreset.PresetMode), + listView_TrayMenuSetting.Items.Clear(); + foreach (TrayMenuPreset trayMenuPreset in m_lstTrayMenuPreset) + { + if (trayMenuPreset.Valid()) + { + if (string.IsNullOrEmpty(trayMenuPreset.PresetName)) + trayMenuPreset.PresetName = GlobalMessages.UNNAMED; + listView_TrayMenuSetting.Items.Add(new ListViewItem() + { + Text = trayMenuPreset.PresetName, + SubItems = { + EffectModeToString(trayMenuPreset.PresetMode), trayMenuPreset.PresetFileShort }, - Tag = (object) trayMenuPreset - }); + Tag = trayMenuPreset + }); + } + } } - } - } - private void onOffSwitch_CloseToTray_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) => this.m_bCloseToTray = bSwitchedOn; + private void OnOffSwitch_CloseToTray_SwitchChangeNotify(bool bSwitchedOn, OnOffSwitch objSender) + { + m_bCloseToTray = bSwitchedOn; + } - private void singleButton_AddNewItem_ButtonClickNotify(SingleButton objSender) - { - this.m_lstTrayMenuPreset.Add(new TrayMenuPreset(GlobalMessages.UNNAMED, 0, "")); - this.RefreshList(); - } + private void SingleButton_AddNewItem_ButtonClickNotify(SingleButton objSender) + { + m_lstTrayMenuPreset.Add(new TrayMenuPreset(GlobalMessages.UNNAMED, 0, "")); + RefreshList(); + } - private void listView_TrayMenuSetting_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Right || this.listView_TrayMenuSetting.SelectedItems.Count != 1 || this.listView_TrayMenuSetting.SelectedItems[0].Tag == null || this.listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof (TrayMenuPreset)) - return; - TrayMenuPreset tag = this.listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; - this.toolStripTextBox_Name.Text = tag.PresetName; - for (int index = 0; index < this.toolStripComboBox_Mode.Items.Count; ++index) - { - if (this.toolStripComboBox_Mode.Items[index] != null && this.toolStripComboBox_Mode.Items[index].GetType() == typeof (frmSettings.PresetModeItem) && (this.toolStripComboBox_Mode.Items[index] as frmSettings.PresetModeItem).PresetMode == tag.PresetMode) + private void ListView_TrayMenuSetting_MouseUp(object sender, MouseEventArgs e) { - this.toolStripComboBox_Mode.SelectedIndex = index; - break; + if (e.Button != MouseButtons.Right || listView_TrayMenuSetting.SelectedItems.Count != 1 || listView_TrayMenuSetting.SelectedItems[0].Tag == null || listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof(TrayMenuPreset)) + return; + TrayMenuPreset tag = listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; + ToolStripTextBox_Name.Text = tag.PresetName; + for (int index = 0; index < ToolStripComboBox_Mode.Items.Count; ++index) + { + if (ToolStripComboBox_Mode.Items[index] != null && ToolStripComboBox_Mode.Items[index].GetType() == typeof(PresetModeItem) && (ToolStripComboBox_Mode.Items[index] as PresetModeItem).PresetMode == tag.PresetMode) + { + ToolStripComboBox_Mode.SelectedIndex = index; + break; + } + } + contextMenuStrip_TrayItem.Show(listView_TrayMenuSetting, e.Location); } - } - this.contextMenuStrip_TrayItem.Show((Control) this.listView_TrayMenuSetting, e.Location); - } - private void toolStripMenuItem_RemoveItem_Click(object sender, EventArgs e) - { - if (this.listView_TrayMenuSetting.SelectedItems.Count != 1 || this.listView_TrayMenuSetting.SelectedItems[0].Tag == null || this.listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof (TrayMenuPreset) || MessageBox.Show(GlobalMessages.REMOVE_ITEM_QUESTION, GlobalMessages.REMOVE_ITEM, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - return; - TrayMenuPreset tag = this.listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; - if (this.m_lstTrayMenuPreset.Contains(tag)) - this.m_lstTrayMenuPreset.Remove(tag); - this.RefreshList(); - } + private void ToolStripMenuItem_RemoveItem_Click(object sender, EventArgs e) + { + if (listView_TrayMenuSetting.SelectedItems.Count != 1 || listView_TrayMenuSetting.SelectedItems[0].Tag == null || listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof(TrayMenuPreset) || MessageBox.Show(GlobalMessages.REMOVE_ITEM_QUESTION, GlobalMessages.REMOVE_ITEM, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + return; + TrayMenuPreset tag = listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; + if (m_lstTrayMenuPreset.Contains(tag)) + m_lstTrayMenuPreset.Remove(tag); + RefreshList(); + } - private void toolStripTextBox_Name_KeyUp(object sender, KeyEventArgs e) - { - if (this.listView_TrayMenuSetting.SelectedItems.Count != 1 || this.listView_TrayMenuSetting.SelectedItems[0].Tag == null || this.listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof (TrayMenuPreset)) - return; - TrayMenuPreset tag = this.listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; - tag.PresetName = this.toolStripTextBox_Name.Text; - if (string.IsNullOrEmpty(tag.PresetName)) - tag.PresetName = GlobalMessages.UNNAMED; - this.listView_TrayMenuSetting.SelectedItems[0].Text = tag.PresetName; - } + private void ToolStripTextBox_Name_KeyUp(object sender, KeyEventArgs e) + { + if (listView_TrayMenuSetting.SelectedItems.Count != 1 || listView_TrayMenuSetting.SelectedItems[0].Tag == null || listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof(TrayMenuPreset)) + return; + TrayMenuPreset tag = listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; + tag.PresetName = ToolStripTextBox_Name.Text; + if (string.IsNullOrEmpty(tag.PresetName)) + tag.PresetName = GlobalMessages.UNNAMED; + listView_TrayMenuSetting.SelectedItems[0].Text = tag.PresetName; + } - private void toolStripComboBox_Mode_SelectedIndexChanged(object sender, EventArgs e) - { - if (this.listView_TrayMenuSetting.SelectedItems.Count != 1 || this.listView_TrayMenuSetting.SelectedItems[0].Tag == null || this.listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof (TrayMenuPreset)) - return; - TrayMenuPreset tag = this.listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; - if (this.toolStripComboBox_Mode.SelectedItem == null || this.toolStripComboBox_Mode.SelectedItem.GetType() != typeof (frmSettings.PresetModeItem)) - return; - frmSettings.PresetModeItem selectedItem = this.toolStripComboBox_Mode.SelectedItem as frmSettings.PresetModeItem; - tag.PresetMode = selectedItem.PresetMode; - this.listView_TrayMenuSetting.SelectedItems[0].SubItems[1].Text = this.EffectModeToString(tag.PresetMode); - } + private void ToolStripComboBox_Mode_SelectedIndexChanged(object sender, EventArgs e) + { + if (listView_TrayMenuSetting.SelectedItems.Count != 1 || listView_TrayMenuSetting.SelectedItems[0].Tag == null || listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof(TrayMenuPreset)) + return; + TrayMenuPreset tag = listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; + if (ToolStripComboBox_Mode.SelectedItem == null || ToolStripComboBox_Mode.SelectedItem.GetType() != typeof(PresetModeItem)) + return; + PresetModeItem selectedItem = ToolStripComboBox_Mode.SelectedItem as PresetModeItem; + tag.PresetMode = selectedItem.PresetMode; + listView_TrayMenuSetting.SelectedItems[0].SubItems[1].Text = EffectModeToString(tag.PresetMode); + } - private void toolStripMenuItem_Preset_Click(object sender, EventArgs e) - { - if (this.listView_TrayMenuSetting.SelectedItems.Count != 1 || this.listView_TrayMenuSetting.SelectedItems[0].Tag == null || this.listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof (TrayMenuPreset)) - return; - TrayMenuPreset tag = this.listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; - OpenFileDialog openFileDialog = new OpenFileDialog(); - openFileDialog.Title = GlobalMessages.LOAD_PRESET; - openFileDialog.Filter = "*.vpf|*.vpf"; - openFileDialog.DefaultExt = "vpf"; - openFileDialog.InitialDirectory = this.m_szPresetPath; - if (openFileDialog.ShowDialog() == DialogResult.Cancel) - return; - tag.PresetFile = openFileDialog.FileName; - this.RefreshList(); - } + private void ToolStripMenuItem_Preset_Click(object sender, EventArgs e) + { + if (listView_TrayMenuSetting.SelectedItems.Count != 1 || listView_TrayMenuSetting.SelectedItems[0].Tag == null || listView_TrayMenuSetting.SelectedItems[0].Tag.GetType() != typeof(TrayMenuPreset)) + return; + TrayMenuPreset tag = listView_TrayMenuSetting.SelectedItems[0].Tag as TrayMenuPreset; + OpenFileDialog openFileDialog = new OpenFileDialog + { + Title = GlobalMessages.LOAD_PRESET, + Filter = "*.vpf|*.vpf", + DefaultExt = "vpf", + InitialDirectory = m_szPresetPath + }; + if (openFileDialog.ShowDialog() == DialogResult.Cancel) + return; + tag.PresetFile = openFileDialog.FileName; + RefreshList(); + } - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } - protected override void Dispose(bool disposing) - { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - private void InitializeComponent() - { - this.components = (IContainer) new System.ComponentModel.Container(); - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmSettings)); - this.label_CloseToTray = new Label(); - this.onOffSwitch_CloseToTray = new OnOffSwitch(); - this.groupBox_TrayMenuSetting = new GroupBox(); - this.singleButton_AddNewItem = new SingleButton(); - this.listView_TrayMenuSetting = new ListView(); - this.columnHeader_PresetName = new ColumnHeader(); - this.columnHeader_PresetMode = new ColumnHeader(); - this.columnHeader_PresetFile = new ColumnHeader(); - this.singleButton_OK = new SingleButton(); - this.singleButton_Cancel = new SingleButton(); - this.contextMenuStrip_TrayItem = new ContextMenuStrip(this.components); - this.toolStripMenuItem_RemoveItem = new ToolStripMenuItem(); - this.toolStripSeparator1 = new ToolStripSeparator(); - this.toolStripMenuItem_Name = new ToolStripMenuItem(); - this.toolStripTextBox_Name = new ToolStripTextBox(); - this.toolStripSeparator2 = new ToolStripSeparator(); - this.toolStripMenuItem_Mode = new ToolStripMenuItem(); - this.toolStripComboBox_Mode = new ToolStripComboBox(); - this.toolStripSeparator3 = new ToolStripSeparator(); - this.toolStripMenuItem_Preset = new ToolStripMenuItem(); - this.label_EnableCoexist = new Label(); - this.onOffSwitch_EnableCoexist = new OnOffSwitch(); - this.groupBox_TrayMenuSetting.SuspendLayout(); - this.contextMenuStrip_TrayItem.SuspendLayout(); - this.SuspendLayout(); - this.label_CloseToTray.AutoSize = true; - this.label_CloseToTray.Location = new Point(12, 28); - this.label_CloseToTray.Name = "label_CloseToTray"; - this.label_CloseToTray.Size = new Size(89, 12); - this.label_CloseToTray.TabIndex = 0; - this.label_CloseToTray.Text = "$CLOSE_TO_TRAY"; - this.onOffSwitch_CloseToTray.BackColor = Color.Transparent; - this.onOffSwitch_CloseToTray.Location = new Point(277, 22); - this.onOffSwitch_CloseToTray.Name = "onOffSwitch_CloseToTray"; - this.onOffSwitch_CloseToTray.Size = new Size(66, 23); - this.onOffSwitch_CloseToTray.SwitchedOn = false; - this.onOffSwitch_CloseToTray.TabIndex = 1; - this.onOffSwitch_CloseToTray.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(this.onOffSwitch_CloseToTray_SwitchChangeNotify); - this.groupBox_TrayMenuSetting.Controls.Add((Control) this.singleButton_AddNewItem); - this.groupBox_TrayMenuSetting.Controls.Add((Control) this.listView_TrayMenuSetting); - this.groupBox_TrayMenuSetting.Location = new Point(14, 59); - this.groupBox_TrayMenuSetting.Name = "groupBox_TrayMenuSetting"; - this.groupBox_TrayMenuSetting.Size = new Size(329, 320); - this.groupBox_TrayMenuSetting.TabIndex = 2; - this.groupBox_TrayMenuSetting.TabStop = false; - this.groupBox_TrayMenuSetting.Text = "$TRAY_MENU_SETTING"; - this.singleButton_AddNewItem.BackColor = SystemColors.Control; - this.singleButton_AddNewItem.ButtonText = "$ADD_NEW_ITEM"; - this.singleButton_AddNewItem.Location = new Point(6, 282); - this.singleButton_AddNewItem.Name = "singleButton_AddNewItem"; - this.singleButton_AddNewItem.Size = new Size(132, 29); - this.singleButton_AddNewItem.TabIndex = 1; - this.singleButton_AddNewItem.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_AddNewItem_ButtonClickNotify); - this.listView_TrayMenuSetting.Columns.AddRange(new ColumnHeader[3] - { - this.columnHeader_PresetName, - this.columnHeader_PresetMode, - this.columnHeader_PresetFile - }); - this.listView_TrayMenuSetting.FullRowSelect = true; - this.listView_TrayMenuSetting.GridLines = true; - this.listView_TrayMenuSetting.HeaderStyle = ColumnHeaderStyle.Nonclickable; - this.listView_TrayMenuSetting.HideSelection = false; - this.listView_TrayMenuSetting.Location = new Point(6, 20); - this.listView_TrayMenuSetting.MultiSelect = false; - this.listView_TrayMenuSetting.Name = "listView_TrayMenuSetting"; - this.listView_TrayMenuSetting.Size = new Size(317, 256); - this.listView_TrayMenuSetting.TabIndex = 0; - this.listView_TrayMenuSetting.UseCompatibleStateImageBehavior = false; - this.listView_TrayMenuSetting.View = View.Details; - this.listView_TrayMenuSetting.MouseUp += new MouseEventHandler(this.listView_TrayMenuSetting_MouseUp); - this.columnHeader_PresetName.Text = "$TRAY_MENU_PRESETNAME"; - this.columnHeader_PresetName.Width = 89; - this.columnHeader_PresetMode.Text = "$TRAY_MENU_PRESETMODE"; - this.columnHeader_PresetMode.Width = 81; - this.columnHeader_PresetFile.Text = "$TRAY_MENU_PRESETFILE"; - this.columnHeader_PresetFile.Width = 136; - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(14, 447); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(112, 40); - this.singleButton_OK.TabIndex = 3; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(231, 447); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(112, 40); - this.singleButton_Cancel.TabIndex = 4; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.contextMenuStrip_TrayItem.Items.AddRange(new ToolStripItem[9] - { - (ToolStripItem) this.toolStripMenuItem_RemoveItem, - (ToolStripItem) this.toolStripSeparator1, - (ToolStripItem) this.toolStripMenuItem_Name, - (ToolStripItem) this.toolStripTextBox_Name, - (ToolStripItem) this.toolStripSeparator2, - (ToolStripItem) this.toolStripMenuItem_Mode, - (ToolStripItem) this.toolStripComboBox_Mode, - (ToolStripItem) this.toolStripSeparator3, - (ToolStripItem) this.toolStripMenuItem_Preset - }); - this.contextMenuStrip_TrayItem.Name = "contextMenuStrip_TrayItem"; - this.contextMenuStrip_TrayItem.Size = new Size(202, 164); - this.toolStripMenuItem_RemoveItem.Name = "toolStripMenuItem_RemoveItem"; - this.toolStripMenuItem_RemoveItem.Size = new Size(201, 22); - this.toolStripMenuItem_RemoveItem.Text = "$REMOVE_ITEM"; - this.toolStripMenuItem_RemoveItem.Click += new EventHandler(this.toolStripMenuItem_RemoveItem_Click); - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new Size(198, 6); - this.toolStripMenuItem_Name.Enabled = false; - this.toolStripMenuItem_Name.Name = "toolStripMenuItem_Name"; - this.toolStripMenuItem_Name.Size = new Size(201, 22); - this.toolStripMenuItem_Name.Text = "$MENU_TIPS_NAME"; - this.toolStripTextBox_Name.Name = "toolStripTextBox_Name"; - this.toolStripTextBox_Name.Size = new Size(100, 23); - this.toolStripTextBox_Name.KeyUp += new KeyEventHandler(this.toolStripTextBox_Name_KeyUp); - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new Size(198, 6); - this.toolStripMenuItem_Mode.Enabled = false; - this.toolStripMenuItem_Mode.Name = "toolStripMenuItem_Mode"; - this.toolStripMenuItem_Mode.Size = new Size(201, 22); - this.toolStripMenuItem_Mode.Text = "$MENU_TIPS_MODE"; - this.toolStripComboBox_Mode.DropDownStyle = ComboBoxStyle.DropDownList; - this.toolStripComboBox_Mode.Name = "toolStripComboBox_Mode"; - this.toolStripComboBox_Mode.Size = new Size(121, 25); - this.toolStripComboBox_Mode.SelectedIndexChanged += new EventHandler(this.toolStripComboBox_Mode_SelectedIndexChanged); - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new Size(198, 6); - this.toolStripMenuItem_Preset.Name = "toolStripMenuItem_Preset"; - this.toolStripMenuItem_Preset.Size = new Size(201, 22); - this.toolStripMenuItem_Preset.Text = "$SELECT_PRESET_FILE"; - this.toolStripMenuItem_Preset.Click += new EventHandler(this.toolStripMenuItem_Preset_Click); - this.label_EnableCoexist.AutoSize = true; - this.label_EnableCoexist.Location = new Point(12, 407); - this.label_EnableCoexist.Name = "label_EnableCoexist"; - this.label_EnableCoexist.Size = new Size(119, 12); - this.label_EnableCoexist.TabIndex = 5; - this.label_EnableCoexist.Text = "$ENABLE_APO_COEXIST"; - this.onOffSwitch_EnableCoexist.BackColor = Color.Transparent; - this.onOffSwitch_EnableCoexist.Location = new Point(277, 401); - this.onOffSwitch_EnableCoexist.Name = "onOffSwitch_EnableCoexist"; - this.onOffSwitch_EnableCoexist.Size = new Size(66, 23); - this.onOffSwitch_EnableCoexist.SwitchedOn = false; - this.onOffSwitch_EnableCoexist.TabIndex = 6; - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(356, 498); - this.Controls.Add((Control) this.onOffSwitch_EnableCoexist); - this.Controls.Add((Control) this.label_EnableCoexist); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.groupBox_TrayMenuSetting); - this.Controls.Add((Control) this.label_CloseToTray); - this.Controls.Add((Control) this.onOffSwitch_CloseToTray); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = nameof (frmSettings); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$SETTINGS"; - this.groupBox_TrayMenuSetting.ResumeLayout(false); - this.contextMenuStrip_TrayItem.ResumeLayout(false); - this.contextMenuStrip_TrayItem.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - } + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmSettings)); + label_CloseToTray = new Label(); + onOffSwitch_CloseToTray = new OnOffSwitch(); + groupBox_TrayMenuSetting = new GroupBox(); + SingleButton_AddNewItem = new SingleButton(); + listView_TrayMenuSetting = new ListView(); + columnHeader_PresetName = new ColumnHeader(); + columnHeader_PresetMode = new ColumnHeader(); + columnHeader_PresetFile = new ColumnHeader(); + SingleButton_OK = new SingleButton(); + SingleButton_Cancel = new SingleButton(); + contextMenuStrip_TrayItem = new ContextMenuStrip(components); + ToolStripMenuItem_RemoveItem = new ToolStripMenuItem(); + ToolStripSeparator1 = new ToolStripSeparator(); + ToolStripMenuItem_Name = new ToolStripMenuItem(); + ToolStripTextBox_Name = new ToolStripTextBox(); + ToolStripSeparator2 = new ToolStripSeparator(); + ToolStripMenuItem_Mode = new ToolStripMenuItem(); + ToolStripComboBox_Mode = new ToolStripComboBox(); + ToolStripSeparator3 = new ToolStripSeparator(); + ToolStripMenuItem_Preset = new ToolStripMenuItem(); + label_EnableCoexist = new Label(); + onOffSwitch_EnableCoexist = new OnOffSwitch(); + groupBox_TrayMenuSetting.SuspendLayout(); + contextMenuStrip_TrayItem.SuspendLayout(); + SuspendLayout(); + label_CloseToTray.AutoSize = true; + label_CloseToTray.Location = new Point(12, 28); + label_CloseToTray.Name = "label_CloseToTray"; + label_CloseToTray.Size = new Size(89, 12); + label_CloseToTray.TabIndex = 0; + label_CloseToTray.Text = "$CLOSE_TO_TRAY"; + onOffSwitch_CloseToTray.BackColor = Color.Transparent; + onOffSwitch_CloseToTray.Location = new Point(277, 22); + onOffSwitch_CloseToTray.Name = "onOffSwitch_CloseToTray"; + onOffSwitch_CloseToTray.Size = new Size(66, 23); + onOffSwitch_CloseToTray.SwitchedOn = false; + onOffSwitch_CloseToTray.TabIndex = 1; + onOffSwitch_CloseToTray.SwitchChangeNotify += new OnOffSwitch.SwitchChangeEventDelegate(OnOffSwitch_CloseToTray_SwitchChangeNotify); + groupBox_TrayMenuSetting.Controls.Add(SingleButton_AddNewItem); + groupBox_TrayMenuSetting.Controls.Add(listView_TrayMenuSetting); + groupBox_TrayMenuSetting.Location = new Point(14, 59); + groupBox_TrayMenuSetting.Name = "groupBox_TrayMenuSetting"; + groupBox_TrayMenuSetting.Size = new Size(329, 320); + groupBox_TrayMenuSetting.TabIndex = 2; + groupBox_TrayMenuSetting.TabStop = false; + groupBox_TrayMenuSetting.Text = "$TRAY_MENU_SETTING"; + SingleButton_AddNewItem.BackColor = SystemColors.Control; + SingleButton_AddNewItem.ButtonText = "$ADD_NEW_ITEM"; + SingleButton_AddNewItem.Location = new Point(6, 282); + SingleButton_AddNewItem.Name = "SingleButton_AddNewItem"; + SingleButton_AddNewItem.Size = new Size(132, 29); + SingleButton_AddNewItem.TabIndex = 1; + SingleButton_AddNewItem.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_AddNewItem_ButtonClickNotify); + listView_TrayMenuSetting.Columns.AddRange(new ColumnHeader[3] + { + columnHeader_PresetName, + columnHeader_PresetMode, + columnHeader_PresetFile + }); + listView_TrayMenuSetting.FullRowSelect = true; + listView_TrayMenuSetting.GridLines = true; + listView_TrayMenuSetting.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listView_TrayMenuSetting.HideSelection = false; + listView_TrayMenuSetting.Location = new Point(6, 20); + listView_TrayMenuSetting.MultiSelect = false; + listView_TrayMenuSetting.Name = "listView_TrayMenuSetting"; + listView_TrayMenuSetting.Size = new Size(317, 256); + listView_TrayMenuSetting.TabIndex = 0; + listView_TrayMenuSetting.UseCompatibleStateImageBehavior = false; + listView_TrayMenuSetting.View = View.Details; + listView_TrayMenuSetting.MouseUp += new MouseEventHandler(ListView_TrayMenuSetting_MouseUp); + columnHeader_PresetName.Text = "$TRAY_MENU_PRESETNAME"; + columnHeader_PresetName.Width = 89; + columnHeader_PresetMode.Text = "$TRAY_MENU_PRESETMODE"; + columnHeader_PresetMode.Width = 81; + columnHeader_PresetFile.Text = "$TRAY_MENU_PRESETFILE"; + columnHeader_PresetFile.Width = 136; + SingleButton_OK.BackColor = SystemColors.Control; + SingleButton_OK.ButtonText = "$OK"; + SingleButton_OK.Location = new Point(14, 447); + SingleButton_OK.Name = "SingleButton_OK"; + SingleButton_OK.Size = new Size(112, 40); + SingleButton_OK.TabIndex = 3; + SingleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + SingleButton_Cancel.BackColor = SystemColors.Control; + SingleButton_Cancel.ButtonText = "$CANCEL"; + SingleButton_Cancel.Location = new Point(231, 447); + SingleButton_Cancel.Name = "SingleButton_Cancel"; + SingleButton_Cancel.Size = new Size(112, 40); + SingleButton_Cancel.TabIndex = 4; + SingleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + contextMenuStrip_TrayItem.Items.AddRange(new ToolStripItem[9] + { + ToolStripMenuItem_RemoveItem, + ToolStripSeparator1, + ToolStripMenuItem_Name, + ToolStripTextBox_Name, + ToolStripSeparator2, + ToolStripMenuItem_Mode, + ToolStripComboBox_Mode, + ToolStripSeparator3, + ToolStripMenuItem_Preset + }); + contextMenuStrip_TrayItem.Name = "contextMenuStrip_TrayItem"; + contextMenuStrip_TrayItem.Size = new Size(202, 164); + ToolStripMenuItem_RemoveItem.Name = "ToolStripMenuItem_RemoveItem"; + ToolStripMenuItem_RemoveItem.Size = new Size(201, 22); + ToolStripMenuItem_RemoveItem.Text = "$REMOVE_ITEM"; + ToolStripMenuItem_RemoveItem.Click += new EventHandler(ToolStripMenuItem_RemoveItem_Click); + ToolStripSeparator1.Name = "ToolStripSeparator1"; + ToolStripSeparator1.Size = new Size(198, 6); + ToolStripMenuItem_Name.Enabled = false; + ToolStripMenuItem_Name.Name = "ToolStripMenuItem_Name"; + ToolStripMenuItem_Name.Size = new Size(201, 22); + ToolStripMenuItem_Name.Text = "$MENU_TIPS_NAME"; + ToolStripTextBox_Name.Name = "ToolStripTextBox_Name"; + ToolStripTextBox_Name.Size = new Size(100, 23); + ToolStripTextBox_Name.KeyUp += new KeyEventHandler(ToolStripTextBox_Name_KeyUp); + ToolStripSeparator2.Name = "ToolStripSeparator2"; + ToolStripSeparator2.Size = new Size(198, 6); + ToolStripMenuItem_Mode.Enabled = false; + ToolStripMenuItem_Mode.Name = "ToolStripMenuItem_Mode"; + ToolStripMenuItem_Mode.Size = new Size(201, 22); + ToolStripMenuItem_Mode.Text = "$MENU_TIPS_MODE"; + ToolStripComboBox_Mode.DropDownStyle = ComboBoxStyle.DropDownList; + ToolStripComboBox_Mode.Name = "ToolStripComboBox_Mode"; + ToolStripComboBox_Mode.Size = new Size(121, 25); + ToolStripComboBox_Mode.SelectedIndexChanged += new EventHandler(ToolStripComboBox_Mode_SelectedIndexChanged); + ToolStripSeparator3.Name = "ToolStripSeparator3"; + ToolStripSeparator3.Size = new Size(198, 6); + ToolStripMenuItem_Preset.Name = "ToolStripMenuItem_Preset"; + ToolStripMenuItem_Preset.Size = new Size(201, 22); + ToolStripMenuItem_Preset.Text = "$SELECT_PRESET_FILE"; + ToolStripMenuItem_Preset.Click += new EventHandler(ToolStripMenuItem_Preset_Click); + label_EnableCoexist.AutoSize = true; + label_EnableCoexist.Location = new Point(12, 407); + label_EnableCoexist.Name = "label_EnableCoexist"; + label_EnableCoexist.Size = new Size(119, 12); + label_EnableCoexist.TabIndex = 5; + label_EnableCoexist.Text = "$ENABLE_APO_COEXIST"; + onOffSwitch_EnableCoexist.BackColor = Color.Transparent; + onOffSwitch_EnableCoexist.Location = new Point(277, 401); + onOffSwitch_EnableCoexist.Name = "onOffSwitch_EnableCoexist"; + onOffSwitch_EnableCoexist.Size = new Size(66, 23); + onOffSwitch_EnableCoexist.SwitchedOn = false; + onOffSwitch_EnableCoexist.TabIndex = 6; + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(356, 498); + Controls.Add(onOffSwitch_EnableCoexist); + Controls.Add(label_EnableCoexist); + Controls.Add(SingleButton_Cancel); + Controls.Add(SingleButton_OK); + Controls.Add(groupBox_TrayMenuSetting); + Controls.Add(label_CloseToTray); + Controls.Add(onOffSwitch_CloseToTray); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(FrmSettings); + StartPosition = FormStartPosition.CenterScreen; + Text = "$SETTINGS"; + groupBox_TrayMenuSetting.ResumeLayout(false); + contextMenuStrip_TrayItem.ResumeLayout(false); + contextMenuStrip_TrayItem.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } - private class PresetModeItem - { - private int m_nPresetMode = -1; + private class PresetModeItem + { + private int m_nPresetMode = -1; - public int PresetMode - { - get => this.m_nPresetMode; - set => this.m_nPresetMode = value; - } + public int PresetMode + { + get => m_nPresetMode; + set => m_nPresetMode = value; + } - public string PresetModeString - { - get - { - if (this.m_nPresetMode == 0) - return GlobalMessages.MUSIC_MODE; - if (this.m_nPresetMode == 1) - return GlobalMessages.MOVIE_MODE; - return this.m_nPresetMode == 2 ? GlobalMessages.FREESTYLE_MODE : ""; - } - } + public string PresetModeString + { + get + { + if (m_nPresetMode == 0) + return GlobalMessages.MUSIC_MODE; + if (m_nPresetMode == 1) + return GlobalMessages.MOVIE_MODE; + return m_nPresetMode == 2 ? GlobalMessages.FREESTYLE_MODE : ""; + } + } - public PresetModeItem(int nMode) => this.m_nPresetMode = nMode; + public PresetModeItem(int nMode) => m_nPresetMode = nMode; - public override bool Equals(object obj) => obj != null && obj.GetType() == typeof (frmSettings.PresetModeItem) && (obj as frmSettings.PresetModeItem).PresetMode == this.m_nPresetMode; + public override bool Equals(object obj) + { + return obj != null && obj.GetType() == typeof(PresetModeItem) && (obj as PresetModeItem).PresetMode == m_nPresetMode; + } - public override int GetHashCode() => this.m_nPresetMode; + public override int GetHashCode() + { + return m_nPresetMode; + } - public override string ToString() => this.PresetModeString; + public override string ToString() + { + return PresetModeString; + } + } } - } } diff --git a/frmVirtualization.cs b/frmVirtualization.cs index e84062e..82c0c9a 100644 --- a/frmVirtualization.cs +++ b/frmVirtualization.cs @@ -7,843 +7,865 @@ namespace ViPER4WindowsBin { - public class frmVirtualization : Form - { - private IContainer components; - private Label label_AudioSystemConfig; - private ButtonBox buttonBox_AudioSystemConfig; - private GroupBox groupBox_VirtApplied; - private CheckBox checkBox_MusicMode; - private CheckBox checkBox_Freestyle; - private CheckBox checkBox_MovieMode; - private ListView listView_Speaker; - private ColumnHeader columnHeader_Speaker; - private ColumnHeader columnHeader_Angle; - private SingleButton singleButton_ResetConfig; - private GroupBox groupBox_VirtEnv; - private OnOffSwitch onOffSwitch_EnvRealize; - private ComboBox comboBox_EnvRealizePreset; - private HSlider hSlider_EnvRealizeDrySignal; - private SingleButton singleButton_OK; - private Label label_PrePostProcess; - private ContextMenuStrip contextMenuStrip_SpeakerAngle; - private ToolStripMenuItem toolStripMenuItem_SpeakerAngle; - private ToolStripSeparator toolStripSeparator_Angle; - private ToolStripComboBox toolStripComboBox_SpeakerAngle; - private SingleButton singleButton_Cancel; - private TwoSelector twoSelector_PrePostProcess; - private RuntimeUtils.ConfigProxy._ParamOfBaseSystem m_paramSystem = new RuntimeUtils.ConfigProxy._ParamOfBaseSystem(); - private int m_nCurrentAudioSystem = -1; - - protected override void Dispose(bool disposing) + public class FrmVirtualization : Form { - if (disposing && this.components != null) - this.components.Dispose(); - base.Dispose(disposing); - } + private IContainer components; + private Label label_AudioSystemConfig; + private ButtonBox ButtonBox_AudioSystemConfig; + private GroupBox groupBox_VirtApplied; + private CheckBox checkBox_MusicMode; + private CheckBox checkBox_Freestyle; + private CheckBox checkBox_MovieMode; + private ListView ListView_Speaker; + private ColumnHeader columnHeader_Speaker; + private ColumnHeader columnHeader_Angle; + private SingleButton SingleButton_ResetConfig; + private GroupBox groupBox_VirtEnv; + private OnOffSwitch onOffSwitch_EnvRealize; + private ComboBox comboBox_EnvRealizePreset; + private HSlider hSlider_EnvRealizeDrySignal; + private SingleButton SingleButton_OK; + private Label label_PrePostProcess; + private ContextMenuStrip ContextMenuStrip_SpeakerAngle; + private ToolStripMenuItem ToolStripMenuItem_SpeakerAngle; + private ToolStripSeparator ToolStripSeparator_Angle; + private ToolStripComboBox ToolStripComboBox_SpeakerAngle; + private SingleButton SingleButton_Cancel; + private TwoSelector twoSelector_PrePostProcess; + private RuntimeUtils.ConfigProxy.ParamOfBaseSystem m_paramSystem = new RuntimeUtils.ConfigProxy.ParamOfBaseSystem(); + private int m_nCurrentAudioSystem = -1; - private void InitializeComponent() - { - this.components = (IContainer) new System.ComponentModel.Container(); - ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmVirtualization)); - this.label_AudioSystemConfig = new Label(); - this.groupBox_VirtApplied = new GroupBox(); - this.checkBox_Freestyle = new CheckBox(); - this.checkBox_MovieMode = new CheckBox(); - this.checkBox_MusicMode = new CheckBox(); - this.listView_Speaker = new ListView(); - this.columnHeader_Speaker = new ColumnHeader(); - this.columnHeader_Angle = new ColumnHeader(); - this.groupBox_VirtEnv = new GroupBox(); - this.label_PrePostProcess = new Label(); - this.comboBox_EnvRealizePreset = new ComboBox(); - this.contextMenuStrip_SpeakerAngle = new ContextMenuStrip(this.components); - this.toolStripMenuItem_SpeakerAngle = new ToolStripMenuItem(); - this.toolStripSeparator_Angle = new ToolStripSeparator(); - this.toolStripComboBox_SpeakerAngle = new ToolStripComboBox(); - this.singleButton_Cancel = new SingleButton(); - this.twoSelector_PrePostProcess = new TwoSelector(); - this.hSlider_EnvRealizeDrySignal = new HSlider(); - this.onOffSwitch_EnvRealize = new OnOffSwitch(); - this.singleButton_ResetConfig = new SingleButton(); - this.singleButton_OK = new SingleButton(); - this.buttonBox_AudioSystemConfig = new ButtonBox(); - this.groupBox_VirtApplied.SuspendLayout(); - this.groupBox_VirtEnv.SuspendLayout(); - this.contextMenuStrip_SpeakerAngle.SuspendLayout(); - this.SuspendLayout(); - this.label_AudioSystemConfig.AutoSize = true; - this.label_AudioSystemConfig.Location = new Point(12, 17); - this.label_AudioSystemConfig.Name = "label_AudioSystemConfig"; - this.label_AudioSystemConfig.Size = new Size(125, 12); - this.label_AudioSystemConfig.TabIndex = 0; - this.label_AudioSystemConfig.Text = "$AUDIO_SYSTEM_CONFIG"; - this.groupBox_VirtApplied.Controls.Add((Control) this.checkBox_Freestyle); - this.groupBox_VirtApplied.Controls.Add((Control) this.checkBox_MovieMode); - this.groupBox_VirtApplied.Controls.Add((Control) this.checkBox_MusicMode); - this.groupBox_VirtApplied.Location = new Point(151, 292); - this.groupBox_VirtApplied.Name = "groupBox_VirtApplied"; - this.groupBox_VirtApplied.Size = new Size(167, 88); - this.groupBox_VirtApplied.TabIndex = 2; - this.groupBox_VirtApplied.TabStop = false; - this.groupBox_VirtApplied.Text = "$VIRT_APPLIED"; - this.checkBox_Freestyle.AutoSize = true; - this.checkBox_Freestyle.Location = new Point(16, 64); - this.checkBox_Freestyle.Name = "checkBox_Freestyle"; - this.checkBox_Freestyle.Size = new Size(114, 16); - this.checkBox_Freestyle.TabIndex = 5; - this.checkBox_Freestyle.Text = "$FREESTYLE_MODE"; - this.checkBox_Freestyle.UseVisualStyleBackColor = true; - this.checkBox_MovieMode.AutoSize = true; - this.checkBox_MovieMode.Location = new Point(16, 42); - this.checkBox_MovieMode.Name = "checkBox_MovieMode"; - this.checkBox_MovieMode.Size = new Size(90, 16); - this.checkBox_MovieMode.TabIndex = 4; - this.checkBox_MovieMode.Text = "$MOVIE_MODE"; - this.checkBox_MovieMode.UseVisualStyleBackColor = true; - this.checkBox_MusicMode.AutoSize = true; - this.checkBox_MusicMode.Location = new Point(16, 20); - this.checkBox_MusicMode.Name = "checkBox_MusicMode"; - this.checkBox_MusicMode.Size = new Size(90, 16); - this.checkBox_MusicMode.TabIndex = 3; - this.checkBox_MusicMode.Text = "$MUSIC_MODE"; - this.checkBox_MusicMode.UseVisualStyleBackColor = true; - this.listView_Speaker.Columns.AddRange(new ColumnHeader[2] - { - this.columnHeader_Speaker, - this.columnHeader_Angle - }); - this.listView_Speaker.FullRowSelect = true; - this.listView_Speaker.GridLines = true; - this.listView_Speaker.HeaderStyle = ColumnHeaderStyle.Nonclickable; - this.listView_Speaker.HideSelection = false; - this.listView_Speaker.Location = new Point(151, 71); - this.listView_Speaker.MultiSelect = false; - this.listView_Speaker.Name = "listView_Speaker"; - this.listView_Speaker.Size = new Size(167, 215); - this.listView_Speaker.TabIndex = 3; - this.listView_Speaker.UseCompatibleStateImageBehavior = false; - this.listView_Speaker.View = View.Details; - this.listView_Speaker.MouseUp += new MouseEventHandler(this.listView_Speaker_MouseUp); - this.columnHeader_Speaker.Text = "$VIRT_SPEAKER"; - this.columnHeader_Speaker.Width = 95; - this.columnHeader_Angle.Text = "$VIRT_SPEAKER_ANGLE"; - this.groupBox_VirtEnv.Controls.Add((Control) this.twoSelector_PrePostProcess); - this.groupBox_VirtEnv.Controls.Add((Control) this.label_PrePostProcess); - this.groupBox_VirtEnv.Controls.Add((Control) this.hSlider_EnvRealizeDrySignal); - this.groupBox_VirtEnv.Controls.Add((Control) this.comboBox_EnvRealizePreset); - this.groupBox_VirtEnv.Controls.Add((Control) this.onOffSwitch_EnvRealize); - this.groupBox_VirtEnv.Location = new Point(324, 36); - this.groupBox_VirtEnv.Name = "groupBox_VirtEnv"; - this.groupBox_VirtEnv.Size = new Size(222, 106); - this.groupBox_VirtEnv.TabIndex = 5; - this.groupBox_VirtEnv.TabStop = false; - this.groupBox_VirtEnv.Text = "$VIRTUAL_ENVIRONMENT"; - this.label_PrePostProcess.AutoSize = true; - this.label_PrePostProcess.Location = new Point(6, 79); - this.label_PrePostProcess.Name = "label_PrePostProcess"; - this.label_PrePostProcess.Size = new Size(107, 12); - this.label_PrePostProcess.TabIndex = 3; - this.label_PrePostProcess.Text = "$PRE_POST_PROCESS"; - this.comboBox_EnvRealizePreset.DropDownStyle = ComboBoxStyle.DropDownList; - this.comboBox_EnvRealizePreset.FormattingEnabled = true; - this.comboBox_EnvRealizePreset.Location = new Point(6, 20); - this.comboBox_EnvRealizePreset.Name = "comboBox_EnvRealizePreset"; - this.comboBox_EnvRealizePreset.Size = new Size(210, 20); - this.comboBox_EnvRealizePreset.TabIndex = 1; - this.contextMenuStrip_SpeakerAngle.Items.AddRange(new ToolStripItem[3] - { - (ToolStripItem) this.toolStripMenuItem_SpeakerAngle, - (ToolStripItem) this.toolStripSeparator_Angle, - (ToolStripItem) this.toolStripComboBox_SpeakerAngle - }); - this.contextMenuStrip_SpeakerAngle.Name = "contextMenuStrip_SpeakerAngle"; - this.contextMenuStrip_SpeakerAngle.Size = new Size(182, 61); - this.contextMenuStrip_SpeakerAngle.Closed += new ToolStripDropDownClosedEventHandler(this.contextMenuStrip_SpeakerAngle_Closed); - this.toolStripMenuItem_SpeakerAngle.Enabled = false; - this.toolStripMenuItem_SpeakerAngle.Name = "toolStripMenuItem_SpeakerAngle"; - this.toolStripMenuItem_SpeakerAngle.Size = new Size(181, 22); - this.toolStripMenuItem_SpeakerAngle.Text = "$SPEAKER_ANGLE"; - this.toolStripSeparator_Angle.Name = "toolStripSeparator_Angle"; - this.toolStripSeparator_Angle.Size = new Size(178, 6); - this.toolStripComboBox_SpeakerAngle.DropDownStyle = ComboBoxStyle.DropDownList; - this.toolStripComboBox_SpeakerAngle.Name = "toolStripComboBox_SpeakerAngle"; - this.toolStripComboBox_SpeakerAngle.Size = new Size(121, 25); - this.toolStripComboBox_SpeakerAngle.SelectedIndexChanged += new EventHandler(this.toolStripComboBox_SpeakerAngle_SelectedIndexChanged); - this.singleButton_Cancel.BackColor = SystemColors.Control; - this.singleButton_Cancel.ButtonText = "$CANCEL"; - this.singleButton_Cancel.Location = new Point(446, 347); - this.singleButton_Cancel.Name = "singleButton_Cancel"; - this.singleButton_Cancel.Size = new Size(100, 33); - this.singleButton_Cancel.TabIndex = 8; - this.singleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_Cancel_ButtonClickNotify); - this.twoSelector_PrePostProcess.BackColor = Color.Transparent; - this.twoSelector_PrePostProcess.CurrentObject = (object) null; - this.twoSelector_PrePostProcess.LeftObject = (object) null; - this.twoSelector_PrePostProcess.Location = new Point(146, 74); - this.twoSelector_PrePostProcess.Name = "twoSelector_PrePostProcess"; - this.twoSelector_PrePostProcess.RightObject = (object) null; - this.twoSelector_PrePostProcess.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; - this.twoSelector_PrePostProcess.Size = new Size(70, 22); - this.twoSelector_PrePostProcess.TabIndex = 9; - this.hSlider_EnvRealizeDrySignal.BackColor = SystemColors.Control; - this.hSlider_EnvRealizeDrySignal.Location = new Point(68, 48); - this.hSlider_EnvRealizeDrySignal.MoveDelta = 1U; - this.hSlider_EnvRealizeDrySignal.Name = "hSlider_EnvRealizeDrySignal"; - this.hSlider_EnvRealizeDrySignal.Position = 0U; - this.hSlider_EnvRealizeDrySignal.PositionFloat = 0.0f; - this.hSlider_EnvRealizeDrySignal.Size = new Size(148, 20); - this.hSlider_EnvRealizeDrySignal.TabIndex = 2; - this.onOffSwitch_EnvRealize.BackColor = Color.Transparent; - this.onOffSwitch_EnvRealize.Location = new Point(6, 46); - this.onOffSwitch_EnvRealize.Name = "onOffSwitch_EnvRealize"; - this.onOffSwitch_EnvRealize.Size = new Size(53, 22); - this.onOffSwitch_EnvRealize.SwitchedOn = false; - this.onOffSwitch_EnvRealize.TabIndex = 0; - this.singleButton_ResetConfig.BackColor = SystemColors.Control; - this.singleButton_ResetConfig.ButtonText = "$VIRT_RESET"; - this.singleButton_ResetConfig.Location = new Point(151, 36); - this.singleButton_ResetConfig.Name = "singleButton_ResetConfig"; - this.singleButton_ResetConfig.Size = new Size(167, 26); - this.singleButton_ResetConfig.TabIndex = 4; - this.singleButton_ResetConfig.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_ResetConfig_ButtonClickNotify); - this.singleButton_OK.BackColor = SystemColors.Control; - this.singleButton_OK.ButtonText = "$OK"; - this.singleButton_OK.Location = new Point(324, 347); - this.singleButton_OK.Name = "singleButton_OK"; - this.singleButton_OK.Size = new Size(100, 33); - this.singleButton_OK.TabIndex = 6; - this.singleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(this.singleButton_OK_ButtonClickNotify); - this.buttonBox_AudioSystemConfig.BackColor = SystemColors.Control; - this.buttonBox_AudioSystemConfig.Location = new Point(14, 36); - this.buttonBox_AudioSystemConfig.Name = "buttonBox_AudioSystemConfig"; - this.buttonBox_AudioSystemConfig.Size = new Size(131, 344); - this.buttonBox_AudioSystemConfig.TabIndex = 1; - this.buttonBox_AudioSystemConfig.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(this.buttonBox_AudioSystemConfig_ItemSelectedNotify); - this.AutoScaleDimensions = new SizeF(6f, 12f); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(562, 394); - this.Controls.Add((Control) this.singleButton_Cancel); - this.Controls.Add((Control) this.groupBox_VirtEnv); - this.Controls.Add((Control) this.singleButton_ResetConfig); - this.Controls.Add((Control) this.singleButton_OK); - this.Controls.Add((Control) this.listView_Speaker); - this.Controls.Add((Control) this.groupBox_VirtApplied); - this.Controls.Add((Control) this.buttonBox_AudioSystemConfig); - this.Controls.Add((Control) this.label_AudioSystemConfig); - this.DoubleBuffered = true; - this.FormBorderStyle = FormBorderStyle.FixedSingle; - this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); - this.MaximizeBox = false; - this.Name = nameof (frmVirtualization); - this.StartPosition = FormStartPosition.CenterScreen; - this.Text = "$VIRTUALIZATION"; - this.groupBox_VirtApplied.ResumeLayout(false); - this.groupBox_VirtApplied.PerformLayout(); - this.groupBox_VirtEnv.ResumeLayout(false); - this.groupBox_VirtEnv.PerformLayout(); - this.contextMenuStrip_SpeakerAngle.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - } + protected override void Dispose(bool disposing) + { + if (disposing && components != null) + components.Dispose(); + base.Dispose(disposing); + } - public void SetBaseSystemParam( - RuntimeUtils.ConfigProxy._ParamOfBaseSystem paramSystem) - { - this.m_paramSystem = paramSystem; - int num1 = this.m_paramSystem.m_bVirtApplied & 1; - int num2 = this.m_paramSystem.m_bVirtApplied >> 1 & 1; - int num3 = this.m_paramSystem.m_bVirtApplied >> 2 & 1; - if (num1 == 1) - this.checkBox_MusicMode.Checked = true; - if (num2 == 1) - this.checkBox_MovieMode.Checked = true; - if (num3 == 1) - this.checkBox_Freestyle.Checked = true; - this.onOffSwitch_EnvRealize.SwitchedOn = this.m_paramSystem.m_bEnvRealizeEnabled == 1; - this.hSlider_EnvRealizeDrySignal.PositionFloat = this.m_paramSystem.m_rEnvRealizeDrySignal; - this.twoSelector_PrePostProcess.Selector = this.m_paramSystem.m_bEnvRealizePreprocess != 1 ? TwoSelector.SelectorPosition.SELECTOR_ON_RIGHT : TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; - for (int index = 0; index < this.comboBox_EnvRealizePreset.Items.Count; ++index) - { - if ((this.comboBox_EnvRealizePreset.Items[index] as frmVirtualization.EnvRealizePreset).PresetID == this.m_paramSystem.m_nEnvRealizePreset) + private void InitializeComponent() { - this.comboBox_EnvRealizePreset.SelectedIndex = index; - break; + components = new Container(); + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmVirtualization)); + label_AudioSystemConfig = new Label(); + groupBox_VirtApplied = new GroupBox(); + checkBox_Freestyle = new CheckBox(); + checkBox_MovieMode = new CheckBox(); + checkBox_MusicMode = new CheckBox(); + ListView_Speaker = new ListView(); + columnHeader_Speaker = new ColumnHeader(); + columnHeader_Angle = new ColumnHeader(); + groupBox_VirtEnv = new GroupBox(); + label_PrePostProcess = new Label(); + comboBox_EnvRealizePreset = new ComboBox(); + ContextMenuStrip_SpeakerAngle = new ContextMenuStrip(components); + ToolStripMenuItem_SpeakerAngle = new ToolStripMenuItem(); + ToolStripSeparator_Angle = new ToolStripSeparator(); + ToolStripComboBox_SpeakerAngle = new ToolStripComboBox(); + SingleButton_Cancel = new SingleButton(); + twoSelector_PrePostProcess = new TwoSelector(); + hSlider_EnvRealizeDrySignal = new HSlider(); + onOffSwitch_EnvRealize = new OnOffSwitch(); + SingleButton_ResetConfig = new SingleButton(); + SingleButton_OK = new SingleButton(); + ButtonBox_AudioSystemConfig = new ButtonBox(); + groupBox_VirtApplied.SuspendLayout(); + groupBox_VirtEnv.SuspendLayout(); + ContextMenuStrip_SpeakerAngle.SuspendLayout(); + SuspendLayout(); + label_AudioSystemConfig.AutoSize = true; + label_AudioSystemConfig.Location = new Point(12, 17); + label_AudioSystemConfig.Name = "label_AudioSystemConfig"; + label_AudioSystemConfig.Size = new Size(125, 12); + label_AudioSystemConfig.TabIndex = 0; + label_AudioSystemConfig.Text = "$AUDIO_SYSTEM_CONFIG"; + groupBox_VirtApplied.Controls.Add(checkBox_Freestyle); + groupBox_VirtApplied.Controls.Add(checkBox_MovieMode); + groupBox_VirtApplied.Controls.Add(checkBox_MusicMode); + groupBox_VirtApplied.Location = new Point(151, 292); + groupBox_VirtApplied.Name = "groupBox_VirtApplied"; + groupBox_VirtApplied.Size = new Size(167, 88); + groupBox_VirtApplied.TabIndex = 2; + groupBox_VirtApplied.TabStop = false; + groupBox_VirtApplied.Text = "$VIRT_APPLIED"; + checkBox_Freestyle.AutoSize = true; + checkBox_Freestyle.Location = new Point(16, 64); + checkBox_Freestyle.Name = "checkBox_Freestyle"; + checkBox_Freestyle.Size = new Size(114, 16); + checkBox_Freestyle.TabIndex = 5; + checkBox_Freestyle.Text = "$FREESTYLE_MODE"; + checkBox_Freestyle.UseVisualStyleBackColor = true; + checkBox_MovieMode.AutoSize = true; + checkBox_MovieMode.Location = new Point(16, 42); + checkBox_MovieMode.Name = "checkBox_MovieMode"; + checkBox_MovieMode.Size = new Size(90, 16); + checkBox_MovieMode.TabIndex = 4; + checkBox_MovieMode.Text = "$MOVIE_MODE"; + checkBox_MovieMode.UseVisualStyleBackColor = true; + checkBox_MusicMode.AutoSize = true; + checkBox_MusicMode.Location = new Point(16, 20); + checkBox_MusicMode.Name = "checkBox_MusicMode"; + checkBox_MusicMode.Size = new Size(90, 16); + checkBox_MusicMode.TabIndex = 3; + checkBox_MusicMode.Text = "$MUSIC_MODE"; + checkBox_MusicMode.UseVisualStyleBackColor = true; + ListView_Speaker.Columns.AddRange(new ColumnHeader[2] + { + columnHeader_Speaker, + columnHeader_Angle + }); + ListView_Speaker.FullRowSelect = true; + ListView_Speaker.GridLines = true; + ListView_Speaker.HeaderStyle = ColumnHeaderStyle.Nonclickable; + ListView_Speaker.HideSelection = false; + ListView_Speaker.Location = new Point(151, 71); + ListView_Speaker.MultiSelect = false; + ListView_Speaker.Name = "ListView_Speaker"; + ListView_Speaker.Size = new Size(167, 215); + ListView_Speaker.TabIndex = 3; + ListView_Speaker.UseCompatibleStateImageBehavior = false; + ListView_Speaker.View = View.Details; + ListView_Speaker.MouseUp += new MouseEventHandler(ListView_Speaker_MouseUp); + columnHeader_Speaker.Text = "$VIRT_SPEAKER"; + columnHeader_Speaker.Width = 95; + columnHeader_Angle.Text = "$VIRT_SPEAKER_ANGLE"; + groupBox_VirtEnv.Controls.Add(twoSelector_PrePostProcess); + groupBox_VirtEnv.Controls.Add(label_PrePostProcess); + groupBox_VirtEnv.Controls.Add(hSlider_EnvRealizeDrySignal); + groupBox_VirtEnv.Controls.Add(comboBox_EnvRealizePreset); + groupBox_VirtEnv.Controls.Add(onOffSwitch_EnvRealize); + groupBox_VirtEnv.Location = new Point(324, 36); + groupBox_VirtEnv.Name = "groupBox_VirtEnv"; + groupBox_VirtEnv.Size = new Size(222, 106); + groupBox_VirtEnv.TabIndex = 5; + groupBox_VirtEnv.TabStop = false; + groupBox_VirtEnv.Text = "$VIRTUAL_ENVIRONMENT"; + label_PrePostProcess.AutoSize = true; + label_PrePostProcess.Location = new Point(6, 79); + label_PrePostProcess.Name = "label_PrePostProcess"; + label_PrePostProcess.Size = new Size(107, 12); + label_PrePostProcess.TabIndex = 3; + label_PrePostProcess.Text = "$PRE_POST_PROCESS"; + comboBox_EnvRealizePreset.DropDownStyle = ComboBoxStyle.DropDownList; + comboBox_EnvRealizePreset.FormattingEnabled = true; + comboBox_EnvRealizePreset.Location = new Point(6, 20); + comboBox_EnvRealizePreset.Name = "comboBox_EnvRealizePreset"; + comboBox_EnvRealizePreset.Size = new Size(210, 20); + comboBox_EnvRealizePreset.TabIndex = 1; + ContextMenuStrip_SpeakerAngle.Items.AddRange(new ToolStripItem[3] + { + ToolStripMenuItem_SpeakerAngle, + ToolStripSeparator_Angle, + ToolStripComboBox_SpeakerAngle + }); + ContextMenuStrip_SpeakerAngle.Name = "ContextMenuStrip_SpeakerAngle"; + ContextMenuStrip_SpeakerAngle.Size = new Size(182, 61); + ContextMenuStrip_SpeakerAngle.Closed += new ToolStripDropDownClosedEventHandler(ContextMenuStrip_SpeakerAngle_Closed); + ToolStripMenuItem_SpeakerAngle.Enabled = false; + ToolStripMenuItem_SpeakerAngle.Name = "ToolStripMenuItem_SpeakerAngle"; + ToolStripMenuItem_SpeakerAngle.Size = new Size(181, 22); + ToolStripMenuItem_SpeakerAngle.Text = "$SPEAKER_ANGLE"; + ToolStripSeparator_Angle.Name = "ToolStripSeparator_Angle"; + ToolStripSeparator_Angle.Size = new Size(178, 6); + ToolStripComboBox_SpeakerAngle.DropDownStyle = ComboBoxStyle.DropDownList; + ToolStripComboBox_SpeakerAngle.Name = "ToolStripComboBox_SpeakerAngle"; + ToolStripComboBox_SpeakerAngle.Size = new Size(121, 25); + ToolStripComboBox_SpeakerAngle.SelectedIndexChanged += new EventHandler(ToolStripComboBox_SpeakerAngle_SelectedIndexChanged); + SingleButton_Cancel.BackColor = SystemColors.Control; + SingleButton_Cancel.ButtonText = "$CANCEL"; + SingleButton_Cancel.Location = new Point(446, 347); + SingleButton_Cancel.Name = "SingleButton_Cancel"; + SingleButton_Cancel.Size = new Size(100, 33); + SingleButton_Cancel.TabIndex = 8; + SingleButton_Cancel.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_Cancel_ButtonClickNotify); + twoSelector_PrePostProcess.BackColor = Color.Transparent; + twoSelector_PrePostProcess.CurrentObject = null; + twoSelector_PrePostProcess.LeftObject = null; + twoSelector_PrePostProcess.Location = new Point(146, 74); + twoSelector_PrePostProcess.Name = "twoSelector_PrePostProcess"; + twoSelector_PrePostProcess.RightObject = null; + twoSelector_PrePostProcess.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; + twoSelector_PrePostProcess.Size = new Size(70, 22); + twoSelector_PrePostProcess.TabIndex = 9; + hSlider_EnvRealizeDrySignal.BackColor = SystemColors.Control; + hSlider_EnvRealizeDrySignal.Location = new Point(68, 48); + hSlider_EnvRealizeDrySignal.MoveDelta = 1U; + hSlider_EnvRealizeDrySignal.Name = "hSlider_EnvRealizeDrySignal"; + hSlider_EnvRealizeDrySignal.Position = 0U; + hSlider_EnvRealizeDrySignal.PositionFloat = 0.0f; + hSlider_EnvRealizeDrySignal.Size = new Size(148, 20); + hSlider_EnvRealizeDrySignal.TabIndex = 2; + onOffSwitch_EnvRealize.BackColor = Color.Transparent; + onOffSwitch_EnvRealize.Location = new Point(6, 46); + onOffSwitch_EnvRealize.Name = "onOffSwitch_EnvRealize"; + onOffSwitch_EnvRealize.Size = new Size(53, 22); + onOffSwitch_EnvRealize.SwitchedOn = false; + onOffSwitch_EnvRealize.TabIndex = 0; + SingleButton_ResetConfig.BackColor = SystemColors.Control; + SingleButton_ResetConfig.ButtonText = "$VIRT_RESET"; + SingleButton_ResetConfig.Location = new Point(151, 36); + SingleButton_ResetConfig.Name = "SingleButton_ResetConfig"; + SingleButton_ResetConfig.Size = new Size(167, 26); + SingleButton_ResetConfig.TabIndex = 4; + SingleButton_ResetConfig.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_ResetConfig_ButtonClickNotify); + SingleButton_OK.BackColor = SystemColors.Control; + SingleButton_OK.ButtonText = "$OK"; + SingleButton_OK.Location = new Point(324, 347); + SingleButton_OK.Name = "SingleButton_OK"; + SingleButton_OK.Size = new Size(100, 33); + SingleButton_OK.TabIndex = 6; + SingleButton_OK.ButtonClickNotify += new SingleButton.ButtonClickEventDelegate(SingleButton_OK_ButtonClickNotify); + ButtonBox_AudioSystemConfig.BackColor = SystemColors.Control; + ButtonBox_AudioSystemConfig.Location = new Point(14, 36); + ButtonBox_AudioSystemConfig.Name = "ButtonBox_AudioSystemConfig"; + ButtonBox_AudioSystemConfig.Size = new Size(131, 344); + ButtonBox_AudioSystemConfig.TabIndex = 1; + ButtonBox_AudioSystemConfig.ItemSelectedNotify += new ButtonBox.ItemSelectDelegate(ButtonBox_AudioSystemConfig_ItemSelectedNotify); + AutoScaleDimensions = new SizeF(6f, 12f); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(562, 394); + Controls.Add(SingleButton_Cancel); + Controls.Add(groupBox_VirtEnv); + Controls.Add(SingleButton_ResetConfig); + Controls.Add(SingleButton_OK); + Controls.Add(ListView_Speaker); + Controls.Add(groupBox_VirtApplied); + Controls.Add(ButtonBox_AudioSystemConfig); + Controls.Add(label_AudioSystemConfig); + DoubleBuffered = true; + FormBorderStyle = FormBorderStyle.FixedSingle; + Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); + MaximizeBox = false; + Name = nameof(FrmVirtualization); + StartPosition = FormStartPosition.CenterScreen; + Text = "$VIRTUALIZATION"; + groupBox_VirtApplied.ResumeLayout(false); + groupBox_VirtApplied.PerformLayout(); + groupBox_VirtEnv.ResumeLayout(false); + groupBox_VirtEnv.PerformLayout(); + ContextMenuStrip_SpeakerAngle.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); } - } - } - public RuntimeUtils.ConfigProxy._ParamOfBaseSystem GetBaseSystemParam() - { - int num1 = 0; - int num2 = 0; - int num3 = 0; - if (this.checkBox_MusicMode.Checked) - num1 = 1; - if (this.checkBox_MovieMode.Checked) - num2 = 1; - if (this.checkBox_Freestyle.Checked) - num3 = 1; - this.m_paramSystem.m_bVirtApplied = num1 | num2 << 1 | num3 << 2; - this.m_paramSystem.m_bEnvRealizeEnabled = !this.onOffSwitch_EnvRealize.SwitchedOn ? 0 : 1; - this.m_paramSystem.m_bEnvRealizePreprocess = this.twoSelector_PrePostProcess.Selector != TwoSelector.SelectorPosition.SELECTOR_ON_LEFT ? 0 : 1; - this.m_paramSystem.m_rEnvRealizeDrySignal = this.hSlider_EnvRealizeDrySignal.PositionFloat; - if (this.comboBox_EnvRealizePreset.SelectedItem == null) - this.m_paramSystem.m_bEnvRealizeEnabled = 0; - else if (this.comboBox_EnvRealizePreset.SelectedItem.GetType() != typeof (frmVirtualization.EnvRealizePreset)) - this.m_paramSystem.m_bEnvRealizeEnabled = 0; - else - this.m_paramSystem.m_nEnvRealizePreset = (this.comboBox_EnvRealizePreset.SelectedItem as frmVirtualization.EnvRealizePreset).PresetID; - return this.m_paramSystem; - } + public void SetBaseSystemParam( + RuntimeUtils.ConfigProxy.ParamOfBaseSystem paramSystem) + { + m_paramSystem = paramSystem; + int num1 = m_paramSystem.m_bVirtApplied & 1; + int num2 = m_paramSystem.m_bVirtApplied >> 1 & 1; + int num3 = m_paramSystem.m_bVirtApplied >> 2 & 1; + if (num1 == 1) + checkBox_MusicMode.Checked = true; + if (num2 == 1) + checkBox_MovieMode.Checked = true; + if (num3 == 1) + checkBox_Freestyle.Checked = true; + onOffSwitch_EnvRealize.SwitchedOn = m_paramSystem.m_bEnvRealizeEnabled == 1; + hSlider_EnvRealizeDrySignal.PositionFloat = m_paramSystem.m_rEnvRealizeDrySignal; + twoSelector_PrePostProcess.Selector = m_paramSystem.m_bEnvRealizePreprocess != 1 ? TwoSelector.SelectorPosition.SELECTOR_ON_RIGHT : TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; + for (int index = 0; index < comboBox_EnvRealizePreset.Items.Count; ++index) + { + if ((comboBox_EnvRealizePreset.Items[index] as EnvRealizePreset).PresetID == m_paramSystem.m_nEnvRealizePreset) + { + comboBox_EnvRealizePreset.SelectedIndex = index; + break; + } + } + } - public frmVirtualization() - { - Parameters.LoadDefaultParameter(ref this.m_paramSystem); - this.m_nCurrentAudioSystem = -1; - this.InitializeComponent(); - this.Text = GlobalMessages.VIRTUALIZATION; - this.label_AudioSystemConfig.Text = GlobalMessages.AUDIO_SYSTEM_CONFIG; - this.singleButton_ResetConfig.ButtonText = GlobalMessages.VIRT_RESET; - this.groupBox_VirtApplied.Text = GlobalMessages.VIRT_APPLIED; - this.checkBox_MusicMode.Text = GlobalMessages.MUSIC_MODE; - this.checkBox_MovieMode.Text = GlobalMessages.MOVIE_MODE; - this.checkBox_Freestyle.Text = GlobalMessages.FREESTYLE_MODE; - this.groupBox_VirtEnv.Text = GlobalMessages.VIRT_ENVIRONMENT; - this.label_PrePostProcess.Text = GlobalMessages.VIRT_PREPOST_PROCESS; - this.singleButton_OK.ButtonText = GlobalMessages.OK; - this.singleButton_Cancel.ButtonText = GlobalMessages.CANCEL; - this.buttonBox_AudioSystemConfig.ClearItem(); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_MONO, (object) "0")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_STEREO, (object) "1")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_HEADSET, (object) "2")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_REARSTEREO, (object) "3")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_QUAD, (object) "4")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X5P1, (object) "5")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X6P1, (object) "6")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X7P1, (object) "7")); - this.buttonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X8P1, (object) "8")); - this.listView_Speaker.Columns[0].Text = GlobalMessages.VIRT_SPEAKER; - this.listView_Speaker.Columns[1].Text = GlobalMessages.VIRT_SPEAKER_ANGLE; - this.listView_Speaker.Items.Clear(); - this.checkBox_MusicMode.Checked = false; - this.checkBox_MovieMode.Checked = false; - this.checkBox_Freestyle.Checked = false; - this.onOffSwitch_EnvRealize.SwitchedOn = false; - this.hSlider_EnvRealizeDrySignal.PositionFloat = 0.7f; - this.twoSelector_PrePostProcess.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; - this.comboBox_EnvRealizePreset.Items.Clear(); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_SMALLROOM, 2)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_BATHROOM, 3)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_LIVINGROOM, 4)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_STONEROOM, 5)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_AUDITORIUM, 6)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_CONCERTHALL, 7)); - this.comboBox_EnvRealizePreset.Items.Add((object) new frmVirtualization.EnvRealizePreset(GlobalMessages.VIRT_ENVIR_HALLWAY, 12)); - this.toolStripMenuItem_SpeakerAngle.Text = GlobalMessages.VIRT_SPEAKER_ANGLE; - this.toolStripComboBox_SpeakerAngle.Items.Clear(); - for (int fAngle = -180; fAngle <= 180; fAngle += 10) - this.toolStripComboBox_SpeakerAngle.Items.Add((object) new frmVirtualization.SpeakerAngle((float) fAngle)); - } + public RuntimeUtils.ConfigProxy.ParamOfBaseSystem GetBaseSystemParam() + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + if (checkBox_MusicMode.Checked) + num1 = 1; + if (checkBox_MovieMode.Checked) + num2 = 1; + if (checkBox_Freestyle.Checked) + num3 = 1; + m_paramSystem.m_bVirtApplied = num1 | num2 << 1 | num3 << 2; + m_paramSystem.m_bEnvRealizeEnabled = !onOffSwitch_EnvRealize.SwitchedOn ? 0 : 1; + m_paramSystem.m_bEnvRealizePreprocess = twoSelector_PrePostProcess.Selector != TwoSelector.SelectorPosition.SELECTOR_ON_LEFT ? 0 : 1; + m_paramSystem.m_rEnvRealizeDrySignal = hSlider_EnvRealizeDrySignal.PositionFloat; + if (comboBox_EnvRealizePreset.SelectedItem == null) + m_paramSystem.m_bEnvRealizeEnabled = 0; + else if (comboBox_EnvRealizePreset.SelectedItem.GetType() != typeof(EnvRealizePreset)) + m_paramSystem.m_bEnvRealizeEnabled = 0; + else + m_paramSystem.m_nEnvRealizePreset = (comboBox_EnvRealizePreset.SelectedItem as EnvRealizePreset).PresetID; + return m_paramSystem; + } - private string FormatAngleString(float fAngle) => (double) fAngle >= 0.0 ? "+" + fAngle.ToString("F01") : fAngle.ToString("F01"); + public FrmVirtualization() + { + Parameters.LoadDefaultParameter(ref m_paramSystem); + m_nCurrentAudioSystem = -1; + InitializeComponent(); + Text = GlobalMessages.VIRTUALIZATION; + label_AudioSystemConfig.Text = GlobalMessages.AUDIO_SYSTEM_CONFIG; + SingleButton_ResetConfig.ButtonText = GlobalMessages.VIRT_RESET; + groupBox_VirtApplied.Text = GlobalMessages.VIRT_APPLIED; + checkBox_MusicMode.Text = GlobalMessages.MUSIC_MODE; + checkBox_MovieMode.Text = GlobalMessages.MOVIE_MODE; + checkBox_Freestyle.Text = GlobalMessages.FREESTYLE_MODE; + groupBox_VirtEnv.Text = GlobalMessages.VIRT_ENVIRONMENT; + label_PrePostProcess.Text = GlobalMessages.VIRT_PREPOST_PROCESS; + SingleButton_OK.ButtonText = GlobalMessages.OK; + SingleButton_Cancel.ButtonText = GlobalMessages.CANCEL; + ButtonBox_AudioSystemConfig.ClearItem(); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_MONO, "0")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_STEREO, "1")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_HEADSET, "2")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_REARSTEREO, "3")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_QUAD, "4")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X5P1, "5")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X6P1, "6")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X7P1, "7")); + ButtonBox_AudioSystemConfig.AddItem(new ButtonBox.Item(GlobalMessages.AUDIO_SYSTEM_X8P1, "8")); + ListView_Speaker.Columns[0].Text = GlobalMessages.VIRT_SPEAKER; + ListView_Speaker.Columns[1].Text = GlobalMessages.VIRT_SPEAKER_ANGLE; + ListView_Speaker.Items.Clear(); + checkBox_MusicMode.Checked = false; + checkBox_MovieMode.Checked = false; + checkBox_Freestyle.Checked = false; + onOffSwitch_EnvRealize.SwitchedOn = false; + hSlider_EnvRealizeDrySignal.PositionFloat = 0.7f; + twoSelector_PrePostProcess.Selector = TwoSelector.SelectorPosition.SELECTOR_ON_LEFT; + comboBox_EnvRealizePreset.Items.Clear(); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_SMALLROOM, 2)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_BATHROOM, 3)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_LIVINGROOM, 4)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_STONEROOM, 5)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_AUDITORIUM, 6)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_CONCERTHALL, 7)); + comboBox_EnvRealizePreset.Items.Add(new EnvRealizePreset(GlobalMessages.VIRT_ENVIR_HALLWAY, 12)); + ToolStripMenuItem_SpeakerAngle.Text = GlobalMessages.VIRT_SPEAKER_ANGLE; + ToolStripComboBox_SpeakerAngle.Items.Clear(); + for (int fAngle = -180; fAngle <= 180; fAngle += 10) + ToolStripComboBox_SpeakerAngle.Items.Add(new SpeakerAngle(fAngle)); + } - private void RefreshSpeakerList() - { - this.listView_Speaker.Items.Clear(); - switch (this.m_nCurrentAudioSystem) - { - case 0: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + private string FormatAngleString(float fAngle) + { + return (double)fAngle >= 0.0 ? "+" + fAngle.ToString("F01") : fAngle.ToString("F01"); + } + + private void RefreshSpeakerList() + { + ListView_Speaker.Items.Clear(); + switch (m_nCurrentAudioSystem) + { + case 0: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_00[0]) - })); - break; - case 1: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_00[0]) + })); + break; + case 1: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_01[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_01[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_01[1]) - })); - break; - case 2: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_01[1]) + })); + break; + case 2: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_02[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_02[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_02[1]) - })); - break; - case 3: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_02[1]) + })); + break; + case 3: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_03[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_03[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_03[1]) - })); - break; - case 4: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_03[1]) + })); + break; + case 4: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_04[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_04[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_04[1]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_04[1]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_04[2]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_04[2]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_04[3]) - })); - break; - case 5: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_04[3]) + })); + break; + case 5: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[1]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[1]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[2]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[2]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_LFE, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[3]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[3]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[4]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[4]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_05[5]) - })); - break; - case 6: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_05[5]) + })); + break; + case 6: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[1]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[1]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[2]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[2]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_LFE, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[3]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[3]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[4]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[4]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDELEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[5]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[5]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDERIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_06[6]) - })); - break; - case 7: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_06[6]) + })); + break; + case 7: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[1]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[1]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[2]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[2]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_LFE, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[3]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[3]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[4]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[4]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[5]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[5]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDELEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[7]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[7]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDERIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_07[7]) - })); - break; - case 8: - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_07[7]) + })); + break; + case 8: + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[0]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[0]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[1]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[1]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_FRONTCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[2]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[2]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_LFE, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[3]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[3]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKLEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[4]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[4]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKRIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[5]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[5]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_BACKCENTER, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[6]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[6]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDELEFT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[7]) - })); - this.listView_Speaker.Items.Add(new ListViewItem(new string[2] - { + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[7]) + })); + ListView_Speaker.Items.Add(new ListViewItem(new string[2] + { GlobalMessages.VIRT_SPEAKER_SIDERIGHT, - this.FormatAngleString(this.m_paramSystem.m_rpChannelAngle_08[8]) - })); - break; - } - } + FormatAngleString(m_paramSystem.m_rpChannelAngle_08[8]) + })); + break; + } + } - private void buttonBox_AudioSystemConfig_ItemSelectedNotify( - ButtonBox.Item itPrevItem, - ButtonBox.Item itCurrItem, - ButtonBox objSender) - { - if (itCurrItem == null || itCurrItem.Tag == null || itCurrItem.Tag.GetType() != typeof (string)) - return; - string tag = itCurrItem.Tag as string; - if (string.IsNullOrEmpty(tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result) || result < 0 || result > 8) - return; - this.m_nCurrentAudioSystem = result; - this.RefreshSpeakerList(); - } + private void ButtonBox_AudioSystemConfig_ItemSelectedNotify( + ButtonBox.Item itPrevItem, + ButtonBox.Item itCurrItem, + ButtonBox objSender) + { + if (itCurrItem == null || itCurrItem.Tag == null || itCurrItem.Tag.GetType() != typeof(string)) + return; + string tag = itCurrItem.Tag as string; + if (string.IsNullOrEmpty(tag)) + return; + if (!int.TryParse(tag, out int result) || result < 0 || result > 8) + return; + m_nCurrentAudioSystem = result; + RefreshSpeakerList(); + } - private void singleButton_ResetConfig_ButtonClickNotify(SingleButton objSender) - { - this.m_paramSystem.m_rpChannelAngle_00 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_01 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_02 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_03 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_04 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_05 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_06 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_07 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_08 = new float[9]; - this.m_paramSystem.m_rpChannelAngle_00[0] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_01[0] = -30f; - this.m_paramSystem.m_rpChannelAngle_01[1] = 30f; - this.m_paramSystem.m_rpChannelAngle_02[0] = -90f; - this.m_paramSystem.m_rpChannelAngle_02[1] = 90f; - this.m_paramSystem.m_rpChannelAngle_03[0] = -150f; - this.m_paramSystem.m_rpChannelAngle_03[1] = 150f; - this.m_paramSystem.m_rpChannelAngle_04[0] = -45f; - this.m_paramSystem.m_rpChannelAngle_04[1] = 45f; - this.m_paramSystem.m_rpChannelAngle_04[2] = -135f; - this.m_paramSystem.m_rpChannelAngle_04[3] = 135f; - this.m_paramSystem.m_rpChannelAngle_05[0] = -30f; - this.m_paramSystem.m_rpChannelAngle_05[1] = 30f; - this.m_paramSystem.m_rpChannelAngle_05[2] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_05[3] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_05[4] = -110f; - this.m_paramSystem.m_rpChannelAngle_05[5] = 110f; - this.m_paramSystem.m_rpChannelAngle_06[0] = -30f; - this.m_paramSystem.m_rpChannelAngle_06[1] = 30f; - this.m_paramSystem.m_rpChannelAngle_06[2] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_06[3] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_06[4] = 180f; - this.m_paramSystem.m_rpChannelAngle_06[5] = -90f; - this.m_paramSystem.m_rpChannelAngle_06[6] = 90f; - this.m_paramSystem.m_rpChannelAngle_07[0] = -30f; - this.m_paramSystem.m_rpChannelAngle_07[1] = 30f; - this.m_paramSystem.m_rpChannelAngle_07[2] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_07[3] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_07[4] = -150f; - this.m_paramSystem.m_rpChannelAngle_07[5] = 150f; - this.m_paramSystem.m_rpChannelAngle_07[6] = -90f; - this.m_paramSystem.m_rpChannelAngle_07[7] = 90f; - this.m_paramSystem.m_rpChannelAngle_08[0] = -30f; - this.m_paramSystem.m_rpChannelAngle_08[1] = 30f; - this.m_paramSystem.m_rpChannelAngle_08[2] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_08[3] = 0.0f; - this.m_paramSystem.m_rpChannelAngle_08[4] = -150f; - this.m_paramSystem.m_rpChannelAngle_08[5] = 150f; - this.m_paramSystem.m_rpChannelAngle_08[6] = 180f; - this.m_paramSystem.m_rpChannelAngle_08[7] = -90f; - this.m_paramSystem.m_rpChannelAngle_08[8] = 90f; - this.RefreshSpeakerList(); - } + private void SingleButton_ResetConfig_ButtonClickNotify(SingleButton objSender) + { + m_paramSystem.m_rpChannelAngle_00 = new float[9]; + m_paramSystem.m_rpChannelAngle_01 = new float[9]; + m_paramSystem.m_rpChannelAngle_02 = new float[9]; + m_paramSystem.m_rpChannelAngle_03 = new float[9]; + m_paramSystem.m_rpChannelAngle_04 = new float[9]; + m_paramSystem.m_rpChannelAngle_05 = new float[9]; + m_paramSystem.m_rpChannelAngle_06 = new float[9]; + m_paramSystem.m_rpChannelAngle_07 = new float[9]; + m_paramSystem.m_rpChannelAngle_08 = new float[9]; + m_paramSystem.m_rpChannelAngle_00[0] = 0.0f; + m_paramSystem.m_rpChannelAngle_01[0] = -30f; + m_paramSystem.m_rpChannelAngle_01[1] = 30f; + m_paramSystem.m_rpChannelAngle_02[0] = -90f; + m_paramSystem.m_rpChannelAngle_02[1] = 90f; + m_paramSystem.m_rpChannelAngle_03[0] = -150f; + m_paramSystem.m_rpChannelAngle_03[1] = 150f; + m_paramSystem.m_rpChannelAngle_04[0] = -45f; + m_paramSystem.m_rpChannelAngle_04[1] = 45f; + m_paramSystem.m_rpChannelAngle_04[2] = -135f; + m_paramSystem.m_rpChannelAngle_04[3] = 135f; + m_paramSystem.m_rpChannelAngle_05[0] = -30f; + m_paramSystem.m_rpChannelAngle_05[1] = 30f; + m_paramSystem.m_rpChannelAngle_05[2] = 0.0f; + m_paramSystem.m_rpChannelAngle_05[3] = 0.0f; + m_paramSystem.m_rpChannelAngle_05[4] = -110f; + m_paramSystem.m_rpChannelAngle_05[5] = 110f; + m_paramSystem.m_rpChannelAngle_06[0] = -30f; + m_paramSystem.m_rpChannelAngle_06[1] = 30f; + m_paramSystem.m_rpChannelAngle_06[2] = 0.0f; + m_paramSystem.m_rpChannelAngle_06[3] = 0.0f; + m_paramSystem.m_rpChannelAngle_06[4] = 180f; + m_paramSystem.m_rpChannelAngle_06[5] = -90f; + m_paramSystem.m_rpChannelAngle_06[6] = 90f; + m_paramSystem.m_rpChannelAngle_07[0] = -30f; + m_paramSystem.m_rpChannelAngle_07[1] = 30f; + m_paramSystem.m_rpChannelAngle_07[2] = 0.0f; + m_paramSystem.m_rpChannelAngle_07[3] = 0.0f; + m_paramSystem.m_rpChannelAngle_07[4] = -150f; + m_paramSystem.m_rpChannelAngle_07[5] = 150f; + m_paramSystem.m_rpChannelAngle_07[6] = -90f; + m_paramSystem.m_rpChannelAngle_07[7] = 90f; + m_paramSystem.m_rpChannelAngle_08[0] = -30f; + m_paramSystem.m_rpChannelAngle_08[1] = 30f; + m_paramSystem.m_rpChannelAngle_08[2] = 0.0f; + m_paramSystem.m_rpChannelAngle_08[3] = 0.0f; + m_paramSystem.m_rpChannelAngle_08[4] = -150f; + m_paramSystem.m_rpChannelAngle_08[5] = 150f; + m_paramSystem.m_rpChannelAngle_08[6] = 180f; + m_paramSystem.m_rpChannelAngle_08[7] = -90f; + m_paramSystem.m_rpChannelAngle_08[8] = 90f; + RefreshSpeakerList(); + } - private void listView_Speaker_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Right || this.m_nCurrentAudioSystem < 0 || this.listView_Speaker.SelectedItems.Count != 1) - return; - float[] numArray = (float[]) null; - int num1 = -1; - switch (this.m_nCurrentAudioSystem) - { - case 0: - numArray = this.m_paramSystem.m_rpChannelAngle_00; - num1 = 1; - break; - case 1: - numArray = this.m_paramSystem.m_rpChannelAngle_01; - num1 = 2; - break; - case 2: - numArray = this.m_paramSystem.m_rpChannelAngle_02; - num1 = 2; - break; - case 3: - numArray = this.m_paramSystem.m_rpChannelAngle_03; - num1 = 2; - break; - case 4: - numArray = this.m_paramSystem.m_rpChannelAngle_04; - num1 = 4; - break; - case 5: - numArray = this.m_paramSystem.m_rpChannelAngle_05; - num1 = 6; - break; - case 6: - numArray = this.m_paramSystem.m_rpChannelAngle_06; - num1 = 7; - break; - case 7: - numArray = this.m_paramSystem.m_rpChannelAngle_07; - num1 = 8; - break; - case 8: - numArray = this.m_paramSystem.m_rpChannelAngle_08; - num1 = 9; - break; - } - if (numArray == null) - return; - int index1 = this.listView_Speaker.SelectedItems[0].Index; - if (index1 >= num1) - return; - float num2 = numArray[index1]; - int num3 = -1; - for (int index2 = 0; index2 < this.toolStripComboBox_SpeakerAngle.Items.Count; ++index2) - { - frmVirtualization.SpeakerAngle speakerAngle = this.toolStripComboBox_SpeakerAngle.Items[index2] as frmVirtualization.SpeakerAngle; - if ((double) speakerAngle.AngleFloat == (double) num2) + private void ListView_Speaker_MouseUp(object sender, MouseEventArgs e) { - num3 = index2; - break; + if (e.Button != MouseButtons.Right || m_nCurrentAudioSystem < 0 || ListView_Speaker.SelectedItems.Count != 1) + return; + float[] numArray = null; + int num1 = -1; + switch (m_nCurrentAudioSystem) + { + case 0: + numArray = m_paramSystem.m_rpChannelAngle_00; + num1 = 1; + break; + case 1: + numArray = m_paramSystem.m_rpChannelAngle_01; + num1 = 2; + break; + case 2: + numArray = m_paramSystem.m_rpChannelAngle_02; + num1 = 2; + break; + case 3: + numArray = m_paramSystem.m_rpChannelAngle_03; + num1 = 2; + break; + case 4: + numArray = m_paramSystem.m_rpChannelAngle_04; + num1 = 4; + break; + case 5: + numArray = m_paramSystem.m_rpChannelAngle_05; + num1 = 6; + break; + case 6: + numArray = m_paramSystem.m_rpChannelAngle_06; + num1 = 7; + break; + case 7: + numArray = m_paramSystem.m_rpChannelAngle_07; + num1 = 8; + break; + case 8: + numArray = m_paramSystem.m_rpChannelAngle_08; + num1 = 9; + break; + } + if (numArray == null) + return; + int index1 = ListView_Speaker.SelectedItems[0].Index; + if (index1 >= num1) + return; + float num2 = numArray[index1]; + int num3 = -1; + for (int index2 = 0; index2 < ToolStripComboBox_SpeakerAngle.Items.Count; ++index2) + { + SpeakerAngle speakerAngle = ToolStripComboBox_SpeakerAngle.Items[index2] as SpeakerAngle; + if ((double)speakerAngle.AngleFloat == (double)num2) + { + num3 = index2; + break; + } + if ((double)speakerAngle.AngleFloat == 0.0) + num3 = index2; + } + if (num3 == -1) + return; + ContextMenuStrip_SpeakerAngle.Tag = null; + ToolStripComboBox_SpeakerAngle.SelectedIndex = num3; + ContextMenuStrip_SpeakerAngle.Tag = index1.ToString(); + ContextMenuStrip_SpeakerAngle.Show(ListView_Speaker, e.Location); } - if ((double) speakerAngle.AngleFloat == 0.0) - num3 = index2; - } - if (num3 == -1) - return; - this.contextMenuStrip_SpeakerAngle.Tag = (object) null; - this.toolStripComboBox_SpeakerAngle.SelectedIndex = num3; - this.contextMenuStrip_SpeakerAngle.Tag = (object) index1.ToString(); - this.contextMenuStrip_SpeakerAngle.Show((Control) this.listView_Speaker, e.Location); - } - private void toolStripComboBox_SpeakerAngle_SelectedIndexChanged(object sender, EventArgs e) - { - if (this.m_nCurrentAudioSystem < 0 || this.contextMenuStrip_SpeakerAngle.Tag == null || this.contextMenuStrip_SpeakerAngle.Tag.GetType() != typeof (string)) - return; - string tag = this.contextMenuStrip_SpeakerAngle.Tag as string; - if (string.IsNullOrEmpty(tag)) - return; - int result = -1; - if (!int.TryParse(tag, out result)) - return; - float[] numArray = (float[]) null; - int num = -1; - switch (this.m_nCurrentAudioSystem) - { - case 0: - numArray = this.m_paramSystem.m_rpChannelAngle_00; - num = 1; - break; - case 1: - numArray = this.m_paramSystem.m_rpChannelAngle_01; - num = 2; - break; - case 2: - numArray = this.m_paramSystem.m_rpChannelAngle_02; - num = 2; - break; - case 3: - numArray = this.m_paramSystem.m_rpChannelAngle_03; - num = 2; - break; - case 4: - numArray = this.m_paramSystem.m_rpChannelAngle_04; - num = 4; - break; - case 5: - numArray = this.m_paramSystem.m_rpChannelAngle_05; - num = 6; - break; - case 6: - numArray = this.m_paramSystem.m_rpChannelAngle_06; - num = 7; - break; - case 7: - numArray = this.m_paramSystem.m_rpChannelAngle_07; - num = 8; - break; - case 8: - numArray = this.m_paramSystem.m_rpChannelAngle_08; - num = 9; - break; - } - if (numArray == null || result >= num || this.toolStripComboBox_SpeakerAngle.SelectedItem == null || this.toolStripComboBox_SpeakerAngle.SelectedItem.GetType() != typeof (frmVirtualization.SpeakerAngle)) - return; - frmVirtualization.SpeakerAngle selectedItem = this.toolStripComboBox_SpeakerAngle.SelectedItem as frmVirtualization.SpeakerAngle; - numArray[result] = selectedItem.AngleFloat; - } + private void ToolStripComboBox_SpeakerAngle_SelectedIndexChanged(object sender, EventArgs e) + { + if (m_nCurrentAudioSystem < 0 || ContextMenuStrip_SpeakerAngle.Tag == null || ContextMenuStrip_SpeakerAngle.Tag.GetType() != typeof(string)) + return; + string tag = ContextMenuStrip_SpeakerAngle.Tag as string; + if (string.IsNullOrEmpty(tag)) + return; + if (!int.TryParse(tag, out int result)) + return; + float[] numArray = null; + int num = -1; + switch (m_nCurrentAudioSystem) + { + case 0: + numArray = m_paramSystem.m_rpChannelAngle_00; + num = 1; + break; + case 1: + numArray = m_paramSystem.m_rpChannelAngle_01; + num = 2; + break; + case 2: + numArray = m_paramSystem.m_rpChannelAngle_02; + num = 2; + break; + case 3: + numArray = m_paramSystem.m_rpChannelAngle_03; + num = 2; + break; + case 4: + numArray = m_paramSystem.m_rpChannelAngle_04; + num = 4; + break; + case 5: + numArray = m_paramSystem.m_rpChannelAngle_05; + num = 6; + break; + case 6: + numArray = m_paramSystem.m_rpChannelAngle_06; + num = 7; + break; + case 7: + numArray = m_paramSystem.m_rpChannelAngle_07; + num = 8; + break; + case 8: + numArray = m_paramSystem.m_rpChannelAngle_08; + num = 9; + break; + } + if (numArray == null || result >= num || ToolStripComboBox_SpeakerAngle.SelectedItem == null || ToolStripComboBox_SpeakerAngle.SelectedItem.GetType() != typeof(SpeakerAngle)) + return; + SpeakerAngle selectedItem = ToolStripComboBox_SpeakerAngle.SelectedItem as SpeakerAngle; + numArray[result] = selectedItem.AngleFloat; + } - private void contextMenuStrip_SpeakerAngle_Closed( - object sender, - ToolStripDropDownClosedEventArgs e) - { - this.contextMenuStrip_SpeakerAngle.Tag = (object) null; - this.RefreshSpeakerList(); - } + private void ContextMenuStrip_SpeakerAngle_Closed( + object sender, + ToolStripDropDownClosedEventArgs e) + { + ContextMenuStrip_SpeakerAngle.Tag = null; + RefreshSpeakerList(); + } - private void singleButton_OK_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.OK; + private void SingleButton_OK_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.OK; + } - private void singleButton_Cancel_ButtonClickNotify(SingleButton objSender) => this.DialogResult = DialogResult.Cancel; + private void SingleButton_Cancel_ButtonClickNotify(SingleButton objSender) + { + DialogResult = DialogResult.Cancel; + } - private class EnvRealizePreset - { - private string m_szPresetName = ""; - private int m_nPresetID = -1; + private class EnvRealizePreset + { + private string m_szPresetName = ""; + private readonly int m_nPresetID = -1; - public string PresetName => this.m_szPresetName; + public string PresetName => m_szPresetName; - public string Text - { - get => this.m_szPresetName; - set => this.m_szPresetName = value; - } + public string Text + { + get => m_szPresetName; + set => m_szPresetName = value; + } - public int PresetID => this.m_nPresetID; + public int PresetID => m_nPresetID; - public EnvRealizePreset(string szPresetName, int nPresetID) - { - this.m_szPresetName = szPresetName; - this.m_nPresetID = nPresetID; - } + public EnvRealizePreset(string szPresetName, int nPresetID) + { + m_szPresetName = szPresetName; + m_nPresetID = nPresetID; + } - public override bool Equals(object obj) - { - if (obj == null || obj.GetType() != typeof (frmVirtualization.EnvRealizePreset)) - return false; - frmVirtualization.EnvRealizePreset envRealizePreset = obj as frmVirtualization.EnvRealizePreset; - return envRealizePreset.PresetName == this.m_szPresetName && envRealizePreset.PresetID == this.m_nPresetID; - } + public override bool Equals(object obj) + { + if (obj == null || obj.GetType() != typeof(EnvRealizePreset)) + return false; + EnvRealizePreset envRealizePreset = obj as EnvRealizePreset; + return envRealizePreset.PresetName == m_szPresetName && envRealizePreset.PresetID == m_nPresetID; + } - public override int GetHashCode() => this.m_nPresetID; + public override int GetHashCode() + { + return m_nPresetID; + } - public override string ToString() => this.m_szPresetName; - } + public override string ToString() + { + return m_szPresetName; + } + } - private class SpeakerAngle - { - private float m_fAngle; + private class SpeakerAngle + { + private float m_fAngle; - public string AngleString => (double) this.m_fAngle >= 0.0 ? "+" + this.m_fAngle.ToString("F01") : this.m_fAngle.ToString("F01"); + public string AngleString => m_fAngle >= 0.0 ? "+" + m_fAngle.ToString("F01") : m_fAngle.ToString("F01"); - public float AngleFloat - { - get => this.m_fAngle; - set => this.m_fAngle = value; - } + public float AngleFloat + { + get => m_fAngle; + set => m_fAngle = value; + } - public SpeakerAngle(float fAngle) => this.m_fAngle = fAngle; + public SpeakerAngle(float fAngle) => m_fAngle = fAngle; - public override bool Equals(object obj) => obj != null && obj.GetType() == typeof (frmVirtualization.SpeakerAngle) && (double) (obj as frmVirtualization.SpeakerAngle).AngleFloat == (double) this.m_fAngle; + public override bool Equals(object obj) + { + return obj != null && obj.GetType() == typeof(SpeakerAngle) && (double)(obj as SpeakerAngle).AngleFloat == m_fAngle; + } - public override int GetHashCode() => (int) Math.Round((double) this.m_fAngle); + public override int GetHashCode() + { + return (int)Math.Round(m_fAngle); + } - public override string ToString() => this.AngleString; + public override string ToString() + { + return AngleString; + } + } } - } }