mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-07-16 08:01:01 +03:00
Compare commits
No commits in common. "6d3db23f804e4c82de0f9b1c6b340f99cbdc21af" and "8002236c1f6e822721193e4972fd977febfaa809" have entirely different histories.
6d3db23f80
...
8002236c1f
@ -9,8 +9,7 @@
|
||||
Icon="avares://DiscordHistoryTracker/Resources/icon.ico"
|
||||
Width="800" Height="500"
|
||||
MinWidth="480" MinHeight="240"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Closed="OnClosed">
|
||||
WindowStartupLocation="CenterScreen">
|
||||
|
||||
<Design.DataContext>
|
||||
<main:MainWindowModel />
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
@ -25,11 +24,5 @@ namespace DHT.Desktop.Main {
|
||||
this.AttachDevTools();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OnClosed(object? sender, EventArgs e) {
|
||||
if (DataContext is IDisposable disposable) {
|
||||
disposable.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ using DHT.Server.Database;
|
||||
using DHT.Utils.Models;
|
||||
|
||||
namespace DHT.Desktop.Main {
|
||||
sealed class MainWindowModel : BaseModel, IDisposable {
|
||||
sealed class MainWindowModel : BaseModel {
|
||||
private const string DefaultTitle = "Discord History Tracker";
|
||||
|
||||
public string Title { get; private set; } = DefaultTitle;
|
||||
@ -104,10 +104,5 @@ namespace DHT.Desktop.Main {
|
||||
private void MainContentScreenModelOnDatabaseClosed(object? sender, EventArgs e) {
|
||||
WelcomeScreenModel.CloseDatabase();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
MainContentScreenModel?.Dispose();
|
||||
db?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
namespace DHT.Server.Service {
|
||||
public static class ServerLauncher {
|
||||
private static readonly Log Log = Log.ForType(typeof(ServerLauncher));
|
||||
|
||||
|
||||
private static IWebHost? Server { get; set; } = null;
|
||||
|
||||
public static bool IsRunning { get; private set; }
|
||||
@ -29,7 +29,6 @@ namespace DHT.Server.Service {
|
||||
try {
|
||||
if (ManagementThread == null) {
|
||||
ManagementThread = new Thread(RunManagementThread) {
|
||||
Name = "DHT server management thread",
|
||||
IsBackground = true
|
||||
};
|
||||
ManagementThread.Start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user