improved Horus rotary encoder driver and generic behavior (#5510)
[opentx.git] / sound / recorder / aboutWindow.xaml.cs
blob0dc7a04cae51281128bab052e6742aba193417d0
1 /* This file is part of OpenTX Recorder.
2 * OpenTX Recorder is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * OpenTX Recorder is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with OpenTX Recorder. If not, see <http://www.gnu.org/licenses/>.
15 * Copyright 2014 Kjell Kernen */
17 using System;
18 using System.Collections.Generic;
19 using System.Diagnostics;
20 using System.Linq;
21 using System.Reflection;
22 using System.Text;
23 using System.Windows;
24 using System.Windows.Controls;
25 using System.Windows.Data;
26 using System.Windows.Documents;
27 using System.Windows.Input;
28 using System.Windows.Media;
29 using System.Windows.Media.Imaging;
30 using System.Windows.Shapes;
31 using System.Windows.Navigation;
34 namespace OpenTXrecorder
36 public partial class AboutWindow : Window
38 public AboutWindow()
40 InitializeComponent();
41 Assembly app = Assembly.GetExecutingAssembly();
43 AssemblyTitleAttribute title = (AssemblyTitleAttribute)app.GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0];
44 AssemblyProductAttribute product = (AssemblyProductAttribute)app.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0];
45 AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)app.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
46 AssemblyCompanyAttribute company = (AssemblyCompanyAttribute)app.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0];
47 Version version = app.GetName().Version;
49 this.Title = String.Format("About {0}", title.Title);
50 this.lblProductName.Content = product.Product;
51 this.lblVersion.Content = String.Format("Version {0}", version.ToString());
52 this.lblCopyright.Content = copyright.Copyright.ToString();
53 this.lblCompanyName.Content = company.Company;
56 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
58 Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
59 e.Handled = true;