trying to fix avalonia
This commit is contained in:
parent
9e0f9ad1a6
commit
0eab3ba8f3
@ -5,7 +5,7 @@ VisualStudioVersion = 17.1.32104.313
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "launcher-server", "launcher-server\launcher-server.csproj", "{1F4D14EB-AF48-4B6C-A91B-B294D4281173}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "launcher-client-win", "launcher-client-win\launcher-client-win.csproj", "{A1F770F3-F6B1-4854-9BF0-093F85064B88}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "launcher-client-wpf", "launcher-client-wpf\launcher-client-wpf.csproj", "{A1F770F3-F6B1-4854-9BF0-093F85064B88}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{F567AA49-E96B-43BD-95B5-A71F9FCB64E1}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<Application x:Class="launcher_client_avalonia.GUI.App"
|
||||
<Application x:Class="Launcher.Client.Avalonia.GUI.App"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
@ -16,9 +16,9 @@
|
||||
<Application.Styles>
|
||||
<FluentTheme Mode="Dark" />
|
||||
|
||||
<Style x:Name="MyTextBoxStyle" Selector="TextBox.MyTextBoxStyle"/>
|
||||
<Style x:Name="MyLabelStyle" Selector="Label.MyLabelStyle"/>
|
||||
<Style x:Name="MyButtonStyle" Selector="Button.MyButtonStyle"/>
|
||||
<Style Selector="TextBox.MyTextBoxStyle" />
|
||||
<Style Selector="Label.MyLabelStyle" />
|
||||
<Style Selector="Button.MyButtonStyle" />
|
||||
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
|
||||
@ -3,8 +3,9 @@ global using Avalonia.Controls;
|
||||
global using Avalonia.Media;
|
||||
global using Avalonia.Media.Imaging;
|
||||
global using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
|
||||
namespace launcher_client_avalonia
|
||||
namespace Launcher.Client.Avalonia.GUI
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
@ -20,5 +21,18 @@ namespace launcher_client_avalonia
|
||||
MyOrange = (SolidColorBrush)Resources["MySelectionColor"];
|
||||
MySelectionColor = (SolidColorBrush)Resources["MySelectionColor"];
|
||||
}
|
||||
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
CurrentLauncherWindow = new LauncherWindow();
|
||||
desktop.MainWindow = CurrentLauncherWindow;
|
||||
CurrentLauncherWindow.Show();
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
<Window x:Class="launcher_client_avalonia.GUI.LauncherWindow"
|
||||
<Window x:Class="Launcher.Client.Avalonia.GUI.LauncherWindow"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:launcher_client_avalonia.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.Avalonia.GUI"
|
||||
Title="Launcher"
|
||||
Width="800"
|
||||
Height="500"
|
||||
@ -21,24 +21,24 @@
|
||||
ColumnDefinitions="*,5,*,5,*,5,*">
|
||||
<local:TabButton x:Name="LibraryButton"
|
||||
Grid.Column="0"
|
||||
Classes="MyButtonStyle"
|
||||
Content="Library"
|
||||
FontSize="18"
|
||||
Classes="MyButtonStyle" />
|
||||
FontSize="18" />
|
||||
<local:TabButton x:Name="DownloadsButton"
|
||||
Grid.Column="2"
|
||||
Classes="MyButtonStyle"
|
||||
Content="Downloads"
|
||||
FontSize="18"
|
||||
Classes="MyButtonStyle" />
|
||||
FontSize="18" />
|
||||
<local:TabButton x:Name="LogButton"
|
||||
Grid.Column="4"
|
||||
Classes="MyButtonStyle"
|
||||
Content="Log"
|
||||
FontSize="18"
|
||||
Classes="MyButtonStyle" />
|
||||
FontSize="18" />
|
||||
<local:TabButton x:Name="SettingsButton"
|
||||
Grid.Column="6"
|
||||
Classes="MyButtonStyle"
|
||||
Content="Settings"
|
||||
FontSize="18"
|
||||
Classes="MyButtonStyle" />
|
||||
FontSize="18" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@ -50,8 +50,8 @@
|
||||
<ScrollViewer Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
Template="{DynamicResource myScrollViewer}">
|
||||
Template="{DynamicResource myScrollViewer}"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel x:Name="ProgramsPanel" />
|
||||
</ScrollViewer>
|
||||
<Grid x:Name="ProgramGrid"
|
||||
@ -59,10 +59,10 @@
|
||||
RowDefinitions="35,5,35,5,70,5,*">
|
||||
<Label x:Name="NameLabel"
|
||||
Grid.Row="0"
|
||||
Classes="MyLabelStyle"
|
||||
Content="name"
|
||||
FontSize="19"
|
||||
FontWeight="Bold"
|
||||
Classes="MyLabelStyle" />
|
||||
FontWeight="Bold" />
|
||||
<StackPanel Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
ClipToBounds="True"
|
||||
@ -71,33 +71,33 @@
|
||||
Width="100"
|
||||
Margin="2,0"
|
||||
Background="{DynamicResource MyRed}"
|
||||
Content="Remove"
|
||||
Classes="MyButtonStyle" />
|
||||
Classes="MyButtonStyle"
|
||||
Content="Remove" />
|
||||
<Button x:Name="InstallButton"
|
||||
Width="100"
|
||||
Margin="2,0"
|
||||
Content="Install"
|
||||
Classes="MyButtonStyle" />
|
||||
Classes="MyButtonStyle"
|
||||
Content="Install" />
|
||||
<Button x:Name="UpdateButton"
|
||||
Width="100"
|
||||
Margin="2,0"
|
||||
Content="Update"
|
||||
Classes="MyButtonStyle" />
|
||||
Classes="MyButtonStyle"
|
||||
Content="Update" />
|
||||
<Button x:Name="LaunchButton"
|
||||
Width="100"
|
||||
Margin="2,0"
|
||||
Background="{DynamicResource MyGreen}"
|
||||
Content="Launch"
|
||||
Classes="MyButtonStyle" />
|
||||
Classes="MyButtonStyle"
|
||||
Content="Launch" />
|
||||
</StackPanel>
|
||||
<TextBox x:Name="DescriptionBox"
|
||||
Grid.Row="4"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
Classes="MyTextBoxStyle" />
|
||||
Classes="MyTextBoxStyle"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||
<TextBox x:Name="ProgramLogBox"
|
||||
Grid.Row="6"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
Classes="MyTextBoxStyle" />
|
||||
Classes="MyTextBoxStyle"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
@ -108,36 +108,36 @@
|
||||
|
||||
<Label Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Content="version:"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="version:" />
|
||||
<ComboBox Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Background="{DynamicResource MyDarkTr}"
|
||||
Template="{DynamicResource MyComboBox}">
|
||||
<ComboBoxItem IsSelected="True">
|
||||
<Label Background="Transparent"
|
||||
Content="v1"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="v1" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<Label Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="directory:"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="directory:" />
|
||||
<Label Name="ProgramDirectoryLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Content="0"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="0" />
|
||||
<Label Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Content="size:"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="size:" />
|
||||
<Label Name="ProgramSizeLabel"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Content="0"
|
||||
Classes="MyLabelStyle" />
|
||||
Classes="MyLabelStyle"
|
||||
Content="0" />
|
||||
</Grid>
|
||||
<ScrollViewer Name="ProgramSettingsViever"
|
||||
Grid.Row="1"
|
||||
@ -162,14 +162,14 @@
|
||||
<Label x:Name="LogfileLabel"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Classes="MyLabelStyle"
|
||||
Content="logfile"
|
||||
FontStyle="Italic"
|
||||
Classes="MyLabelStyle" />
|
||||
FontStyle="Italic" />
|
||||
<TextBox x:Name="LogBox"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
Classes="MyTextBoxStyle" />
|
||||
Classes="MyTextBoxStyle"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="SettingsGrid"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace launcher_client_avalonia.GUI;
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class LauncherWindow : Window
|
||||
{
|
||||
@ -9,12 +9,12 @@ public partial class LauncherWindow : Window
|
||||
{
|
||||
try
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
InitializeComponent();
|
||||
LogBox.Text = Logger.Buffer;
|
||||
Logger.MessageSent += LogHandler;
|
||||
LogfileLabel.Content = Logger.Logfile.Remove(0,Logger.Logfile.LastIndexOf(Путь.Разд)+1);
|
||||
LogfileLabel.Content = Logger.LogfileName.Remove(0,Logger.LogfileName.LastIndexOf(Путь.Разд)+1);
|
||||
LogfileLabel.PointerPressed += (_,_)=>
|
||||
Process.Start("explorer.exe", Logger.Logfile.Remove(Logger.Logfile.LastIndexOf(Путь.Разд)));
|
||||
Process.Start("explorer.exe", LauncherLogger.LogfileDir);
|
||||
LogfileLabel.PointerEnter += (_,_)=>LogfileLabel.Foreground=App.MySelectionColor;
|
||||
LogfileLabel.PointerLeave += (_,_)=>LogfileLabel.Foreground=App.MyWhite;
|
||||
LibraryButton.TabGrid = LibraryGrid;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<Window x:Class="launcher_client_avalonia.GUI.MessageBox"
|
||||
<Window x:Class="Launcher.Client.Avalonia.GUI.MessageBox"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
namespace launcher_client_avalonia.GUI;
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class MessageBox : Window
|
||||
{
|
||||
public MessageBox()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
InitializeComponent();
|
||||
#if DEBUG
|
||||
this.AttachDevTools();
|
||||
#endif
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<UserControl x:Class="launcher_client_avalonia.GUI.ProgramLabel"
|
||||
<UserControl x:Class="Launcher.Client.Avalonia.GUI.ProgramLabel"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:launcher_client_avalonia.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.Avalonia.GUI"
|
||||
Height="50"
|
||||
Background="{DynamicResource MyDarkTr}"
|
||||
BorderBrush="{Binding Foreground, RelativeSource={RelativeSource Self}}"
|
||||
@ -9,7 +9,7 @@
|
||||
Foreground="{DynamicResource MyWhite}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding Height, RelativeSource={RelativeSource FindAncestor, AncestorType=local:ProgramLabel}}" />
|
||||
<ColumnDefinition Width="{Binding $parent[local:ProgramLabel].Height}" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@ -25,6 +25,6 @@
|
||||
FontFamily="Unispace"
|
||||
FontSize="15"
|
||||
FontWeight="Normal"
|
||||
Foreground="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ProgramLabel}}" />
|
||||
Foreground="{Binding $parent[local:ProgramLabel].Foreground}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
namespace launcher_client_avalonia.GUI;
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class ProgramLabel : UserControl
|
||||
{
|
||||
public ProgramLabel() => InitializeComponent();
|
||||
|
||||
public ProgramLabel(string label, string icon)
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
InitializeComponent();
|
||||
NameLabel.Content = label;
|
||||
|
||||
IconImage.Source = new Bitmap(
|
||||
$"{Directory.GetCurrent()}{Путь.Разд}icons{Путь.Разд}{icon}");
|
||||
}
|
||||
|
||||
@ -1,23 +1,22 @@
|
||||
<UserControl x:Class="launcher_client_avalonia.GUI.ProgramSettingsPanelItem"
|
||||
<UserControl x:Class="Launcher.Client.Avalonia.GUI.ProgramSettingsPanelItem"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:launcher_client_avalonia.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.Avalonia.GUI"
|
||||
Background="Transparent">
|
||||
<Grid ColumnDefinitions="*,*">
|
||||
<Label Name="KeyLabel"
|
||||
Grid.Column="0"
|
||||
Classes="MyLabelStyle"
|
||||
Content="{Binding $parent[local:ProgramSettingsPanelItem].SettingKey}"
|
||||
FontFamily="default"
|
||||
FontSize="16"
|
||||
Classes="MyLabelStyle"
|
||||
ToolTip.Tip="{Binding $self.Content}">
|
||||
</Label>
|
||||
ToolTip.Tip="{Binding $self.Content}" />
|
||||
<TextBox Name="ValueBox"
|
||||
Grid.Column="1"
|
||||
Classes="MyTextBoxStyle"
|
||||
IsReadOnly="False"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
Classes="MyTextBoxStyle"
|
||||
Text="{Binding $parent[local:ProgramSettingsPanelItem].SettingValue}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace launcher_client_avalonia.GUI;
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class ProgramSettingsPanelItem : UserControl
|
||||
{
|
||||
@ -7,32 +7,32 @@ public partial class ProgramSettingsPanelItem : UserControl
|
||||
"SettingKey");
|
||||
public string SettingKey
|
||||
{
|
||||
get => (string)GetValue(SettingKeyProp);
|
||||
set
|
||||
{
|
||||
SetValue(SettingKeyProp, value);
|
||||
/*KeyLabel.ToolTip = new ToolTip
|
||||
get => GetValue(SettingKeyProp);
|
||||
set => SetValue(SettingKeyProp, value);
|
||||
//TODO deal with textblock size
|
||||
/*KeyLabel.ToolTip = new ToolTip
|
||||
{
|
||||
Content = value,
|
||||
Foreground = App.MyWhite,
|
||||
Background = App.MySoftDark
|
||||
};*/
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<string> SettingValueProp =
|
||||
AvaloniaProperty.Register<ProgramSettingsPanelItem, string>("SettingValue");
|
||||
public string SettingValue
|
||||
{
|
||||
get => (string)GetValue(SettingValueProp);
|
||||
get => GetValue(SettingValueProp);
|
||||
set => SetValue(SettingValueProp, value);
|
||||
}
|
||||
|
||||
public event Action<ProgramSettingsPanelItem> UpdatedEvent;
|
||||
|
||||
public ProgramSettingsPanelItem() => InitializeComponent();
|
||||
|
||||
public ProgramSettingsPanelItem(string key, string value)
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
InitializeComponent();
|
||||
SettingKey = key;
|
||||
SettingValue = value;
|
||||
//TODO invoke UpdatedEvent only when focus changed
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
namespace launcher_client_avalonia.GUI;
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class TabButton : Button
|
||||
public class TabButton : Button
|
||||
{
|
||||
public static readonly StyledProperty<Grid> TabGridProp = AvaloniaProperty.Register<TabButton, Grid>("TabGrid");
|
||||
public Grid TabGrid
|
||||
{
|
||||
get => (Grid)GetValue(TabGridProp);
|
||||
get => GetValue(TabGridProp);
|
||||
set => SetValue(TabGridProp, value);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
namespace launcher_client_avalonia;
|
||||
namespace Launcher.Client.Avalonia;
|
||||
|
||||
public class LauncherConfig
|
||||
{
|
||||
@ -21,7 +21,7 @@ public class LauncherConfig
|
||||
{
|
||||
// читает дефолтный конфиг из ресурсов
|
||||
DtsodV23 updatedConfig;
|
||||
DtsodV23 updatedDefault = new(ReadResource("launcher_client_avalonia.Resources.launcher.dtsod"));
|
||||
DtsodV23 updatedDefault = new(EmbeddedResources.ReadText("Launcher.Client.Avalonia.Resources.launcher.dtsod"));
|
||||
// проверка и обновление конфига
|
||||
if (File.Exists(configFile))
|
||||
{
|
||||
|
||||
@ -1,36 +1,31 @@
|
||||
using System.Globalization;
|
||||
using DTLib.Loggers;
|
||||
using DTLib.Loggers;
|
||||
|
||||
namespace launcher_client_avalonia;
|
||||
namespace Launcher.Client.Avalonia;
|
||||
|
||||
public class LauncherLogger : BaseLogger
|
||||
public class LauncherLogger : ConsoleLogger
|
||||
{
|
||||
public string Buffer="";
|
||||
|
||||
public LauncherLogger() : base("launcher-logs", "launcher-client-win")
|
||||
public const string LogfileDir = "launcher-logs";
|
||||
public LauncherLogger() : base(LogfileDir,"launcher-client-wpf")
|
||||
{ }
|
||||
|
||||
private readonly StringBuilder _buffer = new();
|
||||
public string Buffer
|
||||
{
|
||||
get { lock (_buffer) return _buffer.ToString(); }
|
||||
}
|
||||
|
||||
public event Action<string> MessageSent;
|
||||
|
||||
public override void Log(params string[] msg)
|
||||
{
|
||||
lock (Logfile) if (!IsEnabled) return;
|
||||
|
||||
StringBuilder strB = new();
|
||||
strB.Append('[')
|
||||
.Append(DateTime.Now.ToString(CultureInfo.InvariantCulture))
|
||||
.Append("]: ");
|
||||
if (msg.Length == 1) strB.Append(msg[0]);
|
||||
else for (ushort i = 0; i < msg.Length; i++)
|
||||
strB.Append(msg[++i]);
|
||||
strB.Append('\n');
|
||||
string _buffer = strB.ToString();
|
||||
|
||||
lock(Buffer) Buffer += _buffer;
|
||||
|
||||
MessageSent?.Invoke(_buffer);
|
||||
|
||||
if (WriteToFile)
|
||||
lock(Logfile) File.AppendAllText(Logfile, _buffer);
|
||||
base.Log(msg);
|
||||
StringBuilder strb = new();
|
||||
if (msg.Length == 1) strb.Append(msg[0]);
|
||||
else for (int i = 1; i < msg.Length; i += 2)
|
||||
strb.Append(msg[i]);
|
||||
strb.Append('\n');
|
||||
string msgConnected = strb.ToString();
|
||||
MessageSent?.Invoke(msgConnected);
|
||||
lock (_buffer) _buffer.Append(msgConnected);
|
||||
}
|
||||
}
|
||||
@ -8,13 +8,12 @@ global using DTLib;
|
||||
global using DTLib.Dtsod;
|
||||
global using DTLib.Filesystem;
|
||||
global using DTLib.Extensions;
|
||||
global using static launcher_client_avalonia.Launcher;
|
||||
using System.Reflection;
|
||||
using launcher_client_avalonia.GUI;
|
||||
global using static Launcher.Client.Avalonia.LauncherMain;
|
||||
using Launcher.Client.Avalonia.GUI;
|
||||
|
||||
namespace launcher_client_avalonia;
|
||||
namespace Launcher.Client.Avalonia;
|
||||
|
||||
public static class Launcher
|
||||
public static class LauncherMain
|
||||
{
|
||||
public static LauncherConfig Config;
|
||||
public static readonly LauncherLogger Logger = new();
|
||||
@ -24,15 +23,6 @@ public static class Launcher
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Enable();
|
||||
|
||||
AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.LogToTrace()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
CurrentLauncherWindow = new LauncherWindow();
|
||||
CurrentLauncherWindow.Show();
|
||||
|
||||
Config = new LauncherConfig();
|
||||
Directory.Create("descriptors");
|
||||
Directory.Create("icons");
|
||||
@ -40,8 +30,16 @@ public static class Launcher
|
||||
Directory.Create("installed");
|
||||
Directory.Create("settings");
|
||||
File.WriteAllText($"descriptors{Путь.Разд}default.descriptor.template",
|
||||
ReadResource("launcher_client_avalonia.Resources.default.descriptor.template"));
|
||||
EmbeddedResources.ReadText("Launcher.Client.Avalonia.Resources.default.descriptor.template"));
|
||||
|
||||
var traceHandler = new ConsoleTraceListener();
|
||||
Trace.AutoFlush = true;
|
||||
Trace.Listeners.Add(traceHandler);
|
||||
|
||||
AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.LogToTrace()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -49,19 +47,10 @@ public static class Launcher
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadResource(string resource_path)
|
||||
{
|
||||
using var resourceStreamReader = new System.IO.StreamReader(
|
||||
Assembly.GetExecutingAssembly().GetManifestResourceStream(resource_path)
|
||||
?? throw new Exception($"embedded resource <{resource_path}> not found"),
|
||||
Encoding.UTF8);
|
||||
return resourceStreamReader.ReadToEnd();
|
||||
}
|
||||
|
||||
public static void LogError(string context, Exception ex)
|
||||
{
|
||||
string errmsg = $"{ex.Message}\n{ex.StackTrace}";
|
||||
MessageBox.Show($"{context} ERROR", errmsg);
|
||||
//MessageBox.Show($"{context} ERROR", errmsg);
|
||||
Logger.Log(errmsg);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
using launcher_client_avalonia.GUI;
|
||||
using Launcher.Client.Avalonia.GUI;
|
||||
|
||||
namespace launcher_client_avalonia;
|
||||
namespace Launcher.Client.Avalonia;
|
||||
|
||||
public class Program
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Launcher.Client.Avalonia</RootNamespace>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Globalization;
|
||||
using DTLib.Loggers;
|
||||
|
||||
namespace launcher_client_win;
|
||||
|
||||
public class LauncherLogger : BaseLogger
|
||||
{
|
||||
public string Buffer="";
|
||||
|
||||
public LauncherLogger() : base("launcher-logs", "launcher-client-win")
|
||||
{ }
|
||||
|
||||
public event Action<string> MessageSent;
|
||||
|
||||
public override void Log(params string[] msg)
|
||||
{
|
||||
lock (Logfile) if (!IsEnabled) return;
|
||||
|
||||
StringBuilder strB = new();
|
||||
strB.Append('[')
|
||||
.Append(DateTime.Now.ToString(CultureInfo.InvariantCulture))
|
||||
.Append("]: ");
|
||||
if (msg.Length == 1) strB.Append(msg[0]);
|
||||
else for (ushort i = 0; i < msg.Length; i++)
|
||||
strB.Append(msg[++i]);
|
||||
strB.Append('\n');
|
||||
string _buffer = strB.ToString();
|
||||
|
||||
lock(Buffer) Buffer += _buffer;
|
||||
|
||||
MessageSent?.Invoke(_buffer);
|
||||
|
||||
if (WriteToFile)
|
||||
lock(Logfile) File.AppendAllText(Logfile, _buffer);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<Application x:Class="launcher_client_win.GUI.App"
|
||||
<Application x:Class="Launcher.Client.WPF.GUI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace launcher_client_win.GUI;
|
||||
namespace Launcher.Client.WPF.GUI;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<Window x:Class="launcher_client_win.GUI.LauncherWindow"
|
||||
<Window x:Class="Launcher.Client.WPF.GUI.LauncherWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:launcher_client_win.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.WPF.GUI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="Launcher"
|
||||
Width="800"
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace launcher_client_win.GUI;
|
||||
namespace Launcher.Client.WPF.GUI;
|
||||
|
||||
public partial class LauncherWindow : Window
|
||||
{
|
||||
@ -11,11 +11,11 @@ public partial class LauncherWindow : Window
|
||||
InitializeComponent();
|
||||
LogBox.Text = Logger.Buffer;
|
||||
Logger.MessageSent += LogHandler;
|
||||
LogfileLabel.Content = Logger.Logfile.Remove(0,Logger.Logfile.LastIndexOf(Путь.Разд)+1);
|
||||
LogfileLabel.MouseLeftButtonDown += (s,e)=>
|
||||
Process.Start("explorer.exe", Logger.Logfile.Remove(Logger.Logfile.LastIndexOf(Путь.Разд)));
|
||||
LogfileLabel.MouseEnter += (s,e)=>LogfileLabel.Foreground=App.MySelectionColor;
|
||||
LogfileLabel.MouseLeave += (s,e)=>LogfileLabel.Foreground=App.MyWhite;
|
||||
LogfileLabel.Content = Logger.LogfileName.Remove(0,Logger.LogfileName.LastIndexOf(Путь.Разд)+1);
|
||||
LogfileLabel.MouseLeftButtonDown += (_,_)=>
|
||||
Process.Start("explorer.exe", LauncherLogger.LogfileDir);
|
||||
LogfileLabel.MouseEnter += (_,_)=>LogfileLabel.Foreground=App.MySelectionColor;
|
||||
LogfileLabel.MouseLeave += (_,_)=>LogfileLabel.Foreground=App.MyWhite;
|
||||
LibraryButton.TabGrid = LibraryGrid;
|
||||
DownloadsButton.TabGrid = DownloadsGrid;
|
||||
LogButton.TabGrid = LogGrid;
|
||||
@ -1,8 +1,8 @@
|
||||
<UserControl x:Class="launcher_client_win.GUI.ProgramLabel"
|
||||
<UserControl x:Class="Launcher.Client.WPF.GUI.ProgramLabel"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:launcher_client_win.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.WPF.GUI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Height="50"
|
||||
Background="{DynamicResource MyDarkTr}"
|
||||
@ -1,7 +1,7 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace launcher_client_win.GUI;
|
||||
namespace Launcher.Client.WPF.GUI;
|
||||
|
||||
public partial class ProgramLabel : UserControl
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<UserControl x:Class="launcher_client_win.GUI.ProgramSettingsPanelItem"
|
||||
<UserControl x:Class="Launcher.Client.WPF.GUI.ProgramSettingsPanelItem"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:launcher_client_win.GUI"
|
||||
xmlns:local="clr-namespace:Launcher.Client.WPF.GUI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignWidth="100"
|
||||
d:DesignHeight="30"
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace launcher_client_win.GUI;
|
||||
namespace Launcher.Client.WPF.GUI;
|
||||
|
||||
public partial class ProgramSettingsPanelItem : UserControl
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace launcher_client_win.GUI;
|
||||
namespace Launcher.Client.WPF.GUI;
|
||||
|
||||
public class TabButton : Button
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace launcher_client_win;
|
||||
namespace Launcher.Client.WPF;
|
||||
|
||||
public class LauncherConfig
|
||||
{
|
||||
@ -21,7 +21,7 @@ public class LauncherConfig
|
||||
{
|
||||
// читает дефолтный конфиг из ресурсов
|
||||
DtsodV23 updatedConfig;
|
||||
DtsodV23 updatedDefault = new(ReadResource("launcher_client_win.Resources.launcher.dtsod"));
|
||||
DtsodV23 updatedDefault = new(EmbeddedResources.ReadText("Launcher.Client.WPF.Resources.launcher.dtsod"));
|
||||
// проверка и обновление конфига
|
||||
if (File.Exists(configFile))
|
||||
{
|
||||
31
launcher-client-wpf/LauncherLogger.cs
Normal file
31
launcher-client-wpf/LauncherLogger.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using DTLib.Loggers;
|
||||
|
||||
namespace Launcher.Client.WPF;
|
||||
|
||||
public class LauncherLogger : ConsoleLogger
|
||||
{
|
||||
public const string LogfileDir = "launcher-logs";
|
||||
public LauncherLogger() : base(LogfileDir,"launcher-client-wpf")
|
||||
{ }
|
||||
|
||||
private readonly StringBuilder _buffer = new();
|
||||
public string Buffer
|
||||
{
|
||||
get { lock (_buffer) return _buffer.ToString(); }
|
||||
}
|
||||
|
||||
public event Action<string> MessageSent;
|
||||
|
||||
public override void Log(params string[] msg)
|
||||
{
|
||||
base.Log(msg);
|
||||
StringBuilder strb = new();
|
||||
if (msg.Length == 1) strb.Append(msg[0]);
|
||||
else for (int i = 1; i < msg.Length; i += 2)
|
||||
strb.Append(msg[i]);
|
||||
strb.Append('\n');
|
||||
string msgConnected = strb.ToString();
|
||||
MessageSent?.Invoke(msgConnected);
|
||||
lock (_buffer) _buffer.Append(msgConnected);
|
||||
}
|
||||
}
|
||||
@ -7,16 +7,14 @@ global using System.Diagnostics;
|
||||
global using System.Net;
|
||||
global using System.Text;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Threading;
|
||||
global using System.Linq;
|
||||
global using System.Windows;
|
||||
global using static launcher_client_win.Launcher;
|
||||
using System.Reflection;
|
||||
using launcher_client_win.GUI;
|
||||
global using static Launcher.Client.WPF.LauncherMain;
|
||||
using Launcher.Client.WPF.GUI;
|
||||
|
||||
namespace launcher_client_win;
|
||||
namespace Launcher.Client.WPF;
|
||||
|
||||
public static class Launcher
|
||||
public static class LauncherMain
|
||||
{
|
||||
public static LauncherConfig Config;
|
||||
public static readonly LauncherLogger Logger = new();
|
||||
@ -24,7 +22,6 @@ public static class Launcher
|
||||
|
||||
public static void _Main(string[] args)
|
||||
{
|
||||
Logger.Enable();
|
||||
Config = new LauncherConfig();
|
||||
Directory.Create("descriptors");
|
||||
Directory.Create("icons");
|
||||
@ -32,20 +29,11 @@ public static class Launcher
|
||||
Directory.Create("installed");
|
||||
Directory.Create("settings");
|
||||
File.WriteAllText($"descriptors{Путь.Разд}default.descriptor.template",
|
||||
ReadResource("launcher_client_win.Resources.default.descriptor.template"));
|
||||
CurrentLauncherWindow = new();
|
||||
EmbeddedResources.ReadText("Launcher.Client.WPF.Resources.default.descriptor.template"));
|
||||
CurrentLauncherWindow = new LauncherWindow();
|
||||
CurrentLauncherWindow.Show();
|
||||
}
|
||||
|
||||
public static string ReadResource(string resource_path)
|
||||
{
|
||||
using var resourceStreamReader = new System.IO.StreamReader(
|
||||
Assembly.GetExecutingAssembly().GetManifestResourceStream(resource_path)
|
||||
?? throw new Exception($"embedded resource <{resource_path}> not found"),
|
||||
Encoding.UTF8);
|
||||
return resourceStreamReader.ReadToEnd();
|
||||
}
|
||||
|
||||
public static void LogError(string context, Exception ex)
|
||||
{
|
||||
string errmsg = $"{context} ERROR:\n{ex}";
|
||||
@ -1,7 +1,7 @@
|
||||
using System.Windows.Controls;
|
||||
using launcher_client_win.GUI;
|
||||
using Launcher.Client.WPF.GUI;
|
||||
|
||||
namespace launcher_client_win;
|
||||
namespace Launcher.Client.WPF;
|
||||
|
||||
public class Program
|
||||
{
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@ -4,7 +4,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWPF>true</UseWPF>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<RootNamespace>launcher_client_win</RootNamespace>
|
||||
<RootNamespace>Launcher.Client.WPF</RootNamespace>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<DebugType>full</DebugType>
|
||||
@ -21,14 +21,14 @@
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Dtsod.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Network.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\*" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -11,26 +11,25 @@ global using System.Threading;
|
||||
global using System.Linq;
|
||||
using System.Globalization;
|
||||
|
||||
namespace launcher_server;
|
||||
namespace Launcher.Server;
|
||||
|
||||
static class Server
|
||||
{
|
||||
static readonly Socket mainSocket = new(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
static DtsodV23 config;
|
||||
private static readonly DTLib.Loggers.AsyncLogger Logger = new("logs", "launcher-server");
|
||||
private static readonly DTLib.Loggers.ConsoleLogger Logger = new("logs", "launcher-server");
|
||||
|
||||
static readonly object manifestLocker = new();
|
||||
|
||||
static void Main(string[] args)
|
||||
static void Main()
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.Title = "minecraft_launcher_server";
|
||||
Console.Title = "Launcher.Server";
|
||||
Console.InputEncoding = Encoding.Unicode;
|
||||
Console.OutputEncoding = Encoding.Unicode;
|
||||
Logger.Enable();
|
||||
PublicLog.LogEvent += Logger.LogAsync;
|
||||
PublicLog.LogNoTimeEvent += Logger.LogAsync;
|
||||
PublicLog.LogEvent += Logger.Log;
|
||||
PublicLog.LogNoTimeEvent += Logger.Log;
|
||||
config = new DtsodV23(File.ReadAllText("launcher-server.dtsod"));
|
||||
Logger.Log("b", "local address: <", "c", config["local_ip"], "b",
|
||||
">\npublic address: <", "c", OldNetwork.GetPublicIP(), "b",
|
||||
@ -63,7 +62,7 @@ static class Server
|
||||
// запускается для каждого юзера в отдельном потоке
|
||||
static void UserHandle(Socket handlerSocket)
|
||||
{
|
||||
Logger.LogAsync("b", "user connecting... ");
|
||||
Logger.Log("b", "user connecting... ");
|
||||
try
|
||||
{
|
||||
// запрос хеша пароля и логина
|
||||
@ -74,7 +73,7 @@ static class Server
|
||||
// запрос от апдейтера
|
||||
if (hash == hasher.HashCycled("updater".ToBytes(),64))
|
||||
{
|
||||
Logger.LogAsync("b", "user is ", "c", "updater");
|
||||
Logger.Log("b", "user is ", "c", "updater");
|
||||
handlerSocket.SendPackage("updater".ToBytes());
|
||||
// обработка запросов
|
||||
while (true)
|
||||
@ -85,11 +84,11 @@ static class Server
|
||||
switch (request)
|
||||
{
|
||||
case "requesting launcher update":
|
||||
Logger.LogAsync("b", "updater requested client.exe");
|
||||
Logger.Log("b", "updater requested client.exe");
|
||||
fsp.UploadFile("share\\launcher.exe");
|
||||
break;
|
||||
case "register new user":
|
||||
Logger.LogAsync("b", "new user registration requested");
|
||||
Logger.Log("b", "new user registration requested");
|
||||
handlerSocket.SendPackage("ready".ToBytes());
|
||||
string req = StringConverter.MergeToString(
|
||||
hasher.HashCycled(handlerSocket.GetPackage(), 64).HashToString(),
|
||||
@ -97,7 +96,7 @@ static class Server
|
||||
"\";\n\tuuid: \"null\";\n};");
|
||||
string filepath = $"registration_requests\\{DateTime.Now.ToString(CultureInfo.InvariantCulture).НормализоватьДляПути()}.req";
|
||||
File.WriteAllText(filepath, req);
|
||||
Logger.LogAsync("b", $"text wrote to file <", "c", $"registration_requests\\{filepath}", "b", ">");
|
||||
Logger.Log("b", $"text wrote to file <", "c", $"registration_requests\\{filepath}", "b", ">");
|
||||
break;
|
||||
default:
|
||||
throw new Exception("unknown request: " + request);
|
||||
@ -109,7 +108,7 @@ static class Server
|
||||
// запрос от юзера
|
||||
else if (FindUser(hash, out var user))
|
||||
{
|
||||
Logger.LogAsync("b", $"user is ", "c", user.name);
|
||||
Logger.Log("b", $"user is ", "c", user.name);
|
||||
handlerSocket.SendPackage("launcher".ToBytes());
|
||||
// обработка запросов
|
||||
while (true)
|
||||
@ -121,7 +120,7 @@ static class Server
|
||||
{
|
||||
case "requesting file download":
|
||||
var file = handlerSocket.GetPackage().ToString();
|
||||
Logger.LogAsync("b", $"user ", "c", user.name, "b", " requested file ", "c", file);
|
||||
Logger.Log("b", $"user ", "c", user.name, "b", " requested file ", "c", file);
|
||||
if (file == "manifest.dtsod")
|
||||
{
|
||||
lock (manifestLocker) fsp.UploadFile("share\\manifest.dtsod");
|
||||
@ -129,18 +128,18 @@ static class Server
|
||||
else fsp.UploadFile($"share\\{file}");
|
||||
break;
|
||||
case "requesting uuid":
|
||||
Logger.LogAsync("b", $"user ", "c", user.name, "b", " requested uuid");
|
||||
Logger.Log("b", $"user ", "c", user.name, "b", " requested uuid");
|
||||
handlerSocket.SendPackage(user.uuid.ToBytes());
|
||||
break;
|
||||
case "excess files found":
|
||||
Logger.LogAsync("b", $"user ", "c", user.name, "b", " sent excess files list");
|
||||
Logger.Log("b", $"user ", "c", user.name, "b", " sent excess files list");
|
||||
fsp.DownloadFile($"excesses\\{user.name}-" +
|
||||
$"{DateTime.Now.ToString(CultureInfo.InvariantCulture).НормализоватьДляПути()}.txt");
|
||||
break;
|
||||
case "sending launcher error":
|
||||
Logger.LogAsync("y", "user ", "c", user.name, "y", "is sending error:");
|
||||
Logger.Log("y", "user ", "c", user.name, "y", "is sending error:");
|
||||
string error = handlerSocket.GetPackage().ToString();
|
||||
Logger.LogAsync("y", error + '\n');
|
||||
Logger.Log("y", error + '\n');
|
||||
break;
|
||||
default:
|
||||
throw new Exception("unknown request: " + request);
|
||||
@ -152,13 +151,13 @@ static class Server
|
||||
// неизвестный юзер
|
||||
else
|
||||
{
|
||||
Logger.LogAsync("y", $"user with hash <{hash.HashToString()}> not found");
|
||||
Logger.Log("y", $"user with hash <{hash.HashToString()}> not found");
|
||||
handlerSocket.SendPackage("user not found".ToBytes());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogAsync("y", $"UserStart() error:\n message:\n {ex}");
|
||||
Logger.Log("y", $"UserStart() error:\n message:\n {ex}");
|
||||
if (mainSocket.Connected)
|
||||
{
|
||||
mainSocket.Shutdown(SocketShutdown.Both);
|
||||
@ -169,7 +168,7 @@ static class Server
|
||||
{
|
||||
if (handlerSocket.Connected) handlerSocket.Shutdown(SocketShutdown.Both);
|
||||
handlerSocket.Close();
|
||||
Logger.LogAsync("g", "user disconnected");
|
||||
Logger.Log("g", "user disconnected");
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,7 +190,7 @@ static class Server
|
||||
.MergeToString("\",\"")
|
||||
.Replace($"share\\sync_and_remove\\", "")+
|
||||
"\"];");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static bool FindUser(byte[] hash, out (string name, string uuid) user)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>launcher_server</RootNamespace>
|
||||
<RootNamespace>Launcher.Server</RootNamespace>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<DebugType>full</DebugType>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user