Skip to content

Commit 340c8bf

Browse files
committed
Added version info to form title.
1 parent 0b43e75 commit 340c8bf

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

SvgFileType/UIDialog.Designer.cs

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SvgFileType/UIDialog.cs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@ namespace SvgFileTypePlugin
66
{
77
public partial class UiDialog : Form
88
{
9-
public UiDialog()
10-
{
11-
InitializeComponent();
12-
warningBox.Image = SystemIcons.Warning.ToBitmap();
13-
}
14-
15-
public int Dpi => (int)nudDpi.Value;
16-
public int CanvasW => (int)canvasw.Value;
17-
public int CanvasH => (int)canvash.Value;
9+
public int Dpi => (int) nudDpi.Value;
10+
public int CanvasW => (int) canvasw.Value;
11+
public int CanvasH => (int) canvash.Value;
1812
public bool KeepAspectRatio => cbKeepAR.Checked;
19-
private Size _sizeHint;
20-
private bool _changedProgramatically;
21-
private int _originalPdi = 96;
2213
public bool ImportOpacity => cbOpacity.Checked;
2314
public bool ImportHiddenLayers => cbLayers.Checked;
2415
public bool ImportGroupBoundariesAsLayers => cbPSDSupport.Checked;
16+
public event EventHandler OkClick;
2517

18+
private const string VersionString = "0.3-alpha";
2619
private const int BigImageSize = 1280;
27-
public event EventHandler OkClick;
20+
private Size _sizeHint;
21+
private bool _changedProgramatically;
22+
private int _originalPdi = 96;
23+
24+
public UiDialog()
25+
{
26+
InitializeComponent();
27+
warningBox.Image = SystemIcons.Warning.ToBitmap();
28+
Text = "SVG Import Plug-in v" + VersionString;
29+
}
30+
2831
public LayersMode LayerMode
2932
{
3033
get
@@ -38,6 +41,7 @@ public LayersMode LayerMode
3841
{
3942
return LayersMode.Flat;
4043
}
44+
4145
return LayersMode.Groups;
4246
}
4347
}
@@ -152,14 +156,15 @@ private void ResolveControlsVisibility()
152156

153157
private void linkGitHub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
154158
{
155-
System.Diagnostics.Process.Start(@"https://github.com/otuncelli/Scalable-Vector-Graphics-Plugin-for-Paint.NET");
159+
System.Diagnostics.Process.Start(
160+
@"https://github.com/otuncelli/Scalable-Vector-Graphics-Plugin-for-Paint.NET");
156161
}
157162

158163
public void ReportProgress(int value)
159164
{
160165
if (progress.InvokeRequired)
161166
{
162-
progress.BeginInvoke((Action)(() =>
167+
progress.BeginInvoke((Action) (() =>
163168
{
164169
progress.Value = value;
165170
UpdateProgressLabel();
@@ -181,7 +186,7 @@ public void SetMaxProgress(int max)
181186
{
182187
if (progress.InvokeRequired)
183188
{
184-
progress.BeginInvoke((Action)(() =>
189+
progress.BeginInvoke((Action) (() =>
185190
{
186191
progress.Maximum = max;
187192
UpdateProgressLabel();
@@ -200,4 +205,4 @@ private void btnOk_Click(object sender, EventArgs e)
200205
OkClick?.Invoke(sender, e);
201206
}
202207
}
203-
}
208+
}

0 commit comments

Comments
 (0)