mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix some other things
This commit is contained in:
parent
2805263a63
commit
0d5be93616
@ -494,7 +494,7 @@ namespace Bloxstrap
|
|||||||
string oldStartPath = Path.Combine(Paths.WindowsStartMenu, "Bloxstrap");
|
string oldStartPath = Path.Combine(Paths.WindowsStartMenu, "Bloxstrap");
|
||||||
|
|
||||||
if (File.Exists(oldDesktopPath))
|
if (File.Exists(oldDesktopPath))
|
||||||
File.Move(oldDesktopPath, DesktopShortcut);
|
File.Move(oldDesktopPath, DesktopShortcut, true);
|
||||||
|
|
||||||
if (Directory.Exists(oldStartPath))
|
if (Directory.Exists(oldStartPath))
|
||||||
{
|
{
|
||||||
|
@ -226,7 +226,7 @@ namespace Bloxstrap.Integrations
|
|||||||
{
|
{
|
||||||
var lastActivity = History.First();
|
var lastActivity = History.First();
|
||||||
|
|
||||||
if (lastActivity is not null && Data.UniverseId == lastActivity.UniverseId && Data.IsTeleport)
|
if (Data.UniverseId == lastActivity.UniverseId && Data.IsTeleport)
|
||||||
Data.RootActivity = lastActivity.RootActivity ?? lastActivity;
|
Data.RootActivity = lastActivity.RootActivity ?? lastActivity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,8 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
|||||||
|
|
||||||
private ServerInformation? _serverInformationWindow;
|
private ServerInformation? _serverInformationWindow;
|
||||||
|
|
||||||
|
private ServerHistory? _gameHistoryWindow;
|
||||||
|
|
||||||
public MenuContainer(Watcher watcher)
|
public MenuContainer(Watcher watcher)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -51,14 +53,14 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
|||||||
{
|
{
|
||||||
if (_serverInformationWindow is null)
|
if (_serverInformationWindow is null)
|
||||||
{
|
{
|
||||||
_serverInformationWindow = new ServerInformation(_watcher);
|
_serverInformationWindow = new(_watcher);
|
||||||
_serverInformationWindow.Closed += (_, _) => _serverInformationWindow = null;
|
_serverInformationWindow.Closed += (_, _) => _serverInformationWindow = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_serverInformationWindow.IsVisible)
|
if (!_serverInformationWindow.IsVisible)
|
||||||
_serverInformationWindow.Show();
|
_serverInformationWindow.ShowDialog();
|
||||||
|
else
|
||||||
_serverInformationWindow.Activate();
|
_serverInformationWindow.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ActivityWatcher_OnLogOpen(object? sender, EventArgs e) =>
|
public void ActivityWatcher_OnLogOpen(object? sender, EventArgs e) =>
|
||||||
@ -135,7 +137,16 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
|||||||
if (_activityWatcher is null)
|
if (_activityWatcher is null)
|
||||||
throw new ArgumentNullException(nameof(_activityWatcher));
|
throw new ArgumentNullException(nameof(_activityWatcher));
|
||||||
|
|
||||||
new ServerHistory(_activityWatcher).ShowDialog();
|
if (_gameHistoryWindow is null)
|
||||||
|
{
|
||||||
|
_gameHistoryWindow = new(_activityWatcher);
|
||||||
|
_gameHistoryWindow.Closed += (_, _) => _gameHistoryWindow = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_gameHistoryWindow.IsVisible)
|
||||||
|
_gameHistoryWindow.ShowDialog();
|
||||||
|
else
|
||||||
|
_gameHistoryWindow.Activate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user