mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 19:40:20 +03:00
62 lines
2.5 KiB
C#
62 lines
2.5 KiB
C#
/* This file is part of OpenTX Recorder.
|
|
* OpenTX Recorder is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
|
|
* OpenTX Recorder is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with OpenTX Recorder. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Copyright 2014 Kjell Kernen */
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
using System.Windows.Navigation;
|
|
|
|
|
|
namespace OpenTXrecorder
|
|
{
|
|
public partial class AboutWindow : Window
|
|
{
|
|
public AboutWindow()
|
|
{
|
|
InitializeComponent();
|
|
Assembly app = Assembly.GetExecutingAssembly();
|
|
|
|
AssemblyTitleAttribute title = (AssemblyTitleAttribute)app.GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0];
|
|
AssemblyProductAttribute product = (AssemblyProductAttribute)app.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0];
|
|
AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)app.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
|
|
AssemblyCompanyAttribute company = (AssemblyCompanyAttribute)app.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0];
|
|
Version version = app.GetName().Version;
|
|
|
|
this.Title = String.Format("About {0}", title.Title);
|
|
this.lblProductName.Content = product.Product;
|
|
this.lblVersion.Content = String.Format("Version {0}", version.ToString());
|
|
this.lblCopyright.Content = copyright.Copyright.ToString();
|
|
this.lblCompanyName.Content = company.Company;
|
|
}
|
|
|
|
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
|
{
|
|
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
}
|