Skip to content

Commit 40bb030

Browse files
committed
Merge pull request #1485 from kellyelton/master
Fixed lag window being closable and changed some text
2 parents bbae1d1 + 5e3187b commit 40bb030

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

octgnFX/Octgn/WindowManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static void Shutdown()
7373
{
7474
if (UiLagWindow.IsLoaded)
7575
{
76-
UiLagWindow.Close();
76+
UiLagWindow.RealClose();
7777
}
7878

7979
}

octgnFX/Octgn/Windows/UiLagWindow.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
Title="" Width="382" WindowStyle="SingleBorderWindow" SizeToContent="Height"
5-
Background="White">
5+
Background="White" ShowInTaskbar="False" ResizeMode="NoResize">
66
<StackPanel>
77
<Border Padding="10 5">
88
<StackPanel>
9-
<TextBlock Foreground="SteelBlue" FontWeight="Bold" FontSize="18" HorizontalAlignment="Center">OCTGN Is Lagging</TextBlock>
9+
<TextBlock Foreground="SteelBlue" FontWeight="Bold" FontSize="18" HorizontalAlignment="Center">OCTGN Is Frozen</TextBlock>
10+
<TextBlock FontWeight="Bold">This has nothing to do with your internet connection.</TextBlock>
1011
<TextBlock FontWeight="Bold">Don't worry, you're still connected to your game.</TextBlock>
1112
<Rectangle Height="10"/>
1213
<TextBlock FontWeight="Bold">This is happening for one of the following reasons</TextBlock>

octgnFX/Octgn/Windows/UiLagWindow.xaml.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.ComponentModel;
23
using System.Runtime.InteropServices;
34
using System.Windows;
45
using System.Windows.Interop;
@@ -8,6 +9,8 @@ namespace Octgn.Windows
89
{
910
public partial class UiLagWindow
1011
{
12+
private bool _isClosing;
13+
1114
[DllImport("user32.dll")]
1215
[return: MarshalAs(UnmanagedType.Bool)]
1316
static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
@@ -67,5 +70,21 @@ public void HideLagWindow()
6770
}
6871
this.Hide();
6972
}
73+
74+
public void RealClose()
75+
{
76+
this._isClosing = true;
77+
this.Close();
78+
}
79+
80+
protected override void OnClosing(CancelEventArgs e)
81+
{
82+
if (_isClosing == false)
83+
{
84+
e.Cancel = true;
85+
return;
86+
}
87+
base.OnClosing(e);
88+
}
7089
}
7190
}

recentchanges.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
1+
Updated lag window so it isn't cloasable - Kelly
2+
Changed some text in the window - Kelly

0 commit comments

Comments
 (0)