view ServerMonitor/Forms/AboutForm.cs @ 33:69e8ecdbbdd3

Fix schedule time not being saved on daily schedules.
author Brad Greco <brad@bgreco.net>
date Sun, 16 Jun 2019 16:55:37 -0400
parents f6235dc0a8ec
children
line wrap: on
line source

´╗┐using ServerMonitorApp.Properties;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;

namespace ServerMonitorApp
{
    /// <summary>Program About form.</summary>
    public partial class AboutForm : Form
    {
        public AboutForm()
        {
            InitializeComponent();
        }

        private void AboutForm_Load(object sender, EventArgs e)
        {
            Icon = Resources.icon;
            NameLabel.Text += " " + Assembly.GetExecutingAssembly().GetName().Version.ToString(2);
            // Remove initial focus on the first link causing an dotted outline.
            ActiveControl = NameLabel;
        }

        /// <summary>Hides the form when ESC is pressed.</summary>
        protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Escape)
            {
                Close();
                return true;
            }
            return base.ProcessDialogKey(keyData);
        }

        private void HomePageLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("https://bgreco.net/servermonitor");
        }

        private void SshNetLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("https://github.com/sshnet/SSH.NET");
        }

        private void NAppUpdateLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("https://github.com/synhershko/NAppUpdate");
        }

        private void NAudioLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("https://github.com/naudio/NAudio");
        }
    }
}