From c7c753fe25a1320bdb3c2289b047ea397afa993e Mon Sep 17 00:00:00 2001 From: weedeej Date: Thu, 6 Jan 2022 21:35:23 +0800 Subject: [PATCH] Dev phase 4 --- ValorantCC/MainWindow.xaml.cs | 13 ++- ValorantCC/SubWindow/ProfilesWindow.xaml | 28 ++++- ValorantCC/SubWindow/ProfilesWindow.xaml.cs | 118 ++++++++++++++++++-- 3 files changed, 146 insertions(+), 13 deletions(-) diff --git a/ValorantCC/MainWindow.xaml.cs b/ValorantCC/MainWindow.xaml.cs index 18dbd97..c3017bd 100644 --- a/ValorantCC/MainWindow.xaml.cs +++ b/ValorantCC/MainWindow.xaml.cs @@ -28,6 +28,10 @@ public partial class MainWindow : Window public MainWindow() { + /** + * Note to myself, You were sleepy when you made this commit. Just test the app and see what you messed with. + * You probably messed with something here in main relating to the checkbox. goodluck debugging! + */ // Create logging dir if (!Directory.Exists(LoggingDir)) Directory.CreateDirectory(LoggingDir); // Replace old logs @@ -120,6 +124,7 @@ private void profiles_SelectionChanged(object sender, SelectionChangedEventArgs sniper_dot_color.SelectedColor = Color.FromRgb(SelectedProfile.Sniper.CenterDotColor.R, SelectedProfile.Sniper.CenterDotColor.G, SelectedProfile.Sniper.CenterDotColor.B); if (ValCCAPI != null) ValCCAPI.profile = SelectedProfile; + if (ValCCAPI != null && chkbxShareable.IsChecked) ValCCAPI.Set(); Crosshair_load(); } private void StackPanel_MouseDown(object sender, MouseButtonEventArgs e) @@ -326,7 +331,13 @@ private void btnCommunityProfiles_Click(object sender, RoutedEventArgs e) private void chkbxShareable_Click(object sender, RoutedEventArgs e) { - if (LoggedIn) ValCCAPI.Shareable = (bool)chkbxShareable.IsChecked; + if (!LoggedIn) + { + MessageBox.Show("You are not logged in!"); + return; + } + ValCCAPI.Shareable = (bool)chkbxShareable.IsChecked; + ValCCAPI.Set(); } } } diff --git a/ValorantCC/SubWindow/ProfilesWindow.xaml b/ValorantCC/SubWindow/ProfilesWindow.xaml index 14f6e85..3b036e3 100644 --- a/ValorantCC/SubWindow/ProfilesWindow.xaml +++ b/ValorantCC/SubWindow/ProfilesWindow.xaml @@ -24,7 +24,6 @@ -