Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 14 additions & 26 deletions MicroWin/AppState.cs
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
using System.Collections.Generic;
using MicroWin.Classes;
using System.Collections.Generic;
using System.IO;

namespace MicroWin
{
public class UserAccount
{
public string Name { get; set; }
public string Password { get; set; }
public string Role { get; set; }
}

public static class AppState
{
// 1. Path Definitions
public static string IsoPath { get; set; }
public static string TempRoot => Path.Combine(Path.GetTempPath(), "microwin");

// These provide the locations for the extraction and DISM workspace
public static string MountPath => $"{Path.Combine(TempRoot, "mount")}";
public static string ScratchPath => $"{Path.Combine(TempRoot, "scratch")}";

// 2. Selection Data
public static int SelectedImageIndex { get; set; }
public static bool IsAuto { get; set; }

// 3. Collections
public static List<UserAccount> UserAccounts { get; set; } = new List<UserAccount>();
public static List<string> SelectedPackages { get; set; } = new List<string>();

// 4. Customization Toggles
public static bool AddWinUtilShortcut { get; set; }
public static bool AddReportingToolShortcut { get; set; }

public static string saveISO { get; set; }

public static string Version => "V1.0";
public static int SelectedImageIndex { get; set; } = 0;
public static List<UserAccount> UserAccounts { get; set; } = [];
/// <summary>
/// Determines whether to encode passwords with Base64
/// </summary>
public static bool EncodeWithB64 { get; set; } = true;
public static bool AddReportingToolShortcut { get; set; } = true;
public static bool CopyUnattendToFileSystem { get; set; }
public static DriverExportMode DriverExportMode { get; set; } = DriverExportMode.NoExport;
public static string SaveISO { get; set; }

public static string Version => "v1.99.2";
}
}
15 changes: 15 additions & 0 deletions MicroWin/Classes/DriverExportMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MicroWin.Classes
{
public enum DriverExportMode : int
{
NoExport = 0,
ExportEssential = 1,
ExportAll = 2
}
}
15 changes: 15 additions & 0 deletions MicroWin/Classes/UserAccount.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MicroWin.Classes
{
public class UserAccount
{
public string Name { get; set; }
public string Password { get; set; }
public string Role { get; set; }
}
}
1,120 changes: 1,116 additions & 4 deletions MicroWin/MainForm.Designer.cs

Large diffs are not rendered by default.

Loading