Add the Avalonia application and the station network

The entry window types contacts and colours them as they are typed; the log,
check, bandmap, score and packet windows read the same session. Contacts are
shared with the other stations of a multi-operator entry in N1MM's contact
message, so an N1MM station on the same network sees them too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik
2026-08-27 10:56:35 +00:00
parent ffeeb2cdc1
commit 2834f63c8e
45 changed files with 2667 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
namespace Nonemm.App.Configuration;
/// Where the operator's files live. Windows keeps them under Documents the way
/// N1MM does; everywhere else follows the XDG configuration directory.
public sealed class UserPaths
{
public UserPaths(string root)
{
Root = root;
Databases = Path.Combine(root, "Databases");
UserDefinedContests = Path.Combine(root, "UserDefinedContests");
SupportFiles = Path.Combine(root, "SupportFiles");
}
public static UserPaths Default() => new(DefaultRoot());
public string Root { get; }
public string Databases { get; }
public string UserDefinedContests { get; }
public string SupportFiles { get; }
public string SettingsFile => Path.Combine(Root, "settings.json");
public string CountryFile => Path.Combine(SupportFiles, "wl_cty.dat");
public string CallDatabaseFile => Path.Combine(SupportFiles, "MASTER.SCP");
public void CreateFolders()
{
Directory.CreateDirectory(Root);
Directory.CreateDirectory(Databases);
Directory.CreateDirectory(UserDefinedContests);
Directory.CreateDirectory(SupportFiles);
}
private static string DefaultRoot() =>
OperatingSystem.IsWindows()
? Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
"Nonemm")
: Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"nonemm");
}