64 lines
2.0 KiB
C#
64 lines
2.0 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DynamicLink
|
|||
|
{
|
|||
|
public partial class AboutWindow : Form
|
|||
|
{
|
|||
|
public AboutWindow()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
|
|||
|
// Set up controls
|
|||
|
groupBugs.BackColor = Color.Transparent;
|
|||
|
groupGeneral.BackColor = Color.Transparent;
|
|||
|
groupModules.BackColor = Color.Transparent;
|
|||
|
buttonClose.BackColor = Color.Transparent;
|
|||
|
|
|||
|
// Find modules if list is empty
|
|||
|
if (Modules.Items.Count == 0) Modules.CollectData();
|
|||
|
|
|||
|
// Load module list
|
|||
|
foreach (var i in Modules.Items)
|
|||
|
this.listModules.Items.Add(i.Name);
|
|||
|
|
|||
|
listModules.Sorted = true;
|
|||
|
listModules.SelectedIndex = 0;
|
|||
|
}
|
|||
|
|
|||
|
private void linkMail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
|||
|
{
|
|||
|
try { System.Diagnostics.Process.Start("mailto:chibicitiberiu@gmail.com?Subject=[Bug report] Tibi's Mathematics Suite"); }
|
|||
|
catch { }
|
|||
|
}
|
|||
|
|
|||
|
private void buttonOk_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
|
|||
|
private void AboutWindow_Paint(object sender, PaintEventArgs e)
|
|||
|
{
|
|||
|
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(0, 0, this.Width, this.Height));
|
|||
|
}
|
|||
|
|
|||
|
private void listModules_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
string selected = listModules.SelectedItem as string;
|
|||
|
if (selected == null) return;
|
|||
|
|
|||
|
labelModuleName.Text = selected;
|
|||
|
|
|||
|
var items = Modules.Items.Where(x => x.Name == selected);
|
|||
|
if (items.Count() != 0) labelModuleDescription.Text = items.First().Description;
|
|||
|
else labelModuleDescription.Text = "";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|