mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Add installation path check (#314)
This commit is contained in:
parent
670790a023
commit
09d20ac427
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@ -65,12 +66,16 @@ namespace Bloxstrap.UI.Menu.ViewModels
|
|||||||
{
|
{
|
||||||
using var dialog = new FolderBrowserDialog();
|
using var dialog = new FolderBrowserDialog();
|
||||||
|
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
if (dialog.ShowDialog() != DialogResult.OK)
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
if (!dialog.SelectedPath.EndsWith(App.ProjectName))
|
||||||
|
InstallLocation = Path.Combine(dialog.SelectedPath, App.ProjectName);
|
||||||
|
else
|
||||||
InstallLocation = dialog.SelectedPath;
|
InstallLocation = dialog.SelectedPath;
|
||||||
|
|
||||||
OnPropertyChanged(nameof(InstallLocation));
|
OnPropertyChanged(nameof(InstallLocation));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void OpenFolder()
|
private void OpenFolder()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user