Skip to content

Commit

Permalink
Improved Session Log UI
Browse files Browse the repository at this point in the history
	modified:   Sonic-06-Toolkit/src/Sonic-06-Toolkit/ToolkitEnvironmentX.cs
	modified:   Sonic-06-Toolkit/src/Sonic-06-Toolkit/ToolkitSessionLog.Designer.cs
	modified:   Sonic-06-Toolkit/src/Sonic-06-Toolkit/ToolkitSessionLog.cs
  • Loading branch information
HyperPolygon64 committed Nov 24, 2019
1 parent fcff8be commit a8004ff
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Toolkit.EnvironmentX
{
public partial class Main : Form
{
public static readonly string versionNumber = "Version 3.09-indev-241119"; // Defines the version number to be used globally
public static readonly string versionNumber = "Version 3.09"; // Defines the version number to be used globally
public static List<string> sessionLog = new List<string>();
public static string repackBuildSession = string.Empty;
public static string serverStatus = string.Empty;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions Sonic-06-Toolkit/src/Sonic-06-Toolkit/ToolkitSessionLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ namespace Toolkit.Logs
{
public partial class ToolkitSessionLog : Form
{
int locationX = 0;
int locationY = 0;

public ToolkitSessionLog() {
InitializeComponent();
Location = new Point(Properties.Settings.Default.log_X, Properties.Settings.Default.log_Y);
Expand Down Expand Up @@ -104,8 +107,13 @@ private void Nud_RefreshTimer_ValueChanged(object sender, EventArgs e) {
}

private void ToolkitSessionLog_FormClosing(object sender, FormClosingEventArgs e) {
Properties.Settings.Default.log_X = Left;
Properties.Settings.Default.log_Y = Top;
if (WindowState == FormWindowState.Maximized) {
Properties.Settings.Default.log_X = 25;
Properties.Settings.Default.log_Y = 25;
} else {
Properties.Settings.Default.log_X = Left;
Properties.Settings.Default.log_Y = Top;
}
Properties.Settings.Default.log_timestamps = options_Timestamps.Checked;
Properties.Settings.Default.log_Startup = false;

Expand Down Expand Up @@ -157,5 +165,17 @@ private void btn_Refresh_Click(object sender, EventArgs e) {
else
foreach (string log in Main.sessionLog) list_Logs.Items.Add(log);
}

private void ToolkitSessionLog_Resize(object sender, EventArgs e) {
locationX = Location.X;
locationY = Location.Y;
if (WindowState == FormWindowState.Maximized) {
Properties.Settings.Default.log_X = 25;
Properties.Settings.Default.log_Y = 25;
} else {
Properties.Settings.Default.log_X = locationX;
Properties.Settings.Default.log_Y = locationY;
}
}
}
}

0 comments on commit a8004ff

Please sign in to comment.