Skip to content

Commit

Permalink
UI defaults, version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
NTDLS committed Nov 3, 2023
1 parent 9424ca0 commit 1a93a42
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 29 deletions.
2 changes: 1 addition & 1 deletion @Installers/Service.Iss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define AppVersion "0.3.0.0"
#define AppVersion "0.4.0.0"

[Setup]
;-- Main Setup Information
Expand Down
8 changes: 4 additions & 4 deletions NetTunnel.ClientAPI/NetTunnel.ClientAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<Company>NetworkDLS</Company>
<Authors>NetworkDLS</Authors>
<Copyright>Copyright © 2023 NetworkDLS</Copyright>
<AssemblyVersion>0.3.0.0</AssemblyVersion>
<FileVersion>0.3.0.0</FileVersion>
<VersionPrefix>0.3.0.0</VersionPrefix>
<Version>0.3.0.0</Version>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<VersionPrefix>0.4.0.0</VersionPrefix>
<Version>0.4.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions NetTunnel.Library/NetTunnel.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<Company>NetworkDLS</Company>
<Authors>NetworkDLS</Authors>
<Copyright>Copyright © 2023 NetworkDLS</Copyright>
<AssemblyVersion>0.3.0.0</AssemblyVersion>
<FileVersion>0.3.0.0</FileVersion>
<VersionPrefix>0.3.0.0</VersionPrefix>
<Version>0.3.0.0</Version>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<VersionPrefix>0.4.0.0</VersionPrefix>
<Version>0.4.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions NetTunnel.Library/Persistence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,15 @@ public static void SaveToDisk<T>(T obj)
}
return default;
}

public static T LoadFromDisk<T>(T defaultResult)
{
var result = LoadFromDisk<T>();
if (result == null)
{
return defaultResult;
}
return result;
}
}
}
8 changes: 4 additions & 4 deletions NetTunnel.Service/NetTunnel.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<Company>NetworkDLS</Company>
<Authors>NetworkDLS</Authors>
<Copyright>Copyright © 2023 NetworkDLS</Copyright>
<AssemblyVersion>0.3.0.0</AssemblyVersion>
<FileVersion>0.3.0.0</FileVersion>
<VersionPrefix>0.3.0.0</VersionPrefix>
<Version>0.3.0.0</Version>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<VersionPrefix>0.4.0.0</VersionPrefix>
<Version>0.4.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions NetTunnel.UI/Forms/FormLogin.Designer.cs

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

18 changes: 12 additions & 6 deletions NetTunnel.UI/Forms/FormLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,23 @@ public FormLogin()
AcceptButton = buttonLogin;
CancelButton = buttonCancel;

var preferences = Persistence.LoadFromDisk<UILoginPreferences>();
if (preferences != null)
var preferences = Persistence.LoadFromDisk<UILoginPreferences>(new UILoginPreferences
{
textBoxAddress.Text = preferences.Address;
textBoxPort.Text = preferences.Port;
textBoxUsername.Text = preferences.Username;
}
Address = "127.0.0.1",
Port = "52845",
Username = "root"
});

textBoxAddress.Text = preferences.Address;
textBoxPort.Text = preferences.Port;
textBoxUsername.Text = preferences.Username;

#if DEBUG
textBoxPassword.Text = Environment.MachineName.ToLower();
#endif

textBoxPassword.Focus();

}

private void buttonLogin_Click(object sender, EventArgs e)
Expand Down
8 changes: 4 additions & 4 deletions NetTunnel.UI/NetTunnel.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<Company>NetworkDLS</Company>
<Authors>NetworkDLS</Authors>
<Copyright>Copyright © 2023 NetworkDLS</Copyright>
<AssemblyVersion>0.3.0.0</AssemblyVersion>
<FileVersion>0.3.0.0</FileVersion>
<VersionPrefix>0.3.0.0</VersionPrefix>
<Version>0.3.0.0</Version>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<VersionPrefix>0.4.0.0</VersionPrefix>
<Version>0.4.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 1a93a42

Please sign in to comment.