Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit. Basic styling and package list outline.
- Loading branch information
1 parent
8b4b6ce
commit 2d9bab4
Showing
324 changed files
with
253,321 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,17 @@ | ||
<Application x:Class="Chocolatey.Gui.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
StartupUri="Views/Windows/MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/controls.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/styles/Colors.xaml"/> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/basedark.xaml" /> | ||
<ResourceDictionary Source="Resources/Controls.xaml"></ResourceDictionary> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
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,26 @@ | ||
using Autofac; | ||
using Chocolatey.Gui.ViewModels.Items; | ||
using Chocolatey.Gui.ViewModels.Pages; | ||
using Chocolatey.Gui.ViewModels.Windows; | ||
|
||
namespace Chocolatey.Gui | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App | ||
{ | ||
internal static IContainer Container { get; set; } | ||
|
||
static App() | ||
{ | ||
var builder = new ContainerBuilder(); | ||
builder.RegisterType<MainWindowViewModel>().As<IMainWindowViewModel>(); | ||
builder.RegisterType<LocalSourcePageViewModel>().As<ILocalSourcePageViewModel>(); | ||
builder.RegisterType<RemoteSourcePageViewModel>().As<IRemoteSourcePageViewModel>(); | ||
builder.RegisterType<PackageViewModel>().As<IPackageViewModel>(); | ||
|
||
Container = builder.Build(); | ||
} | ||
} | ||
} |
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,28 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
namespace Chocolatey.Gui.Base | ||
{ | ||
public abstract class ObservableBase : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
public void SetPropertyValue<T>(ref T property, T value, [CallerMemberName] string propertyName = "") | ||
{ | ||
if (EqualityComparer<T>.Default.Equals(property, value)) | ||
{ | ||
return; | ||
} | ||
property = value; | ||
NotifyPropertyChanged(propertyName); | ||
} | ||
|
||
public void NotifyPropertyChanged(string propertyName) | ||
{ | ||
if (PropertyChanged != null) | ||
{ | ||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} | ||
} | ||
} |
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,209 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Chocolatey.Gui</RootNamespace> | ||
<AssemblyName>Chocolatey.Gui</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Autofac"> | ||
<HintPath>packages\Autofac.3.3.0\lib\net40\Autofac.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MahApps.Metro, Version=0.12.1.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>packages\MahApps.Metro.0.12.1.0\lib\net40\MahApps.Metro.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Threading.Tasks"> | ||
<HintPath>packages\Microsoft.Bcl.Async.1.0.165\lib\net40\Microsoft.Threading.Tasks.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Threading.Tasks.Extensions"> | ||
<HintPath>packages\Microsoft.Bcl.Async.1.0.165\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop"> | ||
<HintPath>packages\Microsoft.Bcl.Async.1.0.165\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Ninject"> | ||
<HintPath>packages\Ninject.3.0.1.10\lib\net40\Ninject.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.configuration" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.IO"> | ||
<HintPath>packages\Microsoft.Bcl.1.1.6\lib\net40\System.IO.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Reactive.Core"> | ||
<HintPath>packages\Rx-Core.2.2.2\lib\net40\System.Reactive.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Reactive.Interfaces"> | ||
<HintPath>packages\Rx-Interfaces.2.2.2\lib\net40\System.Reactive.Interfaces.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Reactive.Linq"> | ||
<HintPath>packages\Rx-Linq.2.2.2\lib\net40\System.Reactive.Linq.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Reactive.PlatformServices"> | ||
<HintPath>packages\Rx-PlatformServices.2.2.3\lib\net40\System.Reactive.PlatformServices.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Reactive.Windows.Threading"> | ||
<HintPath>packages\Rx-XAML.2.2.2\lib\net40\System.Reactive.Windows.Threading.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Runtime"> | ||
<HintPath>packages\Microsoft.Bcl.1.1.6\lib\net40\System.Runtime.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Threading.Tasks"> | ||
<HintPath>packages\Microsoft.Bcl.1.1.6\lib\net40\System.Threading.Tasks.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>packages\MahApps.Metro.0.12.1.0\lib\net40\System.Windows.Interactivity.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Xaml"> | ||
<RequiredTargetFramework>4.0</RequiredTargetFramework> | ||
</Reference> | ||
<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="ConfigurationSection.cs" /> | ||
<Compile Include="Controls\FauxPowerShellConsole.cs" /> | ||
<Compile Include="Controls\ObservableRingBuffer.cs" /> | ||
<Compile Include="Models\PowerShellOutputLine.cs" /> | ||
<Compile Include="Models\SourceModel.cs" /> | ||
<Compile Include="Utilities\Converters\BooleanToVisibility.cs" /> | ||
<Compile Include="Utilities\Converters\LongSizeToFileSizeString.cs" /> | ||
<Compile Include="Utilities\Converters\NullToVisibility.cs" /> | ||
<Compile Include="Utilities\Converters\PackageDependenciesToString.cs" /> | ||
<Compile Include="Utilities\Converters\UriToVisibility.cs" /> | ||
<Compile Include="Utilities\NativeMethods.cs" /> | ||
<Page Include="Resources\Controls.xaml"> | ||
<SubType>Designer</SubType> | ||
<Generator>MSBuild:Compile</Generator> | ||
</Page> | ||
<Page Include="Views\Pages\RemoteSourcePage.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Page Include="Views\Pages\LocalSourcePage.xaml"> | ||
<SubType>Designer</SubType> | ||
<Generator>MSBuild:Compile</Generator> | ||
</Page> | ||
<Page Include="Views\Windows\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="Base\ObservableBase.cs" /> | ||
<Compile Include="ViewModels\Items\IPackageViewModel.cs" /> | ||
<Compile Include="ViewModels\Items\PackageViewModel.cs" /> | ||
<Compile Include="ViewModels\Pages\IRemoteSourcePageViewModel.cs" /> | ||
<Compile Include="ViewModels\Pages\RemoteSourcePageViewModel.cs" /> | ||
<Compile Include="ViewModels\Pages\ILocalSourcePageViewModel.cs" /> | ||
<Compile Include="ViewModels\Pages\LocalSourcePageViewModel.cs" /> | ||
<Compile Include="ViewModels\Windows\IMainWindowViewModel.cs" /> | ||
<Compile Include="ViewModels\Windows\MainWindowViewModel.cs" /> | ||
<Compile Include="Views\Pages\RemoteSourcePage.xaml.cs"> | ||
<DependentUpon>RemoteSourcePage.xaml</DependentUpon> | ||
</Compile> | ||
<Compile Include="Views\Pages\LocalSourcePage.xaml.cs"> | ||
<DependentUpon>LocalSourcePage.xaml</DependentUpon> | ||
</Compile> | ||
<Compile Include="Views\Windows\MainWindow.xaml.cs"> | ||
<DependentUpon>MainWindow.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Page Include="Resources\Icons.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Models\SemanticVersion.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs"> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
<None Include="app.config" /> | ||
<None Include="packages.config" /> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<AppDesigner Include="Properties\" /> | ||
<Resource Include="Resources\SourceSansPro-Regular.otf"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Resource> | ||
<Resource Include="Resources\Entypo.ttf" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Services\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Resource Include="Resources\Entypo-license.txt" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets" Condition="Exists('packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" /> | ||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> | ||
<Error Condition="!Exists('packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> | ||
<Error Condition="Exists('packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> | ||
</Target> | ||
<!-- 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> |
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,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chocolatey.Gui", "Chocolatey.Gui.csproj", "{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{851FC2F6-AFB0-4153-8520-BF68E1BEA3CB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
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,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String></wpf:ResourceDictionary> |
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,45 @@ | ||
using System.Configuration; | ||
|
||
namespace Chocolatey.Gui | ||
{ | ||
public class ChocoConfigurationSection : ConfigurationSection | ||
{ | ||
[ConfigurationProperty("", IsRequired = true, IsDefaultCollection = true)] | ||
public SourcesCollection Sources | ||
{ | ||
get { return (SourcesCollection) this[""]; } | ||
set { this[""] = value; } | ||
} | ||
} | ||
|
||
public class SourcesCollection : ConfigurationElementCollection | ||
{ | ||
|
||
protected override ConfigurationElement CreateNewElement() | ||
{ | ||
return new SourceElement(); | ||
} | ||
|
||
protected override object GetElementKey(ConfigurationElement element) | ||
{ | ||
return ((SourceElement) element).Name; | ||
} | ||
} | ||
|
||
public class SourceElement : ConfigurationElement | ||
{ | ||
[ConfigurationProperty("Name", IsKey = true, IsRequired = true)] | ||
public string Name | ||
{ | ||
get { return (string)base["Name"]; } | ||
set { base["Name"] = value; } | ||
} | ||
|
||
[ConfigurationProperty("Url", IsKey = true, IsRequired = true)] | ||
public string Url | ||
{ | ||
get { return (string)base["Url"]; } | ||
set { base["Url"] = value; } | ||
} | ||
} | ||
} |
Oops, something went wrong.