Skip to content

Commit

Permalink
Update MainWindow.xaml.cs
Browse files Browse the repository at this point in the history
Fixed Export Config from Program Files Directory
  • Loading branch information
MattMcManis committed May 29, 2020
1 parent 76391e7 commit da5f9b3
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions source/Axiom/Axiom/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@ void Window_Closing(object sender, CancelEventArgs e)
// -------------------------
// Ignore Program Files
// -------------------------
if (!appRootDir.Contains(programFilesDir) &&
!appRootDir.Contains(programFilesX86Dir) &&
!appRootDir.Contains(programFilesX64Dir)
if (!Configure.configDir.Contains(programFilesDir) &&
!Configure.configDir.Contains(programFilesX86Dir) &&
!Configure.configDir.Contains(programFilesX64Dir)
)
{
try
Expand Down Expand Up @@ -656,7 +656,9 @@ void Window_Closing(object sender, CancelEventArgs e)
File.Move(logAppDataRoamingPath, logAppDataLocalPath);
}

// -------------------------
// Save Config
// -------------------------
ExportWriteConfig(Configure.configDir);
}
catch (IOException ex)
Expand Down Expand Up @@ -691,9 +693,9 @@ void Window_Closing(object sender, CancelEventArgs e)
// -------------------------
// Ignore Program Files
// -------------------------
if (!appRootDir.Contains(programFilesDir) &&
!appRootDir.Contains(programFilesX86Dir) &&
!appRootDir.Contains(programFilesX64Dir)
if (!Configure.configDir.Contains(programFilesDir) &&
!Configure.configDir.Contains(programFilesX86Dir) &&
!Configure.configDir.Contains(programFilesX64Dir)
)
{
try
Expand Down Expand Up @@ -758,7 +760,9 @@ void Window_Closing(object sender, CancelEventArgs e)
File.Move(logAppDataLocalPath, logAppDataRoamingPath);
}

// -------------------------
// Save Config
// -------------------------
ExportWriteConfig(Configure.configDir);
}
catch (IOException ex)
Expand Down Expand Up @@ -792,9 +796,9 @@ void Window_Closing(object sender, CancelEventArgs e)
// -------------------------
// Ignore Program Files
// -------------------------
if (!appRootDir.Contains(programFilesDir) &&
!appRootDir.Contains(programFilesX86Dir) &&
!appRootDir.Contains(programFilesX64Dir)
if (!Configure.configDir.Contains(programFilesDir) &&
!Configure.configDir.Contains(programFilesX86Dir) &&
!Configure.configDir.Contains(programFilesX64Dir)
)
{
try
Expand Down Expand Up @@ -859,7 +863,9 @@ void Window_Closing(object sender, CancelEventArgs e)
File.Move(logAppDataRoamingPath, logAppRootPath);
}

// -------------------------
// Save Config
// -------------------------
ExportWriteConfig(Configure.configDir);
}
catch (IOException ex)
Expand Down Expand Up @@ -955,11 +961,14 @@ public void ExportWriteConfig(string path)
VM.ConfigureView.CustomPresetsPath_Text != conf.Read("Settings", "CustomPresetsPath_Text") ||
VM.ConfigureView.LogPath_Text != conf.Read("Settings", "LogPath_Text") ||
VM.ConfigureView.LogCheckBox_IsChecked != settings_LogCheckBox_IsChecked ||

VM.ConfigureView.Shell_SelectedItem != conf.Read("Settings", "Shell_SelectedItem") ||
VM.ConfigureView.ProcessPriority_SelectedItem != conf.Read("Settings", "ProcessPriority_SelectedItem") ||
VM.ConfigureView.Threads_SelectedItem != conf.Read("Settings", "Threads_SelectedItem") ||
VM.ConfigureView.OutputOverwrite_SelectedItem != conf.Read("Settings", "OutputOverwrite_SelectedItem") ||

VM.ConfigureView.Theme_SelectedItem != conf.Read("Settings", "Theme_SelectedItem") ||

VM.ConfigureView.UpdateAutoCheck_IsChecked != settings_UpdateAutoCheck_IsChecked
)
{
Expand Down

0 comments on commit da5f9b3

Please sign in to comment.