scrap paths directly

This commit is contained in:
Вячеслав 2026-01-01 05:46:42 +05:00
parent 13a076ad79
commit c6a0b39ded
3 changed files with 60 additions and 51 deletions

View file

@ -22,7 +22,7 @@ public partial class NewInstallationDialog : Window
InstallButton.Click += OnInstallClick;
}
private async void RefreshCheckboxes()
private void RefreshCheckboxes()
{
var serverCheckbox = ServerCheckBox;
var pcAdminCheckbox = PcAdminCheckBox;
@ -67,7 +67,6 @@ public partial class NewInstallationDialog : Window
private async void OnInstallClick(object? sender, RoutedEventArgs e)
{
using var archive = ZipFile.OpenRead(_zipPath);
}
private void UpdateCheckboxes()
@ -78,25 +77,25 @@ public partial class NewInstallationDialog : Window
var androidAdminCheckbox = AndroidAdminCheckbox;
var vrClientCheckbox = VrClientCheckbox;
if (!_installationParts.WindowsServerExists)
if (string.IsNullOrEmpty(_installationParts.WindowsServerPath))
{
serverCheckbox.IsEnabled = false;
serverCheckbox.Content += "\nCouldn't find directory with server";
}
if (!_installationParts.WindowsAdminExists)
if (string.IsNullOrEmpty(_installationParts.WindowsAdminPath))
{
pcAdminCheckbox.IsEnabled = false;
pcAdminCheckbox.Content += "\nCouldn't find directory with PC admin";
}
if (!_installationParts.WindowsContentExists)
if (string.IsNullOrEmpty(_installationParts.WindowsContentPath))
{
pcAdminCheckbox.IsEnabled = false;
pcAdminCheckbox.Content += "\nCouldn't find windows content";
}
if (!_installationParts.AndroidContentExists)
if (string.IsNullOrEmpty(_installationParts.AndroidContentPath))
{
vrClientCheckbox.IsEnabled = false;
vrClientCheckbox.Content += "\nCouldn't find android content";
@ -104,7 +103,8 @@ public partial class NewInstallationDialog : Window
androidAdminCheckbox.Content += "\nCouldn't find android content";
}
if (!_installationParts.PicoClientExists && !_installationParts.OculusClientExists)
if (string.IsNullOrEmpty(_installationParts.PicoClientPath) &&
string.IsNullOrEmpty(_installationParts.OculusClientPath))
{
vrClientCheckbox.IsEnabled = false;
vrClientCheckbox.Content += "\nCouldn't find any VR clients";