-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 16, 2016
0 parents
commit 54f8d4d
Showing
3,322 changed files
with
144,258 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2012 Matthew MacDonald | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
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,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace EightBall | ||
{ | ||
class AnswerGenerator | ||
{ | ||
|
||
string[] answers = new string[]{ | ||
"Ask Again later","Can Not Predict Now","Without a Doubt", | ||
"Is Decidely So","Concentrate and Ask Again","My Sources Say No", | ||
"Yes, Definitely","Don't Count On It","Signs Point to Yes", | ||
"Better Not Tell You Now","Outlook Not So Good","Most Likely", | ||
"Very Doubtful","As I See It, Yes","My Reply is No","It Is Certain", | ||
"Yes","You May Rely On It","Outlook Good","Reply Hazy Try Again" | ||
}; | ||
|
||
public string GetRandomAnswer(string question) | ||
{ | ||
|
||
Random rnd = new Random(); | ||
|
||
return answers[rnd.Next(0, answers.Length)]; | ||
} | ||
} | ||
} |
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,9 @@ | ||
<Application x:Class="WindowsApplication1.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
StartupUri="Window1.xaml" | ||
> | ||
<Application.Resources> | ||
|
||
</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,17 @@ | ||
using System; | ||
using System.Windows; | ||
using System.Data; | ||
using System.Xml; | ||
using System.Configuration; | ||
|
||
namespace EightBall | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
|
||
public partial class App : System.Windows.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,119 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{7903E710-F81B-437A-98E2-46E2BED72EAD}</ProjectGuid> | ||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<RootNamespace>EightBall</RootNamespace> | ||
<AssemblyName>EightBall</AssemblyName> | ||
<WarningLevel>4</WarningLevel> | ||
<OutputType>winexe</OutputType> | ||
<MinFrameworkVersionRequired>3.0</MinFrameworkVersionRequired> | ||
<Install>true</Install> | ||
<InstallFrom>Web</InstallFrom> | ||
<UpdateEnabled>true</UpdateEnabled> | ||
<UpdateMode>Foreground</UpdateMode> | ||
<UpdateInterval>7</UpdateInterval> | ||
<UpdateIntervalUnits>Days</UpdateIntervalUnits> | ||
<UpdatePeriodically>false</UpdatePeriodically> | ||
<UpdateRequired>false</UpdateRequired> | ||
<MapFileExtensions>false</MapFileExtensions> | ||
<ApplicationVersion>1.0.0.*</ApplicationVersion> | ||
<IsWebBootstrapper>true</IsWebBootstrapper> | ||
<BootstrapperEnabled>true</BootstrapperEnabled> | ||
<PublishUrl>Publish\</PublishUrl> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileUpgradeFlags> | ||
</FileUpgradeFlags> | ||
<OldToolsVersion>3.5</OldToolsVersion> | ||
<UpgradeBackupLocation> | ||
</UpgradeBackupLocation> | ||
<TargetFrameworkProfile> | ||
</TargetFrameworkProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>.\bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugSymbols>false</DebugSymbols> | ||
<Optimize>true</Optimize> | ||
<OutputPath>.\bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core"> | ||
<RequiredTargetFramework>3.5</RequiredTargetFramework> | ||
</Reference> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xaml" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="UIAutomationTypes" /> | ||
<Reference Include="ReachFramework" /> | ||
<Reference Include="System.Printing" /> | ||
<Reference Include="System.ServiceModel" /> | ||
<Reference Include="System.Runtime.Serialization" /> | ||
<Reference Include="System.IdentityModel" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="App.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
<Page Include="Window1.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Compile Include="App.xaml.cs"> | ||
<DependentUpon>App.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="Window1.xaml.cs"> | ||
<DependentUpon>Window1.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AnswerGenerator.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<SubType>Designer</SubType> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
<None Include="app.config" /> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<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> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
</Compile> | ||
<AppDesigner Include="Properties\" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
</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}") = "EightBall", "EightBall.csproj", "{7903E710-F81B-437A-98E2-46E2BED72EAD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7903E710-F81B-437A-98E2-46E2BED72EAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7903E710-F81B-437A-98E2-46E2BED72EAD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7903E710-F81B-437A-98E2-46E2BED72EAD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7903E710-F81B-437A-98E2-46E2BED72EAD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions
54
Pro WPF 4.5 in C#/Chapter02/EightBall/Properties/AssemblyInfo.cs
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,54 @@ | ||
#region Using directives | ||
|
||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Resources; | ||
using System.Globalization; | ||
using System.Windows; | ||
using System.Runtime.InteropServices; | ||
|
||
#endregion | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("WindowsApplication1")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("WindowsApplication1")] | ||
[assembly: AssemblyCopyright("Copyright @ 2006")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
|
||
//In order to begin building localizable applications, set | ||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file | ||
//inside a <PropertyGroup>. For example, if you are using US english | ||
//in your source files, set the <UICulture> to en-US. Then uncomment | ||
//the NeutralResourceLanguage attribute below. Update the "en-US" in | ||
//the line below to match the UICulture setting in the project file. | ||
|
||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] | ||
|
||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] | ||
|
||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Revision and Build Numbers | ||
// by using the '*' as shown below: | ||
[assembly: AssemblyVersion("1.0.*")] |
63 changes: 63 additions & 0 deletions
63
Pro WPF 4.5 in C#/Chapter02/EightBall/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.