Created
February 17, 2010 06:14
-
-
Save takeshik/306359 to your computer and use it in GitHub Desktop.
Patch for Tween to separate nofification sounds' directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: FilterDialog.vb | |
=================================================================== | |
--- FilterDialog.vb (リビジョン 101) | |
+++ FilterDialog.vb (作業コピー) | |
@@ -627,6 +627,9 @@ | |
ComboSound.Items.Clear() | |
ComboSound.Items.Add("") | |
Dim oDir As IO.DirectoryInfo = New IO.DirectoryInfo(My.Application.Info.DirectoryPath) | |
+ If IO.Directory.Exists(IO.Path.Combine(My.Application.Info.DirectoryPath, "Sounds")) Then | |
+ oDir = oDir.GetDirectories("Sounds")(0) | |
+ End If | |
For Each oFile As IO.FileInfo In oDir.GetFiles("*.wav") | |
ComboSound.Items.Add(oFile.Name) | |
Next | |
Index: Tween.vb | |
=================================================================== | |
--- Tween.vb (リビジョン 101) | |
+++ Tween.vb (作業コピー) | |
@@ -1474,7 +1467,11 @@ | |
'繧オ繧ヲ繝ウ繝牙・逕・ | |
If Not _initial AndAlso SettingDialog.PlaySound AndAlso soundFile <> "" Then | |
Try | |
- My.Computer.Audio.Play(Path.Combine(My.Application.Info.DirectoryPath.ToString(), soundFile), AudioPlayMode.Background) | |
+ Dim dir As String = My.Application.Info.DirectoryPath | |
+ If Directory.Exists(Path.Combine(dir, "Sounds")) Then | |
+ dir = Path.Combine(dir, "Sounds") | |
+ End If | |
+ My.Computer.Audio.Play(Path.Combine(dir, soundFile), AudioPlayMode.Background) | |
Catch ex As Exception | |
End Try | |
@@ -5566,6 +5563,9 @@ | |
SoundFileComboBox.Items.Add("") | |
Me.SoundFileTbComboBox.Items.Add("") | |
Dim oDir As IO.DirectoryInfo = New IO.DirectoryInfo(My.Application.Info.DirectoryPath) | |
+ If IO.Directory.Exists(IO.Path.Combine(My.Application.Info.DirectoryPath, "Sounds")) Then | |
+ oDir = oDir.GetDirectories("Sounds")(0) | |
+ End If | |
For Each oFile As IO.FileInfo In oDir.GetFiles("*.wav") | |
SoundFileComboBox.Items.Add(oFile.Name) | |
Me.SoundFileTbComboBox.Items.Add(oFile.Name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment