Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

Commit ef274dc

Browse files
committed
Add basic layout of GUI
1 parent b3973ab commit ef274dc

21 files changed

+747
-0
lines changed

Confuser2.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Confuser.Runtime", "Confuse
2424
{BEB67A6E-4C54-4DE5-8C6B-2C12F44A7B92} = {BEB67A6E-4C54-4DE5-8C6B-2C12F44A7B92}
2525
EndProjectSection
2626
EndProject
27+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfuserEx", "ConfuserEx\ConfuserEx.csproj", "{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}"
28+
EndProject
2729
Global
2830
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2931
Debug|Any CPU = Debug|Any CPU
@@ -58,6 +60,10 @@ Global
5860
{A45C184F-F98F-4258-A928-BFF437034791}.Debug|Any CPU.Build.0 = Release|Any CPU
5961
{A45C184F-F98F-4258-A928-BFF437034791}.Release|Any CPU.ActiveCfg = Release|Any CPU
6062
{A45C184F-F98F-4258-A928-BFF437034791}.Release|Any CPU.Build.0 = Release|Any CPU
63+
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
64+
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
65+
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
66+
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Release|Any CPU.Build.0 = Release|Any CPU
6167
EndGlobalSection
6268
GlobalSection(SolutionProperties) = preSolution
6369
HideSolutionNode = FALSE

ConfuserEx/App.xaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Application x:Class="ConfuserEx.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
StartupUri="MainWindow.xaml">
5+
<Application.Resources>
6+
<ResourceDictionary>
7+
<ResourceDictionary.MergedDictionaries>
8+
<ResourceDictionary Source="Skin.xaml" />
9+
</ResourceDictionary.MergedDictionaries>
10+
<BitmapImage x:Key="New" UriSource="Resources/New.png" />
11+
<BitmapImage x:Key="Open" UriSource="Resources/Open.png" />
12+
<BitmapImage x:Key="Save" UriSource="Resources/Save.png" />
13+
<BitmapImage x:Key="Tools" UriSource="Resources/Tools.png" />
14+
<BitmapImage x:Key="Decode" UriSource="Resources/Decode.png" />
15+
</ResourceDictionary>
16+
</Application.Resources>
17+
</Application>

ConfuserEx/App.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using System;
2+
using System.Windows;
3+
4+
namespace ConfuserEx {
5+
public partial class App : Application { }
6+
}

ConfuserEx/ConfuserEx.csproj

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}</ProjectGuid>
9+
<OutputType>WinExe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>ConfuserEx</RootNamespace>
12+
<AssemblyName>ConfuserEx</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16+
<WarningLevel>4</WarningLevel>
17+
<Utf8Output>true</Utf8Output>
18+
</PropertyGroup>
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
20+
<DebugSymbols>true</DebugSymbols>
21+
<OutputPath>..\Debug\bin\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<DebugType>full</DebugType>
24+
<PlatformTarget>AnyCPU</PlatformTarget>
25+
<ErrorReport>prompt</ErrorReport>
26+
</PropertyGroup>
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
28+
<OutputPath>..\Release\bin\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<Optimize>true</Optimize>
31+
<DebugType>pdbonly</DebugType>
32+
<PlatformTarget>AnyCPU</PlatformTarget>
33+
<ErrorReport>prompt</ErrorReport>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<ApplicationIcon>ConfuserEx.ico</ApplicationIcon>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<SignAssembly>true</SignAssembly>
40+
</PropertyGroup>
41+
<PropertyGroup>
42+
<AssemblyOriginatorKeyFile>..\ConfuserEx.snk</AssemblyOriginatorKeyFile>
43+
</PropertyGroup>
44+
<ItemGroup>
45+
<Reference Include="System" />
46+
<Reference Include="System.Xaml" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="System.Core" />
49+
<Reference Include="System.Xml.Linq" />
50+
<Reference Include="WindowsBase" />
51+
<Reference Include="PresentationCore" />
52+
<Reference Include="PresentationFramework" />
53+
</ItemGroup>
54+
<ItemGroup>
55+
<ApplicationDefinition Include="App.xaml">
56+
<Generator>MSBuild:Compile</Generator>
57+
<SubType>Designer</SubType>
58+
</ApplicationDefinition>
59+
<Compile Include="..\GlobalAssemblyInfo.cs">
60+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
61+
</Compile>
62+
<Compile Include="Properties\AssemblyInfo.cs" />
63+
<Page Include="MainWindow.xaml">
64+
<Generator>MSBuild:Compile</Generator>
65+
<SubType>Designer</SubType>
66+
</Page>
67+
<Compile Include="App.xaml.cs">
68+
<DependentUpon>App.xaml</DependentUpon>
69+
<SubType>Code</SubType>
70+
</Compile>
71+
<Compile Include="MainWindow.xaml.cs">
72+
<DependentUpon>MainWindow.xaml</DependentUpon>
73+
<SubType>Code</SubType>
74+
</Compile>
75+
<Page Include="Skin.xaml">
76+
<Generator>MSBuild:Compile</Generator>
77+
<SubType>Designer</SubType>
78+
</Page>
79+
</ItemGroup>
80+
<ItemGroup>
81+
<AppDesigner Include="Properties\" />
82+
</ItemGroup>
83+
<ItemGroup>
84+
<Resource Include="ConfuserEx.ico" />
85+
</ItemGroup>
86+
<ItemGroup>
87+
<None Include="..\ConfuserEx.snk">
88+
<Link>Properties\ConfuserEx.snk</Link>
89+
</None>
90+
<None Include="Resources\CREDITS" />
91+
</ItemGroup>
92+
<ItemGroup>
93+
<Resource Include="Resources\Decode.png" />
94+
<Resource Include="Resources\New.png" />
95+
<Resource Include="Resources\Open.png" />
96+
<Resource Include="Resources\Save.png" />
97+
<Resource Include="Resources\Tools.png" />
98+
</ItemGroup>
99+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
100+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
101+
Other similar extension points exist, see Microsoft.Common.targets.
102+
<Target Name="BeforeBuild">
103+
</Target>
104+
<Target Name="AfterBuild">
105+
</Target>
106+
-->
107+
</Project>

ConfuserEx/ConfuserEx.ico

36.9 KB
Binary file not shown.

ConfuserEx/MainWindow.xaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Window x:Class="ConfuserEx.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
Title="ConfuserEx" Width="800" Height="600" Style="{StaticResource DarkWindow}"
5+
FontFamily="Open Sans" FontSize="12" UseLayoutRounding="True">
6+
<Grid>
7+
<Grid.RowDefinitions>
8+
<RowDefinition Height="Auto" />
9+
<RowDefinition Height="*" />
10+
</Grid.RowDefinitions>
11+
<ToolBar Grid.Row="0" Grid.ColumnSpan="2" ToolBarTray.IsLocked="True" ToolBar.OverflowMode="Never">
12+
<Button>
13+
<StackPanel Orientation="Horizontal">
14+
<Image Source="{StaticResource New}" Margin="0,0,4,0" />
15+
<TextBlock Text="New project" VerticalAlignment="Center" />
16+
</StackPanel>
17+
</Button>
18+
<Button>
19+
<StackPanel Orientation="Horizontal">
20+
<Image Source="{StaticResource Open}" Margin="0,0,4,0" />
21+
<TextBlock Text="Open project" VerticalAlignment="Center" />
22+
</StackPanel>
23+
</Button>
24+
<Button>
25+
<StackPanel Orientation="Horizontal">
26+
<Image Source="{StaticResource Save}" Margin="0,0,4,0" />
27+
<TextBlock Text="Save project" VerticalAlignment="Center" />
28+
</StackPanel>
29+
</Button>
30+
<Button ContextMenuService.IsEnabled="False" Click="OpenMenu">
31+
<StackPanel Orientation="Horizontal">
32+
<Image Source="{StaticResource Tools}" Margin="0,0,4,0" />
33+
<TextBlock Text="Tools" VerticalAlignment="Center" />
34+
<Path Data="M 0.5 4 L 6.5 4 L 3.5 9 Z" Fill="{StaticResource Foreground}" Margin="4,0,0,0"
35+
VerticalAlignment="Center" />
36+
</StackPanel>
37+
<Button.ContextMenu>
38+
<ContextMenu>
39+
<MenuItem Header="Stack Trace Decoder">
40+
<MenuItem.Icon>
41+
<Image Source="{StaticResource Decode}" />
42+
</MenuItem.Icon>
43+
</MenuItem>
44+
</ContextMenu>
45+
</Button.ContextMenu>
46+
</Button>
47+
</ToolBar>
48+
<TabControl Grid.Row="1" Grid.ColumnSpan="2" Margin="10">
49+
<TabItem Header="Project" Width="80" />
50+
<TabItem Header="Settings" Width="80" />
51+
<TabItem Header="Run!" Width="80" />
52+
<TabItem Header="About" Width="80" />
53+
</TabControl>
54+
</Grid>
55+
</Window>

ConfuserEx/MainWindow.xaml.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Windows;
3+
using System.Windows.Controls;
4+
using System.Windows.Controls.Primitives;
5+
6+
namespace ConfuserEx {
7+
public partial class MainWindow : Window {
8+
public MainWindow() {
9+
InitializeComponent();
10+
}
11+
12+
private void OpenMenu(object sender, RoutedEventArgs e) {
13+
var btn = (Button)sender;
14+
ContextMenu menu = btn.ContextMenu;
15+
menu.PlacementTarget = btn;
16+
menu.Placement = PlacementMode.Bottom;
17+
menu.IsOpen = true;
18+
}
19+
}
20+
}

ConfuserEx/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System.Reflection;
2+
3+
[assembly: AssemblyTitle("ConfuserEx")]
4+
[assembly: AssemblyDescription("ConfuserEx GUI")]

ConfuserEx/Resources/CREDITS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Icons adapted from http://flaticons.net

ConfuserEx/Resources/Decode.png

1.08 KB
Loading

0 commit comments

Comments
 (0)