-
Notifications
You must be signed in to change notification settings - Fork 0
/
About.cs
78 lines (70 loc) · 2.7 KB
/
About.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Drawing;
using System.Windows.Forms;
namespace BCFviewer {
/// <Summary> Main class of the "About" form </Summary>
public partial class AboutForm : Form {
/// <Summary> "About" Form constructor </Summary>
public AboutForm() {
InitializeComponent();
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(400, 300);
Text = "BCF Viewer - About"; // Title
StartPosition = FormStartPosition.CenterScreen;
FormBorderStyle = FormBorderStyle.FixedDialog;
MinimizeBox = false;
MaximizeBox = false;
Padding = new Padding(20, 40, 20, 40);
SplitContainer vsp = new SplitContainer();
vsp.Dock = DockStyle.Fill;
vsp.Orientation = Orientation.Horizontal;
vsp.SplitterDistance = 32;
vsp.SplitterWidth = 40;
vsp.IsSplitterFixed = true;
vsp.TabStop = false;
PictureBox img = new PictureBox();
//img.Bounds = new Rectangle(0,0,48,48);
img.Dock = DockStyle.Fill;
img.TabStop = false;
img.SizeMode = PictureBoxSizeMode.Zoom;
img.BorderStyle = BorderStyle.None;
img.Image = new Bitmap("icons\\BCFicon.ico");
RichTextBox txt = new RichTextBox();
txt.Dock = DockStyle.Fill;
txt.BorderStyle = BorderStyle.None;
txt.ReadOnly = true;
txt.Text = "BCF File Viewer Version 1.2.0\n\n" +
"By Emmanuel Maschas\n" +
"December 2020\n\n" +
"Report issues at https://github.com/emaschas/BCFviewer/issues";
txt.TabStop = false;
txt.LinkClicked += new LinkClickedEventHandler(OpenReportLink);
vsp.Panel1.Controls.Add(img);
vsp.Panel2.Controls.Add(txt);
Controls.Add(vsp);
}
private void OpenReportLink(object sender, LinkClickedEventArgs args) {
var psi = new System.Diagnostics.ProcessStartInfo {
FileName = args.LinkText,
UseShellExecute = true
};
System.Diagnostics.Process.Start(psi);
}
#region Windows Form Designer
/// <summary> Required designer variable. </summary>
private System.ComponentModel.IContainer components = null;
/// <summary> Clean up any resources being used. </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if(disposing && (this.components != null)) {
this.components.Dispose();
}
base.Dispose(disposing);
}
/// <summary> Required method for Designer support - do not modify. </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
}
#endregion
}
}