Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
v0.1.0.9 + Update URL in About dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjp600 committed Feb 4, 2022
1 parent 9406f65 commit 1744a15
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
14 changes: 10 additions & 4 deletions CBRE.Editor/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using LayoutSettings = CBRE.Editor.UI.Layout.LayoutSettings;

Expand Down Expand Up @@ -424,12 +425,17 @@ private void DocumentSaved(Document doc) {
UpdateTitle();
}

private static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;

private string titleStart
=> $"CBRE v{Version}";

private void UpdateTitle() {
if (DocumentManager.CurrentDocument != null) {
var doc = DocumentManager.CurrentDocument;
Text = "CBRE - " + (String.IsNullOrWhiteSpace(doc.MapFile) ? "Untitled" : System.IO.Path.GetFileName(doc.MapFile));
Text = $"{titleStart} - {(String.IsNullOrWhiteSpace(doc.MapFile) ? "Untitled" : System.IO.Path.GetFileName(doc.MapFile))}";
} else {
Text = "CBRE";
Text = titleStart;
}
}

Expand All @@ -444,7 +450,7 @@ private void DocumentAllClosed() {
StatusZoomLabel.Text = "";
StatusSnapLabel.Text = "";
StatusTextLabel.Text = "";
Text = "CBRE";
Text = titleStart;
}

private void MouseCoordinatesChanged(Coordinate coord) {
Expand Down Expand Up @@ -564,7 +570,7 @@ public void ScreenshotViewport(object parameter) {
var ext = focused is Viewport2D || (focused is Viewport3D && ((Viewport3D)focused).Type != Viewport3D.ViewType.Textured) ? ".png" : ".jpg";

using (var sfd = new SaveFileDialog()) {
sfd.FileName = "CBRE - "
sfd.FileName = $"{titleStart} - "
+ (DocumentManager.CurrentDocument != null ? DocumentManager.CurrentDocument.MapFileName : "untitled")
+ " - " + DateTime.Now.ToString("yyyy-MM-ddThh-mm-ss") + ext;
sfd.Filter = "Image Files (*.png, *.jpg, *.bmp)|*.png;*.jpg;*.bmp";
Expand Down
6 changes: 3 additions & 3 deletions CBRE.Editor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CBRE")]
[assembly: AssemblyCopyright("Copyright © juanjp600 2021, based on Sledge by http://logic-and-trick.com 2014")]
[assembly: AssemblyCopyright("Copyright © juanjp600 2022, based on Sledge by http://logic-and-trick.com 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.8")]
[assembly: AssemblyFileVersion("0.1.0.8")]
[assembly: AssemblyVersion("0.1.0.9")]
[assembly: AssemblyFileVersion("0.1.0.9")]
4 changes: 2 additions & 2 deletions CBRE.Editor/UI/AboutDialog.Designer.cs

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

2 changes: 1 addition & 1 deletion CBRE.Editor/UI/AboutDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public AboutDialog()
VersionLabel.Text = FileVersionInfo.GetVersionInfo(typeof(Editor).Assembly.Location).FileVersion;

LTLink.Click += (s, e) => Mediator.Publish(EditorMediator.OpenWebsite, "http://logic-and-trick.com");
GithubLink.Click += (s, e) => Mediator.Publish(EditorMediator.OpenWebsite, "https://github.com/juanjp600/sledge");
GithubLink.Click += (s, e) => Mediator.Publish(EditorMediator.OpenWebsite, "https://github.com/SCP-CBN/cbre");
GPLLink.Click += (s, e) => Mediator.Publish(EditorMediator.OpenWebsite, "http://www.gnu.org/licenses/gpl-2.0.html");
}
}
Expand Down
12 changes: 6 additions & 6 deletions CBRE.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29911.84
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CBRE.UI", "CBRE.UI\CBRE.UI.csproj", "{ABBEE97F-B5A6-4ED6-8D8F-6D4091FB9D44}"
EndProject
Expand Down Expand Up @@ -128,16 +128,16 @@ Global
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Debug|x86.Build.0 = Debug|x86
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x64.ActiveCfg = Release|Any CPU
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x64.Build.0 = Release|Any CPU
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x86.ActiveCfg = Release|Any CPU
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x86.Build.0 = Release|Any CPU
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x86.ActiveCfg = Release|x86
{582ED347-E705-4EF5-B6DD-5AC1191D2FC2}.Release|x86.Build.0 = Release|x86
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Debug|x64.ActiveCfg = Debug|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Debug|x64.Build.0 = Debug|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Debug|x86.ActiveCfg = Debug|x86
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Debug|x86.Build.0 = Debug|x86
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x64.ActiveCfg = Release|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x64.Build.0 = Release|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x86.ActiveCfg = Release|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x86.Build.0 = Release|Any CPU
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x86.ActiveCfg = Release|x86
{F63AFB39-8F25-4997-AAE2-3459B593980B}.Release|x86.Build.0 = Release|x86
{E4242C98-6AE0-487B-86B2-031867444865}.Debug|x64.ActiveCfg = Debug|x64
{E4242C98-6AE0-487B-86B2-031867444865}.Debug|x64.Build.0 = Debug|x64
{E4242C98-6AE0-487B-86B2-031867444865}.Debug|x86.ActiveCfg = Debug|x86
Expand Down

0 comments on commit 1744a15

Please sign in to comment.