diff --git a/ValorantCC/MainWindow.xaml b/ValorantCC/MainWindow.xaml index f9cbb06..789c5b0 100644 --- a/ValorantCC/MainWindow.xaml +++ b/ValorantCC/MainWindow.xaml @@ -1,15 +1,15 @@ + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:local="clr-namespace:ValorantCC" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" + xmlns:Controls="clr-namespace:Xceed.Wpf.AvalonDock.Themes.Controls;assembly=Xceed.Wpf.AvalonDock.Themes.Aero" x:Class="ValorantCC.MainWindow" + xmlns:fa="http://schemas.fontawesome.io/icons/" + mc:Ignorable="d" + Title="vTools - ValorantCC" Height="0" Width="500" SizeToContent="Height" AllowsTransparency="True" WindowStartupLocation="CenterScreen" WindowState="Normal" ResizeMode="CanMinimize" WindowStyle="None" Icon="Resources/vtools-colored.ico" + Background="Transparent" + RenderOptions.BitmapScalingMode="Fant"> @@ -230,13 +230,13 @@ - - - + + + - + - + diff --git a/ValorantCC/MainWindow.xaml.cs b/ValorantCC/MainWindow.xaml.cs index 1501610..32e80b4 100644 --- a/ValorantCC/MainWindow.xaml.cs +++ b/ValorantCC/MainWindow.xaml.cs @@ -15,7 +15,6 @@ namespace ValorantCC { public partial class MainWindow : Window { - readonly string LoggingDir = Environment.GetEnvironmentVariable("LocalAppData") + @"\VTools\Logs\"; public Processor DataProcessor = new Processor(); BrushConverter bc = new BrushConverter(); public AuthResponse AuthResponse; @@ -28,10 +27,9 @@ public partial class MainWindow : Window public MainWindow() { // Create logging dir - if (!Directory.Exists(LoggingDir)) Directory.CreateDirectory(LoggingDir); - // Replace old logs - string LogFile = LoggingDir + "/logs.txt"; - if (File.Exists(LogFile)) File.Move(LogFile, LogFile + ".old", true); + if (!Directory.Exists(Path.GetDirectoryName(Utils.LoggingFile))) Directory.CreateDirectory(Path.GetDirectoryName(Utils.LoggingFile)); + // Replace old logs + if (File.Exists(Utils.LoggingFile)) File.Move(Utils.LoggingFile, Utils.LoggingFile + ".old", true); Version ProgramFileVersion = new Version(FileVersionInfo.GetVersionInfo(Process.GetCurrentProcess().MainModule.FileName).ProductVersion); InitializeComponent(); @@ -262,7 +260,7 @@ private void ClipboardButtonLeave(object sender, MouseEventArgs e) private void btnOpenLogs_Click(object sender, RoutedEventArgs e) { Process p = new Process(); - p.StartInfo = new ProcessStartInfo() { FileName = LoggingDir, UseShellExecute = true }; + p.StartInfo = new ProcessStartInfo() { FileName = Path.GetDirectoryName(Utils.LoggingFile), UseShellExecute = true }; p.Start(); MessageTxt.Foreground = Brushes.Lime; MessageTxt.Text = "Log folder opened! Please include OLD files to your report if exists."; @@ -302,7 +300,7 @@ private void btnCommunityProfiles_Click(object sender, RoutedEventArgs e) Window publicProfiles = Application.Current.Windows.Cast().Single(window => window.GetType().ToString() == "ValorantCC.ProfilesWindow"); publicProfiles.Activate(); } - catch (Exception ex) + catch (Exception) { ProfilesWindow publicProfiles = new ProfilesWindow(SelectedProfile, ValCCAPI); publicProfiles.Owner = this; diff --git a/ValorantCC/SubWindow/MessageWindow.xaml b/ValorantCC/SubWindow/MessageWindow.xaml new file mode 100644 index 0000000..7fb1a76 --- /dev/null +++ b/ValorantCC/SubWindow/MessageWindow.xaml @@ -0,0 +1,15 @@ + + + + +