Skip to content

Commit

Permalink
initial upload
Browse files Browse the repository at this point in the history
  • Loading branch information
VRCWizard authored Apr 1, 2023
1 parent 4bb9838 commit 461d12e
Show file tree
Hide file tree
Showing 13 changed files with 5,000 additions and 0 deletions.
25 changes: 25 additions & 0 deletions VRCSongWiz.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VRCSongWiz", "VRCSongWiz\VRCSongWiz.csproj", "{3F132C57-7DD2-43BA-83B5-86A336CD90E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F132C57-7DD2-43BA-83B5-86A336CD90E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F132C57-7DD2-43BA-83B5-86A336CD90E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F132C57-7DD2-43BA-83B5-86A336CD90E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F132C57-7DD2-43BA-83B5-86A336CD90E6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0CAFF4BF-972A-4F0C-955F-14E07E2C7A04}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions VRCSongWiz/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="TTSVoiceWizard3._0.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<TTSVoiceWizard3._0.Settings1>
<setting name="DisplaySong" serializeAs="String">
<value>True</value>
</setting>
<setting name="SongChangeOnly" serializeAs="String">
<value>True</value>
</setting>
</TTSVoiceWizard3._0.Settings1>
</userSettings>
</configuration>
Binary file added VRCSongWiz/CoreOSC.dll
Binary file not shown.
17 changes: 17 additions & 0 deletions VRCSongWiz/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace TTSVoiceWizard3._0
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new VRCSongWiz());
}
}
}
50 changes: 50 additions & 0 deletions VRCSongWiz/Settings1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions VRCSongWiz/Settings1.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="TTSVoiceWizard3._0" GeneratedClassName="Settings1">
<Profiles />
<Settings>
<Setting Name="DisplaySong" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="SongChangeOnly" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
143 changes: 143 additions & 0 deletions VRCSongWiz/VRCSongWiz.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions VRCSongWiz/VRCSongWiz.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
using CoreOSC;
using MaterialSkin;
using MaterialSkin.Controls;

namespace TTSVoiceWizard3._0
{
public partial class VRCSongWiz : MaterialForm
{
public static CoreOSC.UDPSender OSCSender = new CoreOSC.UDPSender("127.0.0.1", 9000);
public static System.Threading.Timer spotifyTimer;
public static VRCSongWiz MainFormGlobal;
public VRCSongWiz()
{
InitializeComponent();
MainFormGlobal = this;

var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;
// materialSkinManager.ColorScheme = new ColorScheme(Primary.DeepPurple800, Primary.DeepPurple900, Primary.DeepPurple800, Accent.DeepPurple700, TextShade.WHITE);
materialSkinManager.ColorScheme = new ColorScheme(Primary.Green800, Primary.Green900, Primary.Green800, Accent.Green700, TextShade.WHITE);




}

// MaterialSkinManager TManager = MaterialSkinManager.Instance;
public void spotifytimertick(object sender)
{

Thread t = new Thread(doSpotifyTimerTick);
t.Start();
}
private void doSpotifyTimerTick()
{



if (materialSwitchDisplaySong.Checked==true&& materialSwitchChangeOnly.Checked==false)
{
windowsMediaGetSongInfo();
}

spotifyTimer.Change(5000, 0);


}

public async Task windowsMediaGetSongInfo()
{
var theString = "";
this.Invoke((MethodInvoker)delegate ()
{
theString = materialTextBox1.Text.ToString();


theString = theString.Replace("{title}", WindowsMedia.mediaTitle);
theString = theString.Replace("{artist}", WindowsMedia.mediaArtist);
theString = theString.Replace("{progressMinutes}", WindowsMedia.getMediaProgress());
theString = theString.Replace("{durationMinutes}", WindowsMedia.getMediaDuration());
});


var messageSpeechBubble = new OscMessage("/chatbox/input", theString, true, false);
OSCSender.Send(messageSpeechBubble);


}

private void VRCSongWiz_Load(object sender, EventArgs e)
{
label1.ForeColor = Color.Red;
materialSwitchDisplaySong.Checked = Settings1.Default.DisplaySong;
materialSwitchChangeOnly.Checked = Settings1.Default.SongChangeOnly;
WindowsMedia.getWindowsMedia();
spotifyTimer = new System.Threading.Timer(spotifytimertick);
spotifyTimer.Change(5000, 0);

}

private void materialSwitchDisplaySong_CheckedChanged(object sender, EventArgs e)
{
Settings1.Default.DisplaySong = materialSwitchDisplaySong.Checked;
Settings1.Default.Save();

}

private void materialSwitchChangeOnly_CheckedChanged(object sender, EventArgs e)
{
Settings1.Default.SongChangeOnly = materialSwitchChangeOnly.Checked;
Settings1.Default.Save();
}
}
}
Loading

0 comments on commit 461d12e

Please sign in to comment.