Poker2.jpg Poker14.jpg int num1, num2;

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

Complete Structure class Date {class Date { private :private : // private data and functions// private data and functions public :public : // public data.
Input review If review Common Errors in Selection Statement Logical Operators switch Statements Generating Random Numbers practice.
For(int i = 1; i
sample text 14pt Helvetica Instructions 1.Use mouse to select an object (icon, arrow or sample text box) 2.Copy the object (Edit > Copy) then paste.
Nov 2005 MSc Slide 1 - Another Example of a Structural Pattern Alternative way of adding Functionality to an existing class (alternative to a derived class)
Method main Point p1 = new Point(5, 6); Point p2 = new Point(10, 11); System.out.println(p1.getX()); System.out.println( Point.num );
Public class ABC { private int information = 0; private char moreInformation = ‘ ‘; public ABC ( int newInfo, char moreNewInfo) { } public ABC () {} public.
YILAN ATILGAN DAĞILGAN Flow Diagram Of The Program Home Screen Choose Difficulty Start Direction of the Snake DeathStop Show Score Yes No.
Making a cartoon or slideshow. Aside VB comments An apostrophe starts a comment to end of line Some of the following slides have code with comments in.
Calling C++ DLLs from VC++ -- with Win32 Dynamic-Link Library Copyright (c) 2006 NCNU Lab 202 All Rights Reserved.
1 Powers of Two: Trace Ex. Print powers of 2 that are  2 N. Increment i from 0 to N. Double v each time. int i = 0; int v = 1; while (i
Crossword Puzzle Solver Michael Keefe. Solver structure.
ADO.NET By Hanumantha Rao.N MCA By Hanumantha Rao.N MCA.
Lecture 8 Building an MDI Application. Introduction The MDI (Multiple Document Interface) provides a way to display multiple (child) windows forms inside.
By Szeto CYVisual C# Text form1Clock (label1) lblHH00 (label2) lblMM00 (label3) lblSS00 label4: label5: timer1Interval 500 Enabled true 按照下表,更改各控制項.
Wii mote interfacing. The product It is a wireless device, using standard Bluetooth technology to communicate The Wii Remote uses the standard Bluetooth.
.NET 2.0 and Visual Studio 2005 SigWin Outline Language enhancements in C# Language enhancements in C# –Generics –Partial types –Anonymous methods.
Lecture 16: Multithreaded Programming. public partial class Form1 : Form { Thread ct; Thread rt; public static int circle_sleep = 0; public static int.
Rules Two Teams Questions worth 1-3 points – Entire team can confer to answer the question – Max of 2 minutes per question – You can use a computer on.
Command Object’s ExecuteNonQuery Method ISYS 512.

TIC TAC TOE. import java.util.Scanner; import java.util.Random; public class PlayTTT{ public static void main(String[]args){ Scanner reader = new Scanner(System.in);
File Size and File Formats. Digital cameras often save images in one of several formats: JPGBMPTIFFRAWOthers Most of these are unsuitable for use on the.
Objects and Classes Continued Engineering 1D04, Teaching Session 10.
LINKED LISTS Midwestern State University CMPS 1053 Dr. Ranette Halverson 1.
int num = 22; if (num > 0) if (num % 5 == 0) System.out.println(num); else System.out.println(num + “ is negative”);
01/anthropology.jpg.
private void Application_Launching(object sender, LaunchingEventArgs e) { } private void Application_Activated(object.
A: A: double “4” A: “34” 4.
Java Programming Persistent Data Types. Persistent Data Structure A persistent data structure is a data structure having an internal state that never.
CheckBox i Option Button. Private Sub Command1_Click() Check1 = 1 If Check1 = 1 Then Text1.FontBold = True Else Text1.FontBold = False End If Check2 =
1 Working with Controls at Run Time. 2 Objectives You will be able to Add controls to a Windows form at run time. Modify controls at run time.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Array, ArrayList and List ISYS 350. Array An array allows you to store a group of items of the same type together. Processing a large number of items.
Windows form programming. namespace MyNamespace { public class MyForm : System.Windows.Forms.Form { public MyForm() { this.Text = "Hello Form"; }
T/F  The following code will compile without error. int x = 3, y = 4, z = 5; double k = 3.4; cout
Timed Math Quiz. In This Part, You Learn How to Generate random numbers by using the Random class. Trigger events to occur at a specific time by using.
Praktikum 2 Konversi RGB.
Array ISYS 350.
Lecture No.03 Data Structures Dr. Sohail Aslam
Algorithm for deleting a node from a singly linked list
Array ISYS 350.
CS Week 8 Jim Williams, PhD.
Recursion.
Review Operation Bingo
Picture Viewer.
How to Add Images Using an 'openFile' Dialog
null, true, and false are also reserved.
MDI Picture Viewer Application
Decision Structure - 2 ISYS 350.
ИНФОРМАТИКА И РАЧУНАРСТВО Наставна тема: РАЧУНАРСКА ГРАФИКА
Example: Checking for correct UK Postcode
searching Concept: Linear search Binary search
Decision Structure - 2 ISYS 350.
CS 3870 Web User Control Events.
Decision Structure - 2 ISYS 350.
Processor Name here Your name here Bullet
IF Statements.
CheckBox i Option Button
Web Service.
Кезеңдер “Өзім туралы” “Болашақ компьютері” “Жарнама”
Decision Structure - 2 ISYS 350.
BMI Form1 Body Mass Index textBox3-4 (readonly) trackBar1
Building Java Programs
AB form1 Multiplication textBox1 12 textBox2 34 textBox3
Creating Controls Dynamically in C#
label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1
Command Object’s ExecuteNonQuery Method
form1 Runner pictureBox1 imageList1 timer1 label1 原地跑步計時 label2 共用了…秒
Presentation transcript:

Poker2.jpg Poker14.jpg int num1, num2; private void Form1_Load(object sender, EventArgs e) { pictureBox1.Enabled = false; pictureBox2.Enabled = false; pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox1.Image = new Bitmap("Pokerbk.jpg"); pictureBox2.Image = new Bitmap("Pokerbk.jpg"); lblMsg.Text = "按洗牌鈕遊戲開始.."; }

private void btnOK_Click(object sender, EventArgs e) { pictureBox1.Enabled = true; pictureBox2.Enabled = true; btnOK.Enabled = false; pictureBox1.Image = new Bitmap("Pokerbk.jpg"); pictureBox2.Image = new Bitmap("Pokerbk.jpg"); // pictureBox3.Image = null; // 清除 // 圖檔格式:bmp, gif, jpg, wmf, png, ico Random r = new Random(); num1 = r.Next(2, 15); // 產生亂數 2~14 num2 = r.Next(2, 15); lblMsg.Text = "請在撲克牌上按一下選取 .."; }

private void pictureBox1_Click(object sender, EventArgs e) { pictureBox1.Image = new Bitmap("Poker?.jpg"); pictureBox2.Image = new Bitmap("Poker?.jpg"); if (…) lblMsg.Text = " 你贏了 !"; else if (…) lblMsg.Text = " 平手 !"; else lblMsg.Text = " 你輸了 !"; pictureBox1.Enabled = false; pictureBox2.Enabled = false; btnOK.Enabled = true; }