Skip to content

Commit a617abc

Browse files
committed
UI bootstrap
1 parent 324a724 commit a617abc

13 files changed

+514
-2
lines changed

GHApp/GHApp/GHApp.UI/App.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>

GHApp/GHApp/GHApp.UI/App.xaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Application x:Class="GHApp.UI.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+
7+
</Application.Resources>
8+
</Application>

GHApp/GHApp/GHApp.UI/App.xaml.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace GHApp.UI
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

GHApp/GHApp/GHApp.UI/GHApp.UI.csproj

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{017955B2-6F12-45F5-9753-7D43D209E170}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>GHApp.UI</RootNamespace>
11+
<AssemblyName>GHApp.UI</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15+
<WarningLevel>4</WarningLevel>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="System" />
38+
<Reference Include="System.Data" />
39+
<Reference Include="System.Xml" />
40+
<Reference Include="Microsoft.CSharp" />
41+
<Reference Include="System.Core" />
42+
<Reference Include="System.Xml.Linq" />
43+
<Reference Include="System.Data.DataSetExtensions" />
44+
<Reference Include="System.Xaml">
45+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
46+
</Reference>
47+
<Reference Include="WindowsBase" />
48+
<Reference Include="PresentationCore" />
49+
<Reference Include="PresentationFramework" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<ApplicationDefinition Include="App.xaml">
53+
<Generator>MSBuild:Compile</Generator>
54+
<SubType>Designer</SubType>
55+
</ApplicationDefinition>
56+
<Page Include="MainWindow.xaml">
57+
<Generator>MSBuild:Compile</Generator>
58+
<SubType>Designer</SubType>
59+
</Page>
60+
<Compile Include="App.xaml.cs">
61+
<DependentUpon>App.xaml</DependentUpon>
62+
<SubType>Code</SubType>
63+
</Compile>
64+
<Compile Include="MainWindow.xaml.cs">
65+
<DependentUpon>MainWindow.xaml</DependentUpon>
66+
<SubType>Code</SubType>
67+
</Compile>
68+
</ItemGroup>
69+
<ItemGroup>
70+
<Compile Include="Properties\AssemblyInfo.cs">
71+
<SubType>Code</SubType>
72+
</Compile>
73+
<Compile Include="Properties\Resources.Designer.cs">
74+
<AutoGen>True</AutoGen>
75+
<DesignTime>True</DesignTime>
76+
<DependentUpon>Resources.resx</DependentUpon>
77+
</Compile>
78+
<Compile Include="Properties\Settings.Designer.cs">
79+
<AutoGen>True</AutoGen>
80+
<DependentUpon>Settings.settings</DependentUpon>
81+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
82+
</Compile>
83+
<EmbeddedResource Include="Properties\Resources.resx">
84+
<Generator>ResXFileCodeGenerator</Generator>
85+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
86+
</EmbeddedResource>
87+
<None Include="Properties\Settings.settings">
88+
<Generator>SettingsSingleFileGenerator</Generator>
89+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
90+
</None>
91+
<AppDesigner Include="Properties\" />
92+
</ItemGroup>
93+
<ItemGroup>
94+
<None Include="App.config" />
95+
</ItemGroup>
96+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
97+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
98+
Other similar extension points exist, see Microsoft.Common.targets.
99+
<Target Name="BeforeBuild">
100+
</Target>
101+
<Target Name="AfterBuild">
102+
</Target>
103+
-->
104+
</Project>

GHApp/GHApp/GHApp.UI/MainWindow.xaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<Window x:Class="GHApp.UI.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
Title="MainWindow" Height="350" Width="525">
5+
<Grid>
6+
<Grid.ColumnDefinitions>
7+
<ColumnDefinition Width="*" />
8+
<ColumnDefinition Width="Auto" />
9+
</Grid.ColumnDefinitions>
10+
11+
<Grid Grid.Column="0">
12+
<Grid.RowDefinitions>
13+
<RowDefinition Height="Auto" />
14+
<RowDefinition Height="*" />
15+
</Grid.RowDefinitions>
16+
17+
<TextBox Grid.Row="0" Text="{Binding Text}" Margin="4" />
18+
19+
<ListView Grid.Row="1" ItemsSource="{Binding SearchResults}" Margin="4">
20+
<ListView.ItemTemplate>
21+
<DataTemplate>
22+
<TextBlock Text="{Binding}" />
23+
</DataTemplate>
24+
</ListView.ItemTemplate>
25+
</ListView>
26+
</Grid>
27+
28+
<ListView Grid.Column="1" MaxWidth="200" ItemsSource="{Binding Favourites}" Margin="4">
29+
<ListView.ItemTemplate>
30+
<DataTemplate>
31+
<Grid Height="32">
32+
<Grid.ColumnDefinitions>
33+
<ColumnDefinition Width="Auto" />
34+
<ColumnDefinition Width="*" />
35+
</Grid.ColumnDefinitions>
36+
37+
<Rectangle Grid.Column="0" Width="24" Height="24" Margin="4" Fill="Orange" />
38+
<TextBlock Grid.Column="0" Text="5" Foreground="Black" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Center" />
39+
40+
<TextBlock Grid.Column="1" Text="{Binding}" FontSize="14" VerticalAlignment="Center" />
41+
</Grid>
42+
</DataTemplate>
43+
</ListView.ItemTemplate>
44+
</ListView>
45+
</Grid>
46+
</Window>
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace GHApp.UI
17+
{
18+
/// <summary>
19+
/// Interaction logic for MainWindow.xaml
20+
/// </summary>
21+
public partial class MainWindow : Window
22+
{
23+
public MainWindow()
24+
{
25+
InitializeComponent();
26+
DataContext = this;
27+
}
28+
29+
private List<string> _favourites = new List<string>
30+
{
31+
"shanselman\\SuperRepo",
32+
"bartsokol\\WuPeEf",
33+
"nikodemrafalski\\eRiXy"
34+
};
35+
36+
public List<string> Favourites
37+
{
38+
get { return _favourites; }
39+
set
40+
{
41+
_favourites = value;
42+
}
43+
}
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.CompilerServices;
4+
using System.Runtime.InteropServices;
5+
using System.Windows;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("GHApp.UI")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("GHApp.UI")]
15+
[assembly: AssemblyCopyright("Copyright © 2015")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
// Setting ComVisible to false makes the types in this assembly not visible
20+
// to COM components. If you need to access a type in this assembly from
21+
// COM, set the ComVisible attribute to true on that type.
22+
[assembly: ComVisible(false)]
23+
24+
//In order to begin building localizable applications, set
25+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26+
//inside a <PropertyGroup>. For example, if you are using US english
27+
//in your source files, set the <UICulture> to en-US. Then uncomment
28+
//the NeutralResourceLanguage attribute below. Update the "en-US" in
29+
//the line below to match the UICulture setting in the project file.
30+
31+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32+
33+
34+
[assembly: ThemeInfo(
35+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36+
//(used if a resource is not found in the page,
37+
// or application resource dictionaries)
38+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39+
//(used if a resource is not found in the page,
40+
// app, or any theme specific resource dictionaries)
41+
)]
42+
43+
44+
// Version information for an assembly consists of the following four values:
45+
//
46+
// Major Version
47+
// Minor Version
48+
// Build Number
49+
// Revision
50+
//
51+
// You can specify all the values or you can default the Build and Revision Numbers
52+
// by using the '*' as shown below:
53+
// [assembly: AssemblyVersion("1.0.*")]
54+
[assembly: AssemblyVersion("1.0.0.0")]
55+
[assembly: AssemblyFileVersion("1.0.0.0")]

GHApp/GHApp/GHApp.UI/Properties/Resources.Designer.cs

+71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)