ProgLab1_winforms/GUI/AboutMeForm.cs

42 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using laba3.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ProgLab1.GUI
{
public partial class AboutMeForm : Form
{
private Label nameLabel;
private LinkLabel websiteLinkLabel;
public AboutMeForm(Form onCloseForm)
{
InitializeComponent();
this.Text = "Обо мне";
nameLabel = new Label();
nameLabel.Text = "Морозов Иван Сергеевич 6106 aka DIvan2000";
nameLabel.AutoSize = true;
nameLabel.Top = 50;
nameLabel.Left = 50;
websiteLinkLabel = new LinkLabel();
websiteLinkLabel.Text = "Мой сайт: divan2000.su";
websiteLinkLabel.AutoSize = true;
websiteLinkLabel.Top = 100;
websiteLinkLabel.Left = 50;
websiteLinkLabel.LinkClicked += new LinkLabelLinkClickedEventHandler( (object sender, LinkLabelLinkClickedEventArgs e) => { Utils.OpenInWeb("https://divan2000.su"); });
this.Controls.Add(nameLabel);
this.Controls.Add(websiteLinkLabel);
this.FormClosing += new FormClosingEventHandler((object sender, FormClosingEventArgs e) => { e.Cancel = true; this.Hide(); onCloseForm.Show(); });
}
}
}