-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zw3639
committed
Nov 16, 2017
1 parent
1fbfee9
commit 673486f
Showing
27 changed files
with
31,970 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Window x:Class="Cracker.AboutWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:Cracker" | ||
xmlns:props="clr-namespace:Cracker.Properties" | ||
mc:Ignorable="d" | ||
Title="{x:Static props:Resources.About}" Height="300" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded"> | ||
<Grid> | ||
<Grid Height="150"> | ||
<Image Source="xiaonh.ico" Width="64" Height="64" VerticalAlignment="Top" /> | ||
<Label Name="lbName" Margin="0,70,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" /> | ||
<TextBlock Margin="0,100,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"> | ||
<Hyperlink Name="hlCompany" Click="hlCompany_Click" /> | ||
</TextBlock> | ||
</Grid> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
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; | ||
|
||
namespace Cracker | ||
{ | ||
/// <summary> | ||
/// AboutWindow.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class AboutWindow : Window | ||
{ | ||
public AboutWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Window_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
AssemblyTitleAttribute title = (AssemblyTitleAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyTitleAttribute)); | ||
string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); | ||
lbName.Content = title.Title + " " + version; | ||
|
||
AssemblyCompanyAttribute company = (AssemblyCompanyAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCompanyAttribute)); | ||
AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute)); | ||
hlCompany.Inlines.Add(company.Company); | ||
hlCompany.Tag = company.Company; | ||
} | ||
|
||
private void hlCompany_Click(object sender, RoutedEventArgs e) | ||
{ | ||
Hyperlink hl = (Hyperlink)sender; | ||
try | ||
{ | ||
Process.Start((string)hl.Tag); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.