Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit 0c967b9

Browse files
committed
Version 18.2.5
1 parent 5be7110 commit 0c967b9

File tree

13 files changed

+517
-187
lines changed

13 files changed

+517
-187
lines changed

KeppyMIDIConverter/App.config

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<configSections>
44
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
5-
<section name="KeppyMIDIConverter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
5+
<section name="KeppyMIDIConverter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
66
</sectionGroup>
77
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
8-
<section name="KeppyMIDIConverter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
8+
<section name="KeppyMIDIConverter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
99
</sectionGroup>
1010
</configSections>
1111
<startup>
12-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
12+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
1313
</startup>
1414
<runtime>
15-
<gcAllowVeryLargeObjects enabled="true" />
15+
<gcAllowVeryLargeObjects enabled="true"/>
1616
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
1717
<dependentAssembly>
18-
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
19-
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
18+
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
19+
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0"/>
2020
</dependentAssembly>
2121
<dependentAssembly>
22-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
23-
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
22+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
23+
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0"/>
2424
</dependentAssembly>
2525
</assemblyBinding>
2626
</runtime>
@@ -39,13 +39,13 @@
3939
<value>False</value>
4040
</setting>
4141
<setting name="LastExportFolder" serializeAs="String">
42-
<value />
42+
<value/>
4343
</setting>
4444
<setting name="LastMIDIFolder" serializeAs="String">
45-
<value />
45+
<value/>
4646
</setting>
4747
<setting name="LastSoundFontFolder" serializeAs="String">
48-
<value />
48+
<value/>
4949
</setting>
5050
<setting name="LoudMaxEnabled" serializeAs="String">
5151
<value>False</value>
@@ -78,7 +78,7 @@
7878
<value>60</value>
7979
</setting>
8080
<setting name="LastVSTFolder" serializeAs="String">
81-
<value />
81+
<value/>
8282
</setting>
8383
<setting name="NoMoreDonation" serializeAs="String">
8484
<value>False</value>

KeppyMIDIConverter/Bass.Net.xml

Lines changed: 266 additions & 9 deletions
Large diffs are not rendered by default.

KeppyMIDIConverter/Forms/ErrorHandler.cs

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Runtime.InteropServices;
4-
using System.ComponentModel;
5-
using System.Data;
6-
using System.Drawing;
7-
using System.Linq;
83
using System.Threading;
94
using System.Text;
105
using System.Windows.Forms;
11-
using System.Globalization;
12-
using System.Resources;
136

147
namespace KeppyMIDIConverter
158
{
169
public partial class ErrorHandler : Form
1710
{
18-
[DllImportAttribute("uxtheme.dll")]
19-
private static extern int SetWindowTheme(IntPtr hWnd, string appname, string idlist);
20-
21-
protected override void OnHandleCreated(EventArgs e)
22-
{
23-
SetWindowTheme(this.Handle, "", "");
24-
base.OnHandleCreated(e);
25-
}
26-
11+
private static String CopyException;
2712
public static int TOE = 0;
2813

2914
private void InitializeLanguage(String errortitle)
@@ -47,6 +32,8 @@ public ErrorHandler(String ErrorTitle, String ErrorMessage, Int16 TypeOfError, I
4732
if (ConvOrNot == 0) this.ShowInTaskbar = false;
4833
if (ConvOrNot == 1) this.ShowInTaskbar = true;
4934

35+
CopyException = ErrorMessage;
36+
5037
ErrorBox.Text = ErrorMessage;
5138
}
5239

@@ -56,22 +43,24 @@ private void ErrorHandler_Load(object sender, EventArgs e)
5643
ErrorBox.ContextMenu = RBTMenu;
5744

5845
if (TOE == 0)
59-
pictureBox1.Image = KeppyMIDIConverter.Properties.Resources.warningicon;
46+
pictureBox1.Image = Properties.Resources.warningicon;
6047
else
61-
pictureBox1.Image = KeppyMIDIConverter.Properties.Resources.erroricon;
48+
pictureBox1.Image = Properties.Resources.erroricon;
6249

6350
PlayConversionFail();
6451
}
6552

6653
protected override void OnFormClosing(FormClosingEventArgs e)
6754
{
55+
/*
6856
if (TOE == 1)
6957
{
7058
ThreadPool.QueueUserWorkItem(new WaitCallback(ignored =>
7159
{
72-
//throw new AntiDamageCrash("The converter has been manually crashed to avoid damages to the computer.");
60+
throw new ConverterUnhandledException(CopyException);
7361
}));
7462
}
63+
*/
7564
}
7665

7766
private void Close_Click(object sender, EventArgs e)
@@ -81,7 +70,7 @@ private void Close_Click(object sender, EventArgs e)
8170

8271
private void PlayConversionFail()
8372
{
84-
//MainWindow.PlayConverterError();
73+
BasicFunctions.PlayConverterError();
8574
}
8675

8776
private void copyErrorMessageToolStripMenuItem_Click(object sender, EventArgs e)
@@ -99,4 +88,21 @@ private void copyErrorMessageToolStripMenuItem_Click(object sender, EventArgs e)
9988
MessageBox.Show(String.Format(Languages.Parse("CopiedToClipboardNotice"), sb.ToString()), "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
10089
}
10190
}
91+
}
92+
93+
public class ConverterUnhandledException : Exception
94+
{
95+
public ConverterUnhandledException()
96+
{
97+
}
98+
99+
public ConverterUnhandledException(string message)
100+
: base(message)
101+
{
102+
}
103+
104+
public ConverterUnhandledException(string message, Exception inner)
105+
: base(message, inner)
106+
{
107+
}
102108
}

KeppyMIDIConverter/Forms/ErrorHandler.designer.cs

Lines changed: 14 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

KeppyMIDIConverter/Forms/MainWindow.cs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public static class KMCGlobals
5757
public static BASS_MIDI_FONTEX[] SoundFonts;
5858
public static DSPPROC _myDSP;
5959
public static SYNCPROC _mySync;
60-
public static SYNCPROC _myVSTSync;
6160
public static SYNCPROC _myTempoSync;
6261
public static MIDIFILTERPROC _FilterProc;
6362
public static WASAPIPROC _myWasapi;
@@ -121,6 +120,7 @@ public static class VSTs
121120
{
122121
public static Int32[] _DummyVSTHandles = new Int32[8];
123122
public static Int32[] _VSTHandles = new Int32[8];
123+
public static Int32 _VSTiHandle = 0;
124124

125125
public static Int32 _DummyLoudMaxHan;
126126
public static Int32 _LoudMaxHan;
@@ -329,15 +329,15 @@ private void ImportMIDIs_Click(object sender, EventArgs e)
329329

330330
private void RemoveMIDIs_Click(object sender, EventArgs e)
331331
{
332-
for (int i = this.MIDIList.SelectedIndices.Count - 1; i >= 0; i--)
332+
for (int i = MIDIList.SelectedIndices.Count - 1; i >= 0; i--)
333333
{
334-
this.MIDIList.Items.RemoveAt(this.MIDIList.SelectedIndices[i]);
334+
MIDIList.Items.RemoveAt(MIDIList.SelectedIndices[i]);
335335
}
336336
}
337337

338338
private void ClearList_Click(object sender, EventArgs e)
339339
{
340-
this.MIDIList.Items.Clear();
340+
MIDIList.Items.Clear();
341341
}
342342

343343
private void OpenSFVSTManager_Click(object sender, EventArgs e)
@@ -444,9 +444,9 @@ private void Exit_Click(object sender, EventArgs e)
444444
protected override void OnSizeChanged(EventArgs e)
445445
{
446446
base.OnSizeChanged(e);
447-
if (this.WindowState.Equals(FormWindowState.Minimized) && Properties.Settings.Default.MinimizeToTray)
447+
if (WindowState.Equals(FormWindowState.Minimized) && Properties.Settings.Default.MinimizeToTray)
448448
{
449-
this.Hide();
449+
Hide();
450450
if (Properties.Settings.Default.FirstTimeTray != false)
451451
{
452452
NotifyArea.ShowStatusTray(Languages.Parse("Information"), Languages.Parse("MinimizedToTray"), ToolTipIcon.Info);
@@ -479,12 +479,12 @@ private void MIDIList_SizeChanged(object sender, EventArgs e)
479479
Resizing = false;
480480
}
481481

482-
private void MIDIList_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
482+
private void MIDIList_DragDrop(object sender, DragEventArgs e)
483483
{
484484
try { new AddingMIDIs((string[])e.Data.GetData(DataFormats.FileDrop, false), false).ShowDialog(); } catch { }
485485
}
486486

487-
private void MIDIList_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
487+
private void MIDIList_DragEnter(object sender, DragEventArgs e)
488488
{
489489
if (e.Data.GetDataPresent(DataFormats.FileDrop))
490490
e.Effect = DragDropEffects.All;
@@ -500,17 +500,13 @@ private void MIDIList_KeyDown(object sender, KeyEventArgs e)
500500
{
501501
if (e.KeyValue == (char)Keys.Delete)
502502
{
503-
for (int i = this.MIDIList.SelectedIndices.Count - 1; i >= 0; i--)
504-
{
505-
this.MIDIList.Items.RemoveAt(this.MIDIList.SelectedIndices[i]);
506-
}
503+
for (int i = MIDIList.SelectedIndices.Count - 1; i >= 0; i--)
504+
MIDIList.Items.RemoveAt(MIDIList.SelectedIndices[i]);
507505
}
508506
else if (e.KeyCode == Keys.A && e.Control)
509507
{
510508
foreach (ListViewItem item in MIDIList.Items)
511-
{
512509
item.Selected = true;
513-
}
514510
}
515511
}
516512
} catch { }
@@ -673,7 +669,7 @@ private void ChangeLanguage_Click(object sender, EventArgs e)
673669

674670
private void VSTiSettings_Click(object sender, EventArgs e)
675671
{
676-
BASSControl.BASSVSTShowDialog(true, MainWindow.KMCGlobals._recHandle, MainWindow.VSTs._VSTHandles[0], MainWindow.VSTs.VSTInfo[0]);
672+
BASSControl.BASSVSTShowDialog(true, KMCGlobals._recHandle, VSTs._VSTiHandle, VSTs.VSTInfo[0]);
677673
}
678674
}
679675
}

0 commit comments

Comments
 (0)