RynthCore as of 2026-09-05 (internal f9abab9)
A snapshot of the working tree for aelrynth.com/git/: the code, build files and public docs. Internal review notes and agent instructions are left out. MIT licensed; see LICENSE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
68c301dac8
277 changed files with 86286 additions and 0 deletions
56
src/RynthCore.App/LaunchServerProfile.cs
Normal file
56
src/RynthCore.App/LaunchServerProfile.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
|
||||
namespace RynthCore.App;
|
||||
|
||||
internal enum AcEmulatorKind
|
||||
{
|
||||
Ace,
|
||||
Gdle
|
||||
}
|
||||
|
||||
internal sealed class LaunchServerProfile
|
||||
{
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString("N");
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Alias { get; set; } = string.Empty;
|
||||
public string Host { get; set; } = string.Empty;
|
||||
public int Port { get; set; }
|
||||
public AcEmulatorKind Emulator { get; set; } = AcEmulatorKind.Ace;
|
||||
public bool RodatEnabled { get; set; }
|
||||
|
||||
public string DisplayName =>
|
||||
string.IsNullOrWhiteSpace(Alias) ? Name : $"{Alias} ({Name})";
|
||||
|
||||
public string ConnectionString =>
|
||||
string.IsNullOrWhiteSpace(Host) || Port <= 0 ? string.Empty : $"{Host}:{Port}";
|
||||
|
||||
public LaunchServerProfile Clone()
|
||||
{
|
||||
return new LaunchServerProfile
|
||||
{
|
||||
Id = Id,
|
||||
Name = Name,
|
||||
Alias = Alias,
|
||||
Host = Host,
|
||||
Port = Port,
|
||||
Emulator = Emulator,
|
||||
RodatEnabled = RodatEnabled
|
||||
};
|
||||
}
|
||||
|
||||
public void CopyFrom(LaunchServerProfile source)
|
||||
{
|
||||
Id = source.Id;
|
||||
Name = source.Name;
|
||||
Alias = source.Alias;
|
||||
Host = source.Host;
|
||||
Port = source.Port;
|
||||
Emulator = source.Emulator;
|
||||
RodatEnabled = source.RodatEnabled;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return DisplayName;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue