Skip to content

Commit

Permalink
Merge pull request #71 from BoiHanny/Pre-Master
Browse files Browse the repository at this point in the history
New feature and documentation update
  • Loading branch information
BoiHanny authored Aug 22, 2024
2 parents ca7717c + 3e002b5 commit c616d70
Show file tree
Hide file tree
Showing 10 changed files with 785 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Prototype Features (not implemented)
## Detailed-Features

<details>
<summary>RIGHT-CLICK</summary>
<summary>LEFT-CLICK</summary>

> - **Extended Media Support:** We've introduced `MediaLink` to the integration tab and incorporated support for YouTube Music, SoundCloud, Spotify, Apple Music and even YouTube videos with the help of the `Windows Media API`.
Expand Down
8 changes: 8 additions & 0 deletions vrcosc-magicchatbox/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ protected override async void OnStartup(StartupEventArgs e)
loadingWindow.UpdateProgress("Rolling back and clearing the slate. Fresh start!", 50);
await Task.Run(() => updater.ClearBackUp());
break;
case "-installDotNetAdmin":
loadingWindow.UpdateProgress(".NET installation, coming right up!", 90);
updater.InstallDotNet();
return;
default:
loadingWindow.Hide();
Logging.WriteException(new Exception($"Invalid command line argument '{e.Args[0]}'"), MSGBox: true, exitapp: true);
Expand All @@ -77,8 +81,12 @@ protected override async void OnStartup(StartupEventArgs e)
// Close the loading window once initialization is complete
loadingWindow.UpdateProgress("Rolling out the red carpet... Here comes the UI!", 100);
loadingWindow.Close();

updater.InstallDotNet();
}



// Handle first-chance exceptions (before they are thrown)
private void CurrentDomain_FirstChanceException(object? sender, FirstChanceExceptionEventArgs e)
{
Expand Down
9 changes: 9 additions & 0 deletions vrcosc-magicchatbox/Classes/DataAndSecurity/UpdateApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Principal;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using vrcosc_magicchatbox.UI.Dialogs;
using vrcosc_magicchatbox.ViewModels;

namespace vrcosc_magicchatbox.Classes.DataAndSecurity
Expand Down Expand Up @@ -336,7 +338,14 @@ private void CopyDirectory(DirectoryInfo source, DirectoryInfo target)
}
}

public void InstallDotNet()
{
Thread.Sleep(500);
var installerWindow = new DotNetInstallerWindow();
installerWindow.Show();
}



private async Task DownloadAndExtractUpdate(string zipPath)
{
Expand Down
Binary file added vrcosc-magicchatbox/Img/Icons/DOTNET.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vrcosc-magicchatbox/Img/Icons/csharp-bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions vrcosc-magicchatbox/MagicChatbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<Version>0.9.004</Version>
<Version>0.9.010</Version>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<RootNamespace>vrcosc_magicchatbox</RootNamespace>
<Nullable>enable</Nullable>
Expand Down Expand Up @@ -47,9 +47,11 @@
<None Remove="Img\Icons\Copy_ico.png" />
<None Remove="Img\Icons\Cross_ico.png" />
<None Remove="Img\Icons\Cross_v1_ico.png" />
<None Remove="Img\Icons\csharp-bot.png" />
<None Remove="Img\Icons\Cut_ico.png" />
<None Remove="Img\Icons\Delete_ico.png" />
<None Remove="Img\Icons\Discord.png" />
<None Remove="Img\Icons\DOTNET.png" />
<None Remove="Img\Icons\downgrade.png" />
<None Remove="Img\Icons\Edit_ico.png" />
<None Remove="Img\Icons\error.png" />
Expand Down Expand Up @@ -112,11 +114,13 @@
<Resource Include="Img\Icons\Copy_ico.png" />
<Resource Include="Img\Icons\Cross_ico.png" />
<Resource Include="Img\Icons\Cross_v1_ico.png" />
<Resource Include="Img\Icons\csharp-bot.png" />
<Resource Include="Img\Icons\Cut_ico.png" />
<Resource Include="Img\Icons\Delete_ico.png">
<CopyToOutputDirectory></CopyToOutputDirectory>
</Resource>
<Resource Include="Img\Icons\Discord.png" />
<Resource Include="Img\Icons\DOTNET.png" />
<Resource Include="Img\Icons\downgrade.png" />
<Resource Include="Img\Icons\Edit_ico.png" />
<Resource Include="Img\Icons\error.png" />
Expand Down Expand Up @@ -186,13 +190,13 @@
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Dubya.WindowsMediaController" Version="2.5.5" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.4-pre324" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.4-pre329" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="NLog" Version="5.3.2" />
<PackageReference Include="OpenAI-DotNet" Version="8.1.1" />
<PackageReference Include="NLog" Version="5.3.3" />
<PackageReference Include="OpenAI-DotNet" Version="8.2.2" />
<PackageReference Include="VRChat.OSCQuery" Version="0.0.7" />
</ItemGroup>

Expand Down
32 changes: 32 additions & 0 deletions vrcosc-magicchatbox/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5049,6 +5049,38 @@
</CheckBox.Effect>
</CheckBox>

<Button
x:Name="OpenNETInstaller"
Width="auto"
Height="30"
Margin="0,0,0,5"
Padding="5"
HorizontalAlignment="Left"
Click="OpenNETInstaller_Click"
Opacity="0.7"
Style="{StaticResource UpdatedGreenButtonStyle}"
Visibility="{Binding RollBackUpdateAvailable, Converter={StaticResource InverseBoolToHiddenConverter}}">
<Button.ContentTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image
Height="18"
Margin="0,0,4,0"
RenderOptions.BitmapScalingMode="HighQuality"
Source="/Img/Icons/DOTNET.png" />
<TextBlock
x:Name="RollBackVersion"
Margin="0,-2,5,0"
VerticalAlignment="Center"
FontSize="15"
Text="Open .NET 8 install helper" />


</StackPanel>
</DataTemplate>
</Button.ContentTemplate>
</Button>

<Button
x:Name="Rollback"
Width="auto"
Expand Down
7 changes: 7 additions & 0 deletions vrcosc-magicchatbox/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public MainWindow()
ViewModel.Instance.AfkModule = new AfkModule();
ViewModel.Instance.AfkModule.AfkDetected += AfkModule_AfkDetected;


}

private void AfkModule_AfkDetected(object? sender, EventArgs e)
Expand Down Expand Up @@ -1681,6 +1682,12 @@ private void MainDiscoundButton_grid_MouseUp(object sender, MouseButtonEventArgs
{
ViewModel.Instance.ActivateSetting("Settings_HeartRate");
}

private void OpenNETInstaller_Click(object sender, RoutedEventArgs e)
{
UpdateApp updater = new UpdateApp();
updater.InstallDotNet();
}
}


Expand Down
Loading

0 comments on commit c616d70

Please sign in to comment.