Finish GUI!
This commit is contained in:
Родитель
479b7e3975
Коммит
19b7fdfd17
|
@ -12,6 +12,7 @@
|
|||
<BitmapImage x:Key="Tools" UriSource="Resources/Tools.png" />
|
||||
<BitmapImage x:Key="Decode" UriSource="Resources/Decode.png" />
|
||||
<BitmapImage x:Key="Error" UriSource="Resources/Error.png" />
|
||||
<BitmapImage x:Key="TeamLogo" UriSource="Resources/TeamLogo.png" />
|
||||
<FontFamily x:Key="FontAwesome">Resources/#FontAwesome</FontFamily>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
<Compile Include="ViewModel\Project\ProjectRuleVM.cs" />
|
||||
<Compile Include="ViewModel\Project\ProjectSettingVM.cs" />
|
||||
<Compile Include="ViewModel\StringItem.cs" />
|
||||
<Compile Include="ViewModel\UI\AboutTabVM.cs" />
|
||||
<Compile Include="ViewModel\UI\AppVM.cs" />
|
||||
<Compile Include="ViewModel\IViewModel.cs" />
|
||||
<Compile Include="ViewModel\Project\ProjectModuleVM.cs" />
|
||||
|
@ -137,6 +138,10 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\AboutTabView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\ProtectTabView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -213,6 +218,9 @@
|
|||
<ItemGroup>
|
||||
<Resource Include="Resources\Error.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TeamLogo.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
@ -228,13 +236,12 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
<Target Name="solveAliasProblem" >
|
||||
<Target Name="solveAliasProblem">
|
||||
<ConvertToAbsolutePath Paths="..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll">
|
||||
<Output TaskParameter="AbsolutePaths" PropertyName="FullPathOriginal" />
|
||||
</ConvertToAbsolutePath>
|
||||
<ItemGroup>
|
||||
<ReferencePath Remove="$(FullPathOriginal)"/>
|
||||
<ReferencePath Remove="$(FullPathOriginal)" />
|
||||
<ReferencePath Include="$(FullPathOriginal)">
|
||||
<Aliases>PTL</Aliases>
|
||||
</ReferencePath>
|
||||
|
@ -243,5 +250,4 @@
|
|||
<PropertyGroup>
|
||||
<CoreCompileDependsOn>solveAliasProblem;$(PrepareResourcesDependsOn)</CoreCompileDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -18,6 +18,7 @@ namespace ConfuserEx {
|
|||
app.Tabs.Add(new ProjectTabVM(app));
|
||||
app.Tabs.Add(new SettingsTabVM(app));
|
||||
app.Tabs.Add(new ProtectTabVM(app));
|
||||
app.Tabs.Add(new AboutTabVM(app));
|
||||
|
||||
DataContext = app;
|
||||
}
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 120 KiB |
|
@ -10,6 +10,9 @@ namespace ConfuserEx {
|
|||
|
||||
public static readonly DependencyProperty TabsDisabledProperty =
|
||||
DependencyProperty.RegisterAttached("TabsDisabled", typeof (bool), typeof (Skin), new UIPropertyMetadata(false));
|
||||
|
||||
public static readonly DependencyProperty FocusOverlayProperty =
|
||||
DependencyProperty.RegisterAttached("FocusOverlay", typeof(bool), typeof(Skin), new UIPropertyMetadata(true));
|
||||
|
||||
public static readonly DependencyProperty RTBDocumentProperty =
|
||||
DependencyProperty.RegisterAttached("RTBDocument", typeof (FlowDocument), typeof (Skin), new FrameworkPropertyMetadata(null, OnRTBDocumentChanged));
|
||||
|
@ -21,6 +24,14 @@ namespace ConfuserEx {
|
|||
public static void SetEmptyPrompt(DependencyObject obj, string value) {
|
||||
obj.SetValue(EmptyPromptProperty, value);
|
||||
}
|
||||
|
||||
public static bool GetFocusOverlay(DependencyObject obj) {
|
||||
return (bool)obj.GetValue(FocusOverlayProperty);
|
||||
}
|
||||
|
||||
public static void SetFocusOverlay(DependencyObject obj, bool value) {
|
||||
obj.SetValue(FocusOverlayProperty, value);
|
||||
}
|
||||
|
||||
public static bool GetTabsDisabled(DependencyObject obj) {
|
||||
return (bool)obj.GetValue(TabsDisabledProperty);
|
||||
|
|
|
@ -584,6 +584,24 @@
|
|||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{StaticResource Border}" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Border
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Height="1"
|
||||
SnapsToDevicePixels="true" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
|
@ -688,9 +706,13 @@
|
|||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource DisabledBackground}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForeground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsFocused" Value="true">
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsFocused" Value="true" />
|
||||
<Condition Property="local:Skin.FocusOverlay" Value="true" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Opacity" TargetName="Overlay" Value="0.5" />
|
||||
</Trigger>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter Property="Opacity" TargetName="Prompt" Value="0.5" />
|
||||
</Trigger>
|
||||
|
@ -1498,4 +1520,14 @@
|
|||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type Hyperlink}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="Foreground" Value="{StaticResource Foreground}" />
|
||||
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media.Imaging;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
|
||||
namespace ConfuserEx.ViewModel {
|
||||
internal class AboutTabVM : TabViewModel {
|
||||
public AboutTabVM(AppVM app)
|
||||
: base(app, "About") {
|
||||
var decoder = new IconBitmapDecoder(new Uri("pack://application:,,,/ConfuserEx.ico"), BitmapCreateOptions.DelayCreation, BitmapCacheOption.OnDemand);
|
||||
|
||||
Icon = decoder.Frames.First(frame => frame.Width == 64);
|
||||
}
|
||||
|
||||
public ICommand LaunchBrowser {
|
||||
get { return new RelayCommand<string>(site => Process.Start(site)); }
|
||||
}
|
||||
|
||||
public BitmapSource Icon { get; private set; }
|
||||
}
|
||||
}
|
|
@ -4,5 +4,6 @@
|
|||
<ResourceDictionary Source="Views\ProjectTabView.xaml" />
|
||||
<ResourceDictionary Source="Views\SettingsTabView.xaml" />
|
||||
<ResourceDictionary Source="Views\ProtectTabView.xaml" />
|
||||
<ResourceDictionary Source="Views\AboutTabView.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,92 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ConfuserEx"
|
||||
xmlns:vm="clr-namespace:ConfuserEx.ViewModel"
|
||||
xmlns:core="clr-namespace:Confuser.Core;assembly=Confuser.Core">
|
||||
<DataTemplate DataType="{x:Type vm:AboutTabVM}">
|
||||
<Grid Background="Transparent" Margin="10" x:Name="Root">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400px" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="70px" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="100px" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70px" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Source="{Binding Icon}" Width="64" Height="64" />
|
||||
<Label Grid.Row="0" Grid.Column="1" FontSize="20" Content="ConfuserEx" Foreground="#ffffff" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" FontSize="14" Text="{x:Static core:ConfuserEngine.Version}"
|
||||
Foreground="#a0a0a0" BorderThickness="0" VerticalAlignment="Center" Background="Transparent"
|
||||
IsReadOnly="True" IsReadOnlyCaretVisible="True" local:Skin.FocusOverlay="False" />
|
||||
</Grid>
|
||||
|
||||
<DockPanel Grid.Row="1" Grid.Column="0" Margin="10" LastChildFill="True"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
|
||||
<Separator DockPanel.Dock="Top" />
|
||||
<Separator DockPanel.Dock="Bottom" />
|
||||
|
||||
<StackPanel TextBlock.FontSize="13" VerticalAlignment="Center" HorizontalAlignment="Stretch">
|
||||
<Label FontWeight="Bold">ConfuserEx, a .NET protector</Label>
|
||||
<Label>Developed by Ki, open sourced under MIT license.</Label>
|
||||
<Label>
|
||||
<TextBlock>
|
||||
<Hyperlink NavigateUri="http://yck1509.github.io/ConfuserEx/"
|
||||
Command="{Binding LaunchBrowser}"
|
||||
CommandParameter="http://yck1509.github.io/ConfuserEx/">
|
||||
Visit the project page for details.
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Label>
|
||||
<Label Height="20px" />
|
||||
|
||||
<Label>If you like it or find it useful,</Label>
|
||||
<Label>
|
||||
<TextBlock>
|
||||
<Hyperlink NavigateUri="http://yck1509.github.io/ConfuserEx/#donation"
|
||||
Command="{Binding LaunchBrowser}"
|
||||
CommandParameter="http://yck1509.github.io/ConfuserEx/#donation">
|
||||
feel free to support the project by making a donation!
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
|
||||
<Button Grid.Row="2" Grid.Column="0" Command="{Binding LaunchBrowser}"
|
||||
CommandParameter="http://board.b-at-s.info/" Focusable="False" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<ContentPresenter />
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<Image Source="{DynamicResource TeamLogo}" Width="400" Height="100" />
|
||||
</Button>
|
||||
|
||||
<StackPanel Grid.Column="1" Grid.RowSpan="3" TextBlock.FontSize="13" Margin="10"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Center">
|
||||
<Label HorizontalContentAlignment="Center">Special Thanks to:</Label>
|
||||
<Label HorizontalContentAlignment="Center">0xd4d</Label>
|
||||
<Label HorizontalContentAlignment="Center">CodeCracker</Label>
|
||||
<Label HorizontalContentAlignment="Center">JeRRy</Label>
|
||||
<Label HorizontalContentAlignment="Center">kao</Label>
|
||||
<Label HorizontalContentAlignment="Center">Kurapica</Label>
|
||||
<Label HorizontalContentAlignment="Center">UbbeLoL</Label>
|
||||
<Label HorizontalContentAlignment="Center">whoknows</Label>
|
||||
<Label HorizontalContentAlignment="Center">Members of Black Storm Forum</Label>
|
||||
<Label HorizontalContentAlignment="Center">and You!</Label>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
Загрузка…
Ссылка в новой задаче