annotate AboutForm.cs @ 0:aca8706f4eec default tip

Initial commit
author Brad Greco <brad@bgreco.net>
date Mon, 13 Oct 2014 21:28:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
1 using System;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
2 using System.Collections.Generic;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
3 using System.ComponentModel;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
4 using System.Data;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
5 using System.Drawing;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
6 using System.Text;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
7 using System.Windows.Forms;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
8 using System.Reflection;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
9 using System.Diagnostics;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
10
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
11 /*
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
12 * Copyright (c) 2014 Brad Greco <brad@bgreco.net>
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
13 */
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
14 namespace QuickQR
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
15 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 public partial class AboutForm : Form
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
17 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
18 public AboutForm()
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
19 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
20 InitializeComponent();
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
21 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
22
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
23 private void AboutForm_Load(object sender, EventArgs e)
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
24 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
25 Assembly assembly = Assembly.GetExecutingAssembly();
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
26 FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
27 titleLabel.Text = "QuickQR v" + fvi.FileMajorPart + "." + fvi.FileMinorPart;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
28 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
29
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
30 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
31 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
32 if (keyData == Keys.Escape)
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
33 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
34 this.Close();
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
35 return true;
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
36 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
37 return base.ProcessCmdKey(ref msg, keyData);
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
38 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
39
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
40 private void linkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
41 {
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
42 Process.Start("http://bgreco.net/quickqr");
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
43 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
44 }
aca8706f4eec Initial commit
Brad Greco <brad@bgreco.net>
parents:
diff changeset
45 }