mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Cleanup of the AboutForm, changed the Style to a "FixedToolWindow", I find this more professional. Changed the AnimatingForm to have a flag, EnableAnimation, which is false by default and makes it possible to make the Form the base form of all GreenshotForm forms. Renamed the conf -> coreConfiguration, as this is already in the base class. Also added some comments.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2367 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
b7cfe23605
commit
57e4a8dd73
9 changed files with 89 additions and 33 deletions
|
@ -30,7 +30,7 @@ using Greenshot.IniFile;
|
|||
|
||||
namespace Greenshot {
|
||||
/// <summary>
|
||||
/// Description of AboutForm.
|
||||
/// The about form
|
||||
/// </summary>
|
||||
public partial class AboutForm : BaseForm {
|
||||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(AboutForm));
|
||||
|
@ -39,31 +39,42 @@ namespace Greenshot {
|
|||
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||
//
|
||||
InitializeComponent();
|
||||
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
||||
// Not needed for a Tool Window:
|
||||
//this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
||||
this.pictureBox1.Image = GreenshotPlugin.Core.GreenshotResources.getGreenshotImage();
|
||||
Version v = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
// Format is like this: AssemblyVersion("Major.Minor.Build.Revision")]
|
||||
lblTitle.Text = "Greenshot " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called when a link is clicked
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void LinkLabelClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
|
||||
openLink((LinkLabel)sender);
|
||||
}
|
||||
|
||||
private void openLink(LinkLabel link) {
|
||||
try {
|
||||
link.LinkVisited = true;
|
||||
System.Diagnostics.Process.Start(link.Text);
|
||||
} catch (Exception) {
|
||||
MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, link.Text), Language.GetString(LangKey.error));
|
||||
LinkLabel linkLabel = sender as LinkLabel;
|
||||
if (linkLabel != null) {
|
||||
try {
|
||||
linkLabel.LinkVisited = true;
|
||||
System.Diagnostics.Process.Start(linkLabel.Text);
|
||||
} catch (Exception) {
|
||||
MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, linkLabel.Text), Language.GetString(LangKey.error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CmdKey handler
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="keyData"></param>
|
||||
/// <returns></returns>
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
|
||||
try {
|
||||
switch (keyData) {
|
||||
case Keys.Escape:
|
||||
DialogResult = DialogResult.Cancel;
|
||||
DialogResult = DialogResult.Cancel;
|
||||
break;
|
||||
case Keys.E:
|
||||
MessageBox.Show(EnvironmentInfo.EnvironmentToString(true));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue