From 294d3d5a0ad5cd9262fd4547fdbe58d0c50451e8 Mon Sep 17 00:00:00 2001 From: Amrit Panesar Date: Tue, 14 Apr 2015 21:09:11 -0700 Subject: [PATCH] Project 4 start Signed-off-by: Amrit Panesar --- COM380/Project4/Project4.sln | 20 +++ COM380/Project4/Project4/AssemblyInfo.cpp | 40 +++++ COM380/Project4/Project4/Form1.h | 140 ++++++++++++++++++ COM380/Project4/Project4/Form1.resX | 123 +++++++++++++++ COM380/Project4/Project4/LottoBall.h | 27 ++++ COM380/Project4/Project4/LottoBallcpp.cpp | 4 + COM380/Project4/Project4/Project4.cpp | 18 +++ COM380/Project4/Project4/Project4.vcxproj | 121 +++++++++++++++ .../Project4/Project4.vcxproj.filters | 58 ++++++++ COM380/Project4/Project4/ReadMe.txt | 40 +++++ COM380/Project4/Project4/app.ico | Bin 0 -> 10134 bytes COM380/Project4/Project4/app.rc | Bin 0 -> 2558 bytes COM380/Project4/Project4/resource.h | 3 + COM380/Project4/Project4/stdafx.cpp | 7 + COM380/Project4/Project4/stdafx.h | 6 + 15 files changed, 607 insertions(+) create mode 100644 COM380/Project4/Project4.sln create mode 100644 COM380/Project4/Project4/AssemblyInfo.cpp create mode 100644 COM380/Project4/Project4/Form1.h create mode 100644 COM380/Project4/Project4/Form1.resX create mode 100644 COM380/Project4/Project4/LottoBall.h create mode 100644 COM380/Project4/Project4/LottoBallcpp.cpp create mode 100644 COM380/Project4/Project4/Project4.cpp create mode 100644 COM380/Project4/Project4/Project4.vcxproj create mode 100644 COM380/Project4/Project4/Project4.vcxproj.filters create mode 100644 COM380/Project4/Project4/ReadMe.txt create mode 100644 COM380/Project4/Project4/app.ico create mode 100644 COM380/Project4/Project4/app.rc create mode 100644 COM380/Project4/Project4/resource.h create mode 100644 COM380/Project4/Project4/stdafx.cpp create mode 100644 COM380/Project4/Project4/stdafx.h diff --git a/COM380/Project4/Project4.sln b/COM380/Project4/Project4.sln new file mode 100644 index 0000000..ea75a35 --- /dev/null +++ b/COM380/Project4/Project4.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project4", "Project4\Project4.vcxproj", "{95420C8C-DDE8-4C10-AB3C-E6593D36DE8A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {95420C8C-DDE8-4C10-AB3C-E6593D36DE8A}.Debug|Win32.ActiveCfg = Debug|Win32 + {95420C8C-DDE8-4C10-AB3C-E6593D36DE8A}.Debug|Win32.Build.0 = Debug|Win32 + {95420C8C-DDE8-4C10-AB3C-E6593D36DE8A}.Release|Win32.ActiveCfg = Release|Win32 + {95420C8C-DDE8-4C10-AB3C-E6593D36DE8A}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/COM380/Project4/Project4/AssemblyInfo.cpp b/COM380/Project4/Project4/AssemblyInfo.cpp new file mode 100644 index 0000000..f610bda --- /dev/null +++ b/COM380/Project4/Project4/AssemblyInfo.cpp @@ -0,0 +1,40 @@ +#include "stdafx.h" + +using namespace System; +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; +using namespace System::Runtime::InteropServices; +using namespace System::Security::Permissions; + +// +// 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:AssemblyTitleAttribute("Project4")]; +[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("")]; +[assembly:AssemblyProductAttribute("Project4")]; +[assembly:AssemblyCopyrightAttribute("Copyright (c) 2015")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.0.*")]; + +[assembly:ComVisible(false)]; + +[assembly:CLSCompliantAttribute(true)]; + +[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; diff --git a/COM380/Project4/Project4/Form1.h b/COM380/Project4/Project4/Form1.h new file mode 100644 index 0000000..08b89cd --- /dev/null +++ b/COM380/Project4/Project4/Form1.h @@ -0,0 +1,140 @@ +#pragma once +#include "LottoBall.h" + +namespace Project4 +{ + using namespace System; + using namespace System::ComponentModel; + using namespace System::Collections; + using namespace System::Collections::Generic; + using namespace System::Windows::Forms; + using namespace System::Data; + using namespace System::Drawing; + + /// + /// Summary for Form1 + /// + public ref class Form1 : public System::Windows::Forms::Form + { + public: + Form1(void) + { + InitializeComponent(); + // + //TODO: Add the constructor code here + // + } + + protected: + /// + /// Clean up any resources being used. + /// + ~Form1() + { + if (components) + { + delete components; + } + } + private: System::Windows::Forms::MenuStrip^ menuStrip1; + protected: + private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ exitToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ helpToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem; + + private: + /// + /// Required designer variable. + /// + System::ComponentModel::Container ^components; + +#pragma region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + void InitializeComponent(void) + { + this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip()); + this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->menuStrip1->SuspendLayout(); + this->SuspendLayout(); + // + // menuStrip1 + // + this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->fileToolStripMenuItem, + this->helpToolStripMenuItem}); + this->menuStrip1->Location = System::Drawing::Point(0, 0); + this->menuStrip1->Name = L"menuStrip1"; + this->menuStrip1->Size = System::Drawing::Size(669, 24); + this->menuStrip1->TabIndex = 0; + this->menuStrip1->Text = L"menuStrip1"; + // + // fileToolStripMenuItem + // + this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->exitToolStripMenuItem}); + this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem"; + this->fileToolStripMenuItem->ShortcutKeys = static_cast((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::F)); + this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20); + this->fileToolStripMenuItem->Text = L"&File"; + // + // exitToolStripMenuItem + // + this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem"; + this->exitToolStripMenuItem->ShortcutKeys = static_cast((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::F4)); + this->exitToolStripMenuItem->Size = System::Drawing::Size(152, 22); + this->exitToolStripMenuItem->Text = L"E&xit"; + this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::exitToolStripMenuItem_Click); + // + // helpToolStripMenuItem + // + this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->aboutToolStripMenuItem}); + this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem"; + this->helpToolStripMenuItem->ShortcutKeys = static_cast((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::H)); + this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20); + this->helpToolStripMenuItem->Text = L"&Help"; + // + // aboutToolStripMenuItem + // + this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem"; + this->aboutToolStripMenuItem->ShortcutKeys = static_cast((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::A)); + this->aboutToolStripMenuItem->Size = System::Drawing::Size(145, 22); + this->aboutToolStripMenuItem->Text = L"&About"; + // + // Form1 + // + this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->ClientSize = System::Drawing::Size(669, 482); + this->Controls->Add(this->menuStrip1); + this->MainMenuStrip = this->menuStrip1; + this->Name = L"Form1"; + this->Text = L"Form1"; + this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); + this->menuStrip1->ResumeLayout(false); + this->menuStrip1->PerformLayout(); + this->ResumeLayout(false); + this->PerformLayout(); + + } +#pragma endregion + + public: List balls; + + private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) + { + + } + + private: System::Void exitToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) + { + Application::Exit(); + } + +}; +} + diff --git a/COM380/Project4/Project4/Form1.resX b/COM380/Project4/Project4/Form1.resX new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/COM380/Project4/Project4/Form1.resX @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/COM380/Project4/Project4/LottoBall.h b/COM380/Project4/Project4/LottoBall.h new file mode 100644 index 0000000..c7ecc10 --- /dev/null +++ b/COM380/Project4/Project4/LottoBall.h @@ -0,0 +1,27 @@ +#pragma once + +namespace Project4 +{ + using namespace System; + using namespace System::Collections; + using namespace System::Collections::Generic; + using namespace System::Threading; + using namespace System::Threading::Tasks; + using namespace System::Data; + + public ref class LottoBall + { + + public: + LottoBall(); + ~LottoBall(); + + int getCurrentValue(); + + private: + Thread^ thread; + System::Void run(); + + }; + +} \ No newline at end of file diff --git a/COM380/Project4/Project4/LottoBallcpp.cpp b/COM380/Project4/Project4/LottoBallcpp.cpp new file mode 100644 index 0000000..79f48d4 --- /dev/null +++ b/COM380/Project4/Project4/LottoBallcpp.cpp @@ -0,0 +1,4 @@ + +#include "LottoBall.h" + + diff --git a/COM380/Project4/Project4/Project4.cpp b/COM380/Project4/Project4/Project4.cpp new file mode 100644 index 0000000..365fe23 --- /dev/null +++ b/COM380/Project4/Project4/Project4.cpp @@ -0,0 +1,18 @@ +// Project4.cpp : main project file. + +#include "stdafx.h" +#include "Form1.h" + +using namespace Project4; + +[STAThreadAttribute] +int main(array ^args) +{ + // Enabling Windows XP visual effects before any controls are created + Application::EnableVisualStyles(); + Application::SetCompatibleTextRenderingDefault(false); + + // Create the main window and run it + Application::Run(gcnew Form1()); + return 0; +} diff --git a/COM380/Project4/Project4/Project4.vcxproj b/COM380/Project4/Project4/Project4.vcxproj new file mode 100644 index 0000000..3a2e004 --- /dev/null +++ b/COM380/Project4/Project4/Project4.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {95420C8C-DDE8-4C10-AB3C-E6593D36DE8A} + v4.0 + ManagedCProj + Project4 + + + + Application + true + v110 + Pure + Unicode + + + Application + false + v110 + Pure + Unicode + + + + + + + + + + + + + true + + + false + + + + Level3 + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + Use + + + true + + Windows + main + + + + + Level3 + WIN32;NDEBUG;%(PreprocessorDefinitions) + Use + + + true + + Windows + main + + + + + + + + + + + + + + + + + + Create + Create + + + + + CppForm + + + CppClass + + + + + + + + + + + + + Form1.h + Designer + + + + + + \ No newline at end of file diff --git a/COM380/Project4/Project4/Project4.vcxproj.filters b/COM380/Project4/Project4/Project4.vcxproj.filters new file mode 100644 index 0000000..567769a --- /dev/null +++ b/COM380/Project4/Project4/Project4.vcxproj.filters @@ -0,0 +1,58 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/COM380/Project4/Project4/ReadMe.txt b/COM380/Project4/Project4/ReadMe.txt new file mode 100644 index 0000000..ba6c283 --- /dev/null +++ b/COM380/Project4/Project4/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + APPLICATION : Project4 Project Overview +======================================================================== + +AppWizard has created this Project4 Application for you. + +This file contains a summary of what you will find in each of the files that +make up your Project4 application. + +Project4.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +Project4.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +Project4.cpp + This is the main application source file. + Contains the code to display the form. + +Form1.h + Contains the implementation of your form class and InitializeComponent() function. + +AssemblyInfo.cpp + Contains custom attributes for modifying assembly metadata. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Project4.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// diff --git a/COM380/Project4/Project4/app.ico b/COM380/Project4/Project4/app.ico new file mode 100644 index 0000000000000000000000000000000000000000..301942f6075098f1a121e634050e89a01fa02cb8 GIT binary patch literal 10134 zcmeHL&2GXl40fSINRuW`JNL+AAP#$s9Vgyk$Mp&J96Sb(v(tVq<=A~rYLtXlkQ7wb z*;`^ew&V1}grr0n&1kV$fakQ#h+c@G6ZAQ4?ugzoX7z$LIZ-tuDhliWF(G=sXWja5 z=R{8rq8GHqJfDw5OP&)AZp3+*O4GM>u&}W#Ekh3xt)$&<2SaWCsjgW`e<3<2` z&d~!-L&`jwPP2(a*#LUDo)dcTJmCYkKoGig>c{(RVSHD4XGpREdvo2lVV|#4n&jnJ z{7ytQj?sAg*^L3ezV$O?ywqU|PyXUIftT243e2@alXEZO%-l{T4!N-4oNE|*h*9TW zM4v@+ZtdjuoGX1@i)1-;HxkO|bq|0RJbKz)I9udXAF3O2%J-6X$;?$_adWdQzF?^L6u*YX#k2qb literal 0 HcmV?d00001 diff --git a/COM380/Project4/Project4/app.rc b/COM380/Project4/Project4/app.rc new file mode 100644 index 0000000000000000000000000000000000000000..eab43064f13cd0a8912887c2c7299ddb6d7d2240 GIT binary patch literal 2558 zcmds(T~8B16o%hx6aT}cz0qh|kt;8OHl(p2u|ObcVzjun$-0o1ioYIx-q}uzY&RON zHfA$lXU?2CAMZJ{zwW#0D(FZvO*GfF7PL&a(9WSPwA5$itPb>wFX)@Ts-VrG-!fi7 zn=|^{lG%iLU}b4D-N4h)b3NmhZXDZC3wCq3uOe@&a=xRfT9Ml)+mSDe=PY|qCmQKg zXXO<`@Kh{u}P)77e+J`b^ZYfCz>(RWgv~!7P?33(2w$i>2#H#>Fc|_Qh z^$Vg|uu6y;F)Q)4&`b6oBW$sbY4hW1i<6cC#7@YRVoj;;1hOW_dS{Ze%gCRTQO?P0 zWC0DOPI5U zsW~oLw6^XIsan`<>ynio16ff0_sBq)>sz3jP1&!{CS&XIJM!nhN%CW}eNvC;0#Epr I_*Z2A2KzE2Bme*a literal 0 HcmV?d00001 diff --git a/COM380/Project4/Project4/resource.h b/COM380/Project4/Project4/resource.h new file mode 100644 index 0000000..d5ac7c4 --- /dev/null +++ b/COM380/Project4/Project4/resource.h @@ -0,0 +1,3 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by app.rc diff --git a/COM380/Project4/Project4/stdafx.cpp b/COM380/Project4/Project4/stdafx.cpp new file mode 100644 index 0000000..37dd445 --- /dev/null +++ b/COM380/Project4/Project4/stdafx.cpp @@ -0,0 +1,7 @@ +// stdafx.cpp : source file that includes just the standard includes +// Project4.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + diff --git a/COM380/Project4/Project4/stdafx.h b/COM380/Project4/Project4/stdafx.h new file mode 100644 index 0000000..46bef73 --- /dev/null +++ b/COM380/Project4/Project4/stdafx.h @@ -0,0 +1,6 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +#pragma once + +// TODO: reference additional headers your program requires here