Skip to content

Commit

Permalink
Add basic layout of GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
yck1509 committed Jun 6, 2014
1 parent b3973ab commit ef274dc
Show file tree
Hide file tree
Showing 21 changed files with 747 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Confuser2.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Confuser.Runtime", "Confuse
{BEB67A6E-4C54-4DE5-8C6B-2C12F44A7B92} = {BEB67A6E-4C54-4DE5-8C6B-2C12F44A7B92}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfuserEx", "ConfuserEx\ConfuserEx.csproj", "{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -58,6 +60,10 @@ Global
{A45C184F-F98F-4258-A928-BFF437034791}.Debug|Any CPU.Build.0 = Release|Any CPU
{A45C184F-F98F-4258-A928-BFF437034791}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A45C184F-F98F-4258-A928-BFF437034791}.Release|Any CPU.Build.0 = Release|Any CPU
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
17 changes: 17 additions & 0 deletions ConfuserEx/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Application x:Class="ConfuserEx.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Skin.xaml" />
</ResourceDictionary.MergedDictionaries>
<BitmapImage x:Key="New" UriSource="Resources/New.png" />
<BitmapImage x:Key="Open" UriSource="Resources/Open.png" />
<BitmapImage x:Key="Save" UriSource="Resources/Save.png" />
<BitmapImage x:Key="Tools" UriSource="Resources/Tools.png" />
<BitmapImage x:Key="Decode" UriSource="Resources/Decode.png" />
</ResourceDictionary>
</Application.Resources>
</Application>
6 changes: 6 additions & 0 deletions ConfuserEx/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;
using System.Windows;

namespace ConfuserEx {
public partial class App : Application { }
}
107 changes: 107 additions & 0 deletions ConfuserEx/ConfuserEx.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B5205EBA-EC32-4C53-86A0-FAEEE7393EC0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConfuserEx</RootNamespace>
<AssemblyName>ConfuserEx</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<Utf8Output>true</Utf8Output>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Debug\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\Release\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>ConfuserEx.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\ConfuserEx.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Skin.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Resource Include="ConfuserEx.ico" />
</ItemGroup>
<ItemGroup>
<None Include="..\ConfuserEx.snk">
<Link>Properties\ConfuserEx.snk</Link>
</None>
<None Include="Resources\CREDITS" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Decode.png" />
<Resource Include="Resources\New.png" />
<Resource Include="Resources\Open.png" />
<Resource Include="Resources\Save.png" />
<Resource Include="Resources\Tools.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Binary file added ConfuserEx/ConfuserEx.ico
Binary file not shown.
55 changes: 55 additions & 0 deletions ConfuserEx/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<Window x:Class="ConfuserEx.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ConfuserEx" Width="800" Height="600" Style="{StaticResource DarkWindow}"
FontFamily="Open Sans" FontSize="12" UseLayoutRounding="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ToolBar Grid.Row="0" Grid.ColumnSpan="2" ToolBarTray.IsLocked="True" ToolBar.OverflowMode="Never">
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource New}" Margin="0,0,4,0" />
<TextBlock Text="New project" VerticalAlignment="Center" />
</StackPanel>
</Button>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource Open}" Margin="0,0,4,0" />
<TextBlock Text="Open project" VerticalAlignment="Center" />
</StackPanel>
</Button>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource Save}" Margin="0,0,4,0" />
<TextBlock Text="Save project" VerticalAlignment="Center" />
</StackPanel>
</Button>
<Button ContextMenuService.IsEnabled="False" Click="OpenMenu">
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource Tools}" Margin="0,0,4,0" />
<TextBlock Text="Tools" VerticalAlignment="Center" />
<Path Data="M 0.5 4 L 6.5 4 L 3.5 9 Z" Fill="{StaticResource Foreground}" Margin="4,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="Stack Trace Decoder">
<MenuItem.Icon>
<Image Source="{StaticResource Decode}" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Button.ContextMenu>
</Button>
</ToolBar>
<TabControl Grid.Row="1" Grid.ColumnSpan="2" Margin="10">
<TabItem Header="Project" Width="80" />
<TabItem Header="Settings" Width="80" />
<TabItem Header="Run!" Width="80" />
<TabItem Header="About" Width="80" />
</TabControl>
</Grid>
</Window>
20 changes: 20 additions & 0 deletions ConfuserEx/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;

namespace ConfuserEx {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
}

private void OpenMenu(object sender, RoutedEventArgs e) {
var btn = (Button)sender;
ContextMenu menu = btn.ContextMenu;
menu.PlacementTarget = btn;
menu.Placement = PlacementMode.Bottom;
menu.IsOpen = true;
}
}
}
4 changes: 4 additions & 0 deletions ConfuserEx/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System.Reflection;

[assembly: AssemblyTitle("ConfuserEx")]
[assembly: AssemblyDescription("ConfuserEx GUI")]
1 change: 1 addition & 0 deletions ConfuserEx/Resources/CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Icons adapted from http://flaticons.net
Binary file added ConfuserEx/Resources/Decode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ConfuserEx/Resources/New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ConfuserEx/Resources/Open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ConfuserEx/Resources/Save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ConfuserEx/Resources/Tools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ef274dc

Please sign in to comment.