Initial commit
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace SlotMachineSimulator
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "Form1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SlotMachineSimulator
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SlotMachineSimulator
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new mainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 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("SlotMachineSimulator")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SlotMachineSimulator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("84004e2b-c702-4039-8b2e-33deabf1f726")]
|
||||
|
||||
// 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 Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,163 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SlotMachineSimulator.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SlotMachineSimulator.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Apple {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Apple", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Banana {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Banana", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Cherries {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Cherries", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Grapes {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Grapes", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Lemon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Lemon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Lime {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Lime", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Orange {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Orange", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Pear {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Pear", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Strawberry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Strawberry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Watermelon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Watermelon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Apple" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Apple.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Banana" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Banana.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Cherries" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cherries.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Grapes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grapes.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Lemon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Lemon.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Lime" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Lime.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Orange" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Orange.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Pear" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Pear.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Strawberry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Strawberry.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Watermelon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Watermelon.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SlotMachineSimulator.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,125 @@
|
||||
<?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>{E9BC73BC-147F-4508-B834-EE0630922A6D}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SlotMachineSimulator</RootNamespace>
|
||||
<AssemblyName>SlotMachineSimulator</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</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="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="mainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="mainForm.Designer.cs">
|
||||
<DependentUpon>mainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="mainForm.resx">
|
||||
<DependentUpon>mainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Apple.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Banana.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Cherries.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Grapes.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Lemon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Lime.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Orange.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Pear.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Strawberry.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Watermelon.bmp" />
|
||||
</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>
|
||||
@@ -0,0 +1,219 @@
|
||||
namespace SlotMachineSimulator
|
||||
{
|
||||
partial class mainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(mainForm));
|
||||
this.slotPicture1 = new System.Windows.Forms.PictureBox();
|
||||
this.slotPicture2 = new System.Windows.Forms.PictureBox();
|
||||
this.slotPicture3 = new System.Windows.Forms.PictureBox();
|
||||
this.spinButton = new System.Windows.Forms.Button();
|
||||
this.exitButton = new System.Windows.Forms.Button();
|
||||
this.amountInsertedTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.fruitImageList = new System.Windows.Forms.ImageList(this.components);
|
||||
this.mainMenu = new System.Windows.Forms.MenuStrip();
|
||||
this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitFileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resetEditMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture3)).BeginInit();
|
||||
this.mainMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// slotPicture1
|
||||
//
|
||||
this.slotPicture1.Image = global::SlotMachineSimulator.Properties.Resources.Watermelon;
|
||||
this.slotPicture1.Location = new System.Drawing.Point(22, 52);
|
||||
this.slotPicture1.Name = "slotPicture1";
|
||||
this.slotPicture1.Size = new System.Drawing.Size(111, 110);
|
||||
this.slotPicture1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.slotPicture1.TabIndex = 0;
|
||||
this.slotPicture1.TabStop = false;
|
||||
//
|
||||
// slotPicture2
|
||||
//
|
||||
this.slotPicture2.Image = global::SlotMachineSimulator.Properties.Resources.Apple;
|
||||
this.slotPicture2.Location = new System.Drawing.Point(152, 52);
|
||||
this.slotPicture2.Name = "slotPicture2";
|
||||
this.slotPicture2.Size = new System.Drawing.Size(111, 110);
|
||||
this.slotPicture2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.slotPicture2.TabIndex = 1;
|
||||
this.slotPicture2.TabStop = false;
|
||||
//
|
||||
// slotPicture3
|
||||
//
|
||||
this.slotPicture3.Image = global::SlotMachineSimulator.Properties.Resources.Grapes;
|
||||
this.slotPicture3.Location = new System.Drawing.Point(283, 52);
|
||||
this.slotPicture3.Name = "slotPicture3";
|
||||
this.slotPicture3.Size = new System.Drawing.Size(111, 110);
|
||||
this.slotPicture3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.slotPicture3.TabIndex = 2;
|
||||
this.slotPicture3.TabStop = false;
|
||||
//
|
||||
// spinButton
|
||||
//
|
||||
this.spinButton.Location = new System.Drawing.Point(104, 217);
|
||||
this.spinButton.Name = "spinButton";
|
||||
this.spinButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.spinButton.TabIndex = 3;
|
||||
this.spinButton.Text = "Spin";
|
||||
this.spinButton.UseVisualStyleBackColor = true;
|
||||
this.spinButton.Click += new System.EventHandler(this.spinButton_Click);
|
||||
//
|
||||
// exitButton
|
||||
//
|
||||
this.exitButton.Location = new System.Drawing.Point(217, 217);
|
||||
this.exitButton.Name = "exitButton";
|
||||
this.exitButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.exitButton.TabIndex = 4;
|
||||
this.exitButton.Text = "Exit";
|
||||
this.exitButton.UseVisualStyleBackColor = true;
|
||||
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
|
||||
//
|
||||
// amountInsertedTextBox
|
||||
//
|
||||
this.amountInsertedTextBox.Location = new System.Drawing.Point(200, 191);
|
||||
this.amountInsertedTextBox.Name = "amountInsertedTextBox";
|
||||
this.amountInsertedTextBox.Size = new System.Drawing.Size(107, 20);
|
||||
this.amountInsertedTextBox.TabIndex = 5;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(98, 194);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(96, 13);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Amount Inserted: $";
|
||||
//
|
||||
// fruitImageList
|
||||
//
|
||||
this.fruitImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("fruitImageList.ImageStream")));
|
||||
this.fruitImageList.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.fruitImageList.Images.SetKeyName(0, "Apple.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(1, "Banana.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(2, "Cherries.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(3, "Grapes.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(4, "Lemon.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(5, "Lime.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(6, "Orange.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(7, "Pear.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(8, "Strawberry.bmp");
|
||||
this.fruitImageList.Images.SetKeyName(9, "Watermelon.bmp");
|
||||
//
|
||||
// mainMenu
|
||||
//
|
||||
this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileMainMenu,
|
||||
this.editMainMenu});
|
||||
this.mainMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainMenu.Name = "mainMenu";
|
||||
this.mainMenu.Size = new System.Drawing.Size(417, 24);
|
||||
this.mainMenu.TabIndex = 7;
|
||||
this.mainMenu.Text = "menuStrip1";
|
||||
//
|
||||
// fileMainMenu
|
||||
//
|
||||
this.fileMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitFileMainMenu});
|
||||
this.fileMainMenu.Name = "fileMainMenu";
|
||||
this.fileMainMenu.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileMainMenu.Text = "&File";
|
||||
//
|
||||
// exitFileMainMenu
|
||||
//
|
||||
this.exitFileMainMenu.Name = "exitFileMainMenu";
|
||||
this.exitFileMainMenu.Size = new System.Drawing.Size(92, 22);
|
||||
this.exitFileMainMenu.Text = "E&xit";
|
||||
this.exitFileMainMenu.Click += new System.EventHandler(this.exitFileMainMenu_Click);
|
||||
//
|
||||
// editMainMenu
|
||||
//
|
||||
this.editMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.resetEditMainMenu});
|
||||
this.editMainMenu.Name = "editMainMenu";
|
||||
this.editMainMenu.Size = new System.Drawing.Size(39, 20);
|
||||
this.editMainMenu.Text = "&Edit";
|
||||
//
|
||||
// resetEditMainMenu
|
||||
//
|
||||
this.resetEditMainMenu.Name = "resetEditMainMenu";
|
||||
this.resetEditMainMenu.Size = new System.Drawing.Size(102, 22);
|
||||
this.resetEditMainMenu.Text = "&Reset";
|
||||
this.resetEditMainMenu.Click += new System.EventHandler(this.resetEditMainMenu_Click);
|
||||
//
|
||||
// mainForm
|
||||
//
|
||||
this.AcceptButton = this.spinButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(417, 259);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.amountInsertedTextBox);
|
||||
this.Controls.Add(this.exitButton);
|
||||
this.Controls.Add(this.spinButton);
|
||||
this.Controls.Add(this.slotPicture3);
|
||||
this.Controls.Add(this.slotPicture2);
|
||||
this.Controls.Add(this.slotPicture1);
|
||||
this.Controls.Add(this.mainMenu);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.mainMenu;
|
||||
this.Name = "mainForm";
|
||||
this.Text = "Slot Machine Simulator";
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slotPicture3)).EndInit();
|
||||
this.mainMenu.ResumeLayout(false);
|
||||
this.mainMenu.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox slotPicture1;
|
||||
private System.Windows.Forms.PictureBox slotPicture2;
|
||||
private System.Windows.Forms.PictureBox slotPicture3;
|
||||
private System.Windows.Forms.Button spinButton;
|
||||
private System.Windows.Forms.Button exitButton;
|
||||
private System.Windows.Forms.TextBox amountInsertedTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ImageList fruitImageList;
|
||||
private System.Windows.Forms.MenuStrip mainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitFileMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem editMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem resetEditMainMenu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
/* Program Name: Slot Machine Simulator
|
||||
* Author: Garritt McCune
|
||||
* Date: 04/21/14
|
||||
* Purpose: To simulate the function of a slot machine and determent the payout based on the number of matched fruit.
|
||||
*/
|
||||
namespace SlotMachineSimulator
|
||||
{
|
||||
public partial class mainForm : Form
|
||||
{
|
||||
//store the total payout and total inserted money
|
||||
private decimal totalAmountInserted;
|
||||
private decimal totalPayout;
|
||||
|
||||
public mainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void spinButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//create a variable to store the user's input
|
||||
decimal amountInserted = 0;
|
||||
|
||||
//begin by validating the user's input
|
||||
if (Decimal.TryParse(amountInsertedTextBox.Text, out amountInserted))
|
||||
{
|
||||
//create a random object
|
||||
Random rand = new Random();
|
||||
|
||||
//get the images for the slots at random
|
||||
int pictureOne = rand.Next(fruitImageList.Images.Count);
|
||||
int pictureTwo = rand.Next(fruitImageList.Images.Count);
|
||||
int pictureThree = rand.Next(fruitImageList.Images.Count);
|
||||
|
||||
decimal payout;
|
||||
|
||||
//add to the total amount inserted to the machine
|
||||
totalAmountInserted += amountInserted;
|
||||
|
||||
//check to see if any of the images match
|
||||
payout = CheckForMatches(pictureOne, pictureTwo, pictureThree, amountInserted);
|
||||
|
||||
//add up the total amount of payout
|
||||
totalPayout += payout;
|
||||
|
||||
//set the images according to the random index generated above
|
||||
slotPicture1.Image = fruitImageList.Images[pictureOne];
|
||||
slotPicture2.Image = fruitImageList.Images[pictureTwo];
|
||||
slotPicture3.Image = fruitImageList.Images[pictureThree];
|
||||
|
||||
MessageBox.Show("Your payout: " + payout.ToString("C") + ".");
|
||||
|
||||
amountInsertedTextBox.Focus();
|
||||
amountInsertedTextBox.SelectAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
//display error and reset focus to the text box
|
||||
MessageBox.Show("Please enter a valid amount.", "Invalid Amount");
|
||||
amountInsertedTextBox.Focus();
|
||||
amountInsertedTextBox.SelectAll();
|
||||
}
|
||||
}
|
||||
|
||||
private decimal CheckForMatches(decimal slotOne, decimal slotTwo, decimal slotThree, decimal amount)
|
||||
{
|
||||
//set the default payout
|
||||
decimal payout = 0;
|
||||
|
||||
//check for any matches
|
||||
if (slotOne == slotTwo || slotOne == slotThree)
|
||||
{
|
||||
if (slotOne == slotTwo && slotOne == slotThree)
|
||||
{
|
||||
//if all slots match multiply the amount by three
|
||||
payout = amount * 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if only two match multiply the amount by two
|
||||
payout = amount * 2;
|
||||
}
|
||||
}
|
||||
else if (slotTwo == slotOne || slotTwo == slotThree)
|
||||
{
|
||||
if (slotTwo == slotOne && slotTwo == slotThree)
|
||||
{
|
||||
//if all slots match multiply the amount by three
|
||||
payout = amount * 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if only two match multiply the amount by two
|
||||
payout = amount * 2;
|
||||
}
|
||||
}
|
||||
else if (slotThree == slotOne || slotThree == slotTwo)
|
||||
{
|
||||
if (slotThree == slotOne && slotThree == slotTwo)
|
||||
{
|
||||
//if all slots match multiply the amount by three
|
||||
payout = amount * 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if only two match multiply the amount by two
|
||||
payout = amount * 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//if no matches are found, then the user has won nothing
|
||||
payout = 0;
|
||||
}
|
||||
|
||||
return payout;
|
||||
}
|
||||
|
||||
private void exitButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//display the total payout and total amount of money inserted
|
||||
MessageBox.Show(" You inserted a total of " + totalAmountInserted.ToString("C") + ".\n With a total payout of " + totalPayout.ToString("C") + ".", "Slot Machine Stats");
|
||||
|
||||
//close the application
|
||||
Close();
|
||||
}
|
||||
|
||||
private void exitFileMainMenu_Click(object sender, EventArgs e)
|
||||
{
|
||||
//display the total payout and total amount of money inserted
|
||||
MessageBox.Show(" You inserted a total of " + totalAmountInserted.ToString("C") + ".\n With a total payout of " + totalPayout.ToString("C") + ".", "Slot Machine Stats");
|
||||
|
||||
//close the application
|
||||
Close();
|
||||
}
|
||||
|
||||
private void resetEditMainMenu_Click(object sender, EventArgs e)
|
||||
{
|
||||
//start by redoing the pictures
|
||||
//create a random object again
|
||||
Random rand = new Random();
|
||||
|
||||
//get the images for the slots at random
|
||||
int index = rand.Next(fruitImageList.Images.Count);
|
||||
int index2 = rand.Next(fruitImageList.Images.Count);
|
||||
int index3 = rand.Next(fruitImageList.Images.Count);
|
||||
|
||||
//set the images according to the random index generated above
|
||||
slotPicture1.Image = fruitImageList.Images[index];
|
||||
slotPicture2.Image = fruitImageList.Images[index2];
|
||||
slotPicture3.Image = fruitImageList.Images[index3];
|
||||
|
||||
//display the summary
|
||||
MessageBox.Show("You inserted a total of " + totalAmountInserted.ToString("C") + ".\n With a total payout of " + totalPayout.ToString("C") + ".", "Slot Machine Stats");
|
||||
|
||||
//reset all the counters
|
||||
totalPayout = 0;
|
||||
totalAmountInserted = 0;
|
||||
|
||||
//clear the form
|
||||
amountInsertedTextBox.Text = "";
|
||||
amountInsertedTextBox.Focus();
|
||||
amountInsertedTextBox.SelectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||