You are on page 1of 22

TECHNICAL MANUAL

Content:
INTRODUCTION 3

IMPLEMENTATION OF THE PROGRAM

THE HEADING

CODE

11

TECHNICAL MANUAL

INTRODUCTION
Hangman is a classic game in which the player has to guess a hidden word, a specific item or varied, so only by knowing its length and form, without committing x amount of errors (those necessary to take the doll hanged). The letters sound Iran by completing the word so that it is becoming increasingly easy to find the missing letters. You can make use of counters of both words such as faults, in order for the item concerned the game. This document is the user manual of the program The hanged. This program is an educational game that has been carried out in an attractive way for the players, so as to favor the integrative process. So that it can be handled was drawn up in a easy and fast way to understand. Later we will explain the process for the development of the software, as it is played and how to load the games, to finish with a description of several important aspects to use the program: interfaces, buttons, play opportunities and code. In the game you will have to guess the word there is testing that go with each letter of the keyboard. The maximum number of errors is of 5 attempts, once guessed the word is displayed the message that has been won, otherwise it shows the message that has been lost and if you want to try again.

TECHNICAL MANUAL

IMPLEMENTATION OF THE PROGRAM


To run the program simply must hedgers from the program in which it was created, what is Visual Basic.

TECHNICAL MANUAL

THE HEADING
When the program runs, the first thing that appears is the main window (Figure 1).

Figure 1

This window, like the rest of windows belonging to the program, it is formed by graphical buttons. In this first window the Play button contains is to enter and start the game (Figure 2). that

Figure 2

TECHNICAL MANUAL

To begin playing is pressed on the button with the mouse and will start the new game (Figure 3)

Figure 3

The program will generate words that the user must guess. Each time the player hits a call on the number of errors that has been committed to zero. The game ends when the player does not hit the last word generated by the program. The previous screen gives you the option to the player for it to show any clues about the word that you have to guess, with this description will be easier for the user achieve his goal. In the button Show Tip: The program will launch at the bottom of the track that the player needs to complete the word (Figure 4).

Figure 4

TECHNICAL MANUAL

Figure 5 Figure 5 is an example of window where the game and that can be considered composed of four key parts: 1. At the top shows the current status of the word. Initially the word will appear with the first and last letter discovered. 2. On the left is the menu of this window: Menu. When you click on the menu option, will be deployed two situations: Change the Word and Exit, the first lets the player change the word and with the same follow your game and the second lets you finish the game execution (Figure 6).

Figure 6

TECHNICAL MANUAL

Enter letter" once this window is displayed the player has to go by pressing on the keyboard the letters that he thinks they belong to the word. If you're right, it shows all the occurrences of the letter and emits a message indicating how the word is after the hit. Otherwise it shows a new part of the drawing of the hanged. (Figure 7).

Figure 7

3. At the bottom we find: Faults. Informs the user how many mistakes you can commit yet. Button Show Tip. Figure 4. Description. This will appear when you click on the button Show Tip, will be of great help when the user is displayed undecided in his departure.

TECHNICAL MANUAL

4. The background drawing to. It shows a landscape where, as the player will make mistakes, appears the drawing of a hanged. When the player has committed all the possible errors the drawing of the hangman will be complete and the game will be finished (Figure 8).

Figure 8

On the contrary if the player succeeds in all the letters in the word that you had to play then the following screen will appear that displays to the user as a winner (Figure 9).

TECHNICAL MANUAL

Figure 9

In the two cases to give click on the Ok button will take us to another window which will give us the option to play with another word, and if so oppress one another the Other Word button or if we end the game only we direct us to the menu or select the Exit option (Figure 10).

Figure 10

TECHNICAL MANUAL

10

CODE
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms;

namespace horcado1 { public partial class Form2_animales : Form { public Form2_animales() { InitializeComponent(); } string seleccionada = ""; string seleccionada1 = ""; char letra; string s = ""; char[] c; string ss = ""; int tamao = 0; int CONTADOR = 5; bool letraEncontrada = false; private void Form2_animales_Load(object sender, EventArgs e) { pictureBox6.Visible = false; pictureBox5.Visible = false; pictureBox4.Visible = false; pictureBox3.Visible = false; pictureBox2.Visible = false; pictureBox1.Visible = true; label1.Visible = true; label2.Visible = true; textBox1.Visible = true; button1.Visible = false; letraEncontrada = false; label4.Visible = true; label3.Visible = true; CONTADOR = 5; label4.Text = CONTADOR.ToString(); ss = ""; s = ""; textBox1.Focus(); string[] lista = {"system analyst", "applet", "directory tree", "archive", "volatile file", "Arpanet", "attachment", "data bank", "database", "bulletin board system", "bit", "bit per second", "bitnet", "browser", "buffer", "byte", "coaxial cable", "CD-ROM", "common gateway interface", "chat", "cyberspace", "chip", "bar code", "compiler", "computer", "analog computer", "digital computer", "Microsoft disk operating system", "multiprogramming", "multitask", "nickname",

TECHNICAL MANUAL

11

"operator", "arithmetic operators", "comparison operators", "logical operators", "outbox", "pad mouse", "pixel", "spreadsheet", "post office protocol", "word processor", "process", "program", "programmer", "virtual reality", "network", "neural network", "register", "reply", "robot", "robotics", "search", "shareware", "memory simm", "simulation", "system", "operating system", "simple mail transfer protocol", "software", "spam", "spammer", "subject", "transmission control protocol/ Internet protocol", "telepresence", "teleprocessing", "terminal", "dumb terminal", "UNIX", "universal resource locator", "visual basic", "world wide web", "web", "webpages", "websites"," Windows 98", "Zip"}; string[] lista2 = { "Occupation or position of IT professionals, it is who determines the specific problem to be solved by an application and an outline of how to develop the application to solve the problem. She is a must for any department computer", "An application written and compiled in java that spread through the network to run in the client viewer"," The directory structure used in personal computers is arborescent; that is, there are directories and subdirectories, like branches growing thinner emerging initial trunk", "These are documents containing information computer (as opposed to instructions), such as text, images, sound, video, etc.. Example: a letter written in a word processor", "Temporary file used only to store data temporarily", "Computer network created in the U.S. military purposes, from which evolved Internet", "File computational sent attached to an e-mail. can be text, graphic, sound or program", "An electronic data storage", "Structure software that collects a variety of information from different people and things (ie a given reality), each of which has something in common or fields common to all or some. Was designed in order to solve and streamline the administration of the data stored in computer memory", "It's like an electronic bulletin board that allows Lower or Raise information to a central computer, which other users can access the same system. Through software, the computer serves as a source of information and messaging", "The English acronym Binary Digit (bit) and represents the smallest unit of information possible, since it amounts to an electric shock with a value that can be one (equivalent to on) or well, zero (off) ", "bps (bits per second) transfer speed modems. Rate at which they can data transmitted over a network. The number of bits per second may differ from the baud rate since is possible to encode more than one bit in one baud", "(Because It's Time NETwork, it is time network) academic network of computers that only for email and FTP, based on a different protocol to the internet. Currently Internet interconnected through gateways or gateways", "A program that is used to navigate the Web, is something like a pager that allows turning pages. Displays WWW documents", "Memory space is used as system controller and interim storage devices in a computer system. Thus, for example, printers typically have a buffer where information is temporarily stored to print, freeing computer memory such data, and allowing the user to continue working while printing the data. there also buffers between devices inside your computer", "A unit of information corresponding to 8 bits, a character that can be a number a symbol or letter",

TECHNICAL MANUAL

12

"Cable used by computer networks as well as cable television. Name is due to their structure: a metallic shield surrounding a central wire. The shield protects the signal inner wire electrical interference", "Acronym which means Compact Disc-Read Only Memory or Compact Disk-Only Memory Reading (not be recorded). Contain digital information, data that can be represented by bits: combinations of ones and zeros. Thus, at the microscopic level can be found in CD grooves small notches and flat areas, indicating those ones and zeros, which are read by a laser beam, which moves through the surface of the disc while it is turning", "Common Gateway Interface. Data Exchange Interface WWW standard by which to organize the reception of data sent between viewers and WWW server resident programs", "Conversation in real time over the Internet. Although preferably applied to conversations through written messages, also exit Chat including exchange of sounds (voice) and image (video) ", "The rise of computer communications - epitomized by the World macrored Internet, has created a new virtual space populated by millions of data, which can navigate infinitely for information. It is in a contraction of cyber and space cyberspace", "Electronic circuit comprising all passive and active elements necessary to perform a function", "Printed code used for recognition by an optical reader. Organized system of signs in bars, which allows access to specific information on products carrying it", "A program that generates machine language translator from a programming language based high-level human language", "Electronic device capable of receiving a set of instructions and execute performing calculations on numerical data or by compiling and correlating other information", "A computer working with visual or acoustic signals which are converted a voltage variable that can be played through loudspeakers directly or stored in a tape or disk. Such signals are much more vulnerable to noise and interference signals Digital", "A computer that uses, contains and manipulates information converted to the code binary language of numbers (zeros and ones) or machine language used by computers to store and manipulate data", "Programming structure that contains data. It may contain numbers or characters alphanumeric and programmer assigned a unique name. Invariably keeps data, no or changes in the performance or in the execution of a program", "In programming: programming structure that contains alphanumeric data and the programmer assigned a unique name, is generally used to store the number of times perform an action or cycle within the execution of a program. On the Internet: A device that has the number of visits or impacts that a website has received. It usually appears on the home page of the site", "When visiting a Web page, you may receive a cookie. This is the name given to a small text file that is stored on the computer hard drive. This file serves to identify the user when connecting back to this website", "This agency of the U.S. government created the ARPANET, predecessor to the Internet", "The smallest unit of information, no sense in itself, but acquires meaning in conjunction with other precedents for the application that created them", "A generalized diagram components, interconnections and functions, usually consist of simple geometric figures almost always rectangles, labeled for represent the different components of hardware and software, as well as their interconnections",

TECHNICAL MANUAL

13

"Graphic representation, using conventional symbols, the process that follows the information in a given program. Commonly used in phase application development by programmers", "Whose meaning is Dual in-line memory module. 64 Bit RAM designed for Pentium II, and it's pretty easy to assume, has a higher transfer rate data", "Set of files grouped under one name, making it easy to use and administration", "data storage device using magnetic technology consisting a disk on which information is recorded for later retrieval by one or more heads readers-writers. The floppy and hard disks are magnetic disks", "Simple storage unit, consisting of a disc of Mylar coated ferrous oxide particles, which can be magnetized and thus represent binary information. The diskettes can be double or Low Density (indicates that the disk can record up to 720 Kb in both types of disks. For Macintosh, are 800 Kb) or High Density (record up to 1.2 Mb in the case of 5.25 inches or 1.44 Mb, in 3.5 inch) ", "domain, field. The word domain begins to be popular among netizens, as refers to a hierarchical name part is known each entity connected to the Internet. Syntactically, a domain (domain) Internet consists of a sequence of labels or names separated by periods", "The operation of lowering or downloaded from a website (remote computer) certain information to our PC", "You can send and receive messages from anywhere in the world. That takes a box or e-mail address where you can receive letters. It is also possible to attach documents, spreadsheets, sound and images", "Peripheral input (printed text and images). Their function is to capture this data and transmit to the computer for further manipulation. The scanners can work with printed text photographs and drawings. The corresponding word in Spanish is scanner or digitizer", "Is the LAN access method most used (followed by Token Ring). Ethernet is a shared media LAN. All messages are disseminated to all nodes in the network segment. Ethernet connects up to 1,024 nodes at 10 Mbits per second over twisted pair, coax cable and an optical fiber", "Motor or document search system over the Internet", "Documents containing answers to common questions often raised by Internet users. For example, focus groups (newsgroups) usually have a FAQ from their posts. This acronym is commonly used on the Internet and allows users to novices find answers to your questions", "Protocol electronic mail (email) that originated from Fido BBS created by Tom Jennings in 1984. Are in use over 10,000 FidoNet nodes. Users must have their networks active for a universal time in the early morning, and the software must adhere to the specification FTSC-001. The FidoNet address format is area: network / local node, eg Boardwatch address Magazine is 1:104 / 555", "Program that asks a remote computer who is connected there at the time and what is doing", "Forward a received email message may be the same person who and sent him to another address", "Frame, frame. In computer graphics, screen content or space data equivalent storage. In communications, fixed block of data transmitted as a single entity. Also called packet (packet) ", "Software that gets off the Internet and can be copied for free on the PC", "Internet tool that can connect to a server in a company or institution to lose a document considered relevant", "Unit of information that corresponds to 1,024 megabytes", "Greenwich Time Reference", "A program that allows you to create and manipulate images of artwork on the computer", "All those physical components of a computer, all the visible and tangible. By extent, also applies to other electronic components

TECHNICAL MANUAL

14

that are not necessarily part of a computer Home pages: In regards to web homepages that link to other related pages", "Hypertext Markup Language they are written documents used Internet", "Protocol for communication between clients and Web servers", "A device that receives multiple communication lines of the network and connects these other and to another part of the network", "Is a play on words, which takes its origin in the English pronunciation of these three letters. Its literal pronunciation is approximately ai if qiu which sounds almost like I seek you in Spanish I seek you, and that is precisely what the program searches the Internet to people who have recorded and can contact them", "Computer Peripherals copy designed to support hard (paper, acetate, etc..) text and images in color or black and white", "Printer that works through a series of nozzles that project tiny ink droplets so that the accumulation of droplets allows the formation of characters, images, etc.. This class has been imposed printers offer high quality printing at an affordable price", "These are printers that work with a head formed by several needles or pin which fall on a moving belt, similarly to the operation of the typewriters", "Window e-mail client that lists the messages received", "In computing in general is an index into a directory of locations disk storage of records, files, programs, etc.. In organizing devices random access storage index contains the key name (record identifier), the file or program name and a pointer, either to a physical location on the disk or another index. Its function is similar to a book index. On the internet is usually an index or home page where all the items contained in the site in order to access them", "Key element in computers that handle binary data", "Science and rational automatic processing of information considered support knowledge and communication through computers", "Science investigating the possibility that a computer simulate the process of human reasoning. It also seeks the computer to be able to modify its programming based their experience and learn", "A project is underway to improve internet it is the possibility of surf the web at a speed of 622 megabits per second, more than 1000 times the current speed available", "Network like Internet services, but limited to a single network computers computer. It may be an isolated network that is not connected to the Internet", "Language developed by Sun Microsystems for making exportable to network applications and can operate on any platform through normally from WWW browsers. Allows both applications create small programs for the Internet, intranets and any other networks distributed", "A cross-platform scripting language developed by Netscape WWW Communications. JavaScript code is inserted directly into an HTML page", "A unit of measure used in computing equal to 1,024 bytes", "Local Area Network. The term LAN defines the physical and logical connection computers in a usual office. It aims to share resources (such as access to a same printer or database) and allows file sharing between computers that make up the network", "Data input device and pointer which consists of an apparatus similar to a pen with a reading head which can be written to or drawn on

TECHNICAL MANUAL

15

the computer screen (if it is sensitive to these devices) or a digitizing tablet. In some cases, you can replace the mouse, but its main function is associated with drawing or illustration programs", "Link between Web pages. These are sectors of the page (text or images) that are linked to other pages, so just click on them to move to another page, which may be located on any server in the network", "This is the most common type of Internet mailing list. Its origins are in BITNET", "ID or name of a user's e-mail address. Equivalent to name box (count) that the user is in the mail server. Identification is an input or connection", "Exit the system off", "Motor or document search system over the Internet", "Email client", "Mainframes many processors", "A unit of measure used in computing equal to 1,024 Kilobytes", "Memory is similar to RAM, but which has the particularity to hold for as long as the information and for this reason it is used as a method of accessing data faster than RAM. Usually a motherboard has 256 KB and the maximum reaches today 512 Kb", "Erasable Programmable ROM. They are the most popular, and its appearance is very characteristic, in fact comes as a standard integrated circuit, but quartz with a vacuum housing so that the chip can be reached by radiation ultra-violet. It is a programmable and reusable chip retains its contents until cleared low light UV. The EPROM has a lifetime of a few hundred write circuits", "Programmable ROM that cannot be erased unlike EPROM", "It corresponds to the abbreviation of the English term Random-Access Memory, Memory random access. Is a device that stores data temporarily. This is responsible for the operation of programs and the larger, easier and faster run programs", "Contains programs that are fundamental parts system and cannot be erased by either the user or by the machine itself. Is a memory of the shortcut called, whose elements are accessible as a whole. This is a kind of inert memory that you cannot write anything and containing the commissioning program march, written in machine language, basic software, language and so on", "A device that connects the computer to the telephone line. Transforming the signals acting digital computer (bits) in tones that are transmitted over the telephone line. Also receive tones coming through the phone line and converts them into digital signals. Its name comes from the abbreviation of the words modulator", "Mouse in English. Small input device with one or more built-in buttons, which used with graphical user interfaces", "Program that controls the operation of computer. It is the operating system used in most personal computers (PCs) systems. The name comes Disk Operating System that mostly, DOS allows management and hard disk management and diskettes", "Ability to run (execute) more than one program simultaneously", "The ability to facilitate the execution of different tasks simultaneously", "Nickname with which people call themselves that connect to IRC or any type of chat", "In programming operator is called for all symbols, that is, that are not numbers or letters",

TECHNICAL MANUAL

16

"In programming are all symbols used in +, -, *, /, =, etc. ", "Symbols used to compare values of variables in programming, comparing two variables is to say if one is larger than the other, if less or are kind etc. ", "Symbols used to concatenate (join) sentences, these in language Castilian are example: and, or, if ... then ... yes only if, etc. ", "Window e-mail client that lists the messages sent", "Rubber pad shaped fabric cover square provides a flat surface to drag the mouse (mouse) ", "These are the points on a screen, composing images. When the image is in black and black, each pixel corresponds to one bit, when it is in colors may have more depending on the resolution that displays on the screen. This word is the same in English and Spanish, for a derivation of the term Picture Element (Element Chart) ", "An application that displays on your screen a series columns (distinguished by a letter) and rows (receiving a number), intertwined. The intersection of each one of these is called a cell and is distinguished by the column letter and row number. With data for each cell, you can perform arithmetic operations of varying complexity", "Protocol Office. Protocol designed to allow Single user systems read email stored on a server", "Among the different possibilities offered by the application software, these programs work with texts (often including graphics) and allow create, modify, print, etc", "In computing a number of definitions that refer to various elements: it can be simply an operation or set of operations combined with data or a sequence of only defined and delimited events, which obeys conditions operational intent default. Also called a function process is running", "Drafting of an algorithm in a programming language. Instruction Set correctly ordered to allow a specific task or job", "A person who designs the logic and writes the lines of code of a program computer", "System representation of images and objects by computers, which to create a near-real illusion. Thus, one can say that Virtual Reality appears as a substitute for reality, in order to support activities that take advantage of the simulation", "Is a set of computers (two or more) that are linked together through elements communications that can be permanent (such as cables) or temporary, such as telephone links or others. Depending on their size, the networks are classified into LAN, MAN and WAN. The LAN is Local Area Network, ie Local Area Networks covering a few computers and printers within a confined space. The MAN (Metropolitan Area Network) or Metropolitan Area Networks, allows joining machines within a limited radius of kilometers (in Santiago, for example). And WAN or Wide Area Network which refers to global networks like the Internet", "These are systems that have the ability to learn from examples. If a systembased on these networks is used to observe a conveyor belt carrying apples, and becomes more detailed what are good and bad (incidentally explaining the system, reasons to qualify in each), will that system may identify them know after without further explanations and that even with the go time perfecting his knowledge", "Its a small storage unit for containing certain data. Can be in the very central memory drives or shortcuts", "Reply to an email message received", "A machine that performs more or less complex, depending on specific software. This type of devices have already achieved great mathematics, for example:

TECHNICAL MANUAL

17

development and today apply artificial intelligence techniques in their construction, the most striking result of this evolution is that robots do not only run heavy and repetitive work, but are able to learn from their mistakes", "Discipline that addresses concerns regarding the design and construction of robots", "Search the internet through a search engine or system of web pages by specific words", "Software that is provided without charge to the user to evaluate in a given period. If you like and want to use it permanently, you must pay its market value", "Are the modules that are grouped RAM to a computer, each one can contain a different amount and hence there Simms 1 Mb, 4 Mb, 8 Mb and more. The acronym SIMM means single in-line memory module", "Reenactment of processes occurring in reality by building models resulting from the development of specific applications. Simulation programs are very widespread and have diverse capabilities, from simple computer games to powerful applications allow industrial experimentation without large and costly structures, a typical case of this last serious wind tunnel in aeronautics", "In computing, the term used without another word that designates a set adjective specific hardware and software", "Set of key programs without which it would be possible to computer running the application programs you want to use. Without the operating system, the computer is simply a physical element inert. Every operating system has a supervisor, a library of programming an application loader and a file manager", "Protocol Simple Mail Transfer. Protocol is used to transmit emails between servers", "Unlike hardware, is what is not seen, ie programs and applications are stored on a hard drive, CD-ROM or floppy disks", "Spam is an English word that refers to a canned meat, the Spiced Ham literally spiced ham. By not requiring refrigeration, was widely used throughout the world, all for the U.S. Army, which helped a lot in their dissemination. Because of this (and a low quality) has used this term to refer to all spam being received in both groups news and in private mailboxes", "Person spam creates messages and then sends them to groups news and emails", "Title or subject of an email, used to know what it is a message before opening", "Is a standard communications widespread and frequent use for software Unix-based network protocols Token Ring and Ethernet, among others. It supports many brands products: IBM, DEC, Sun, AT & T, Data General, etc... TCP / IP is consistent with levels 3 and 4 of the OSI. This set of protocol was originally developed for the Department of Defense United States", "Presence through communication, you can see and hear something or someone but not physically on site, example: a video conference", "Designation for the process data from remote terminals to the central unit. This is typical of the transactions made in large volume, financial institutions", "A device, located at the periphery of the central unit and distance, which allows the output requested data to the global system. There are also active terminals, using a keyboard or other device; you can enter data into the system. In addition, certain types of terminals can run some general operations or specialized. And finally, it is increasingly common to use PCs as terminals, so that consideration of these increase in range because, in addition to the functionalities own connection to the host, they can act independently", "Input and output device, as the name implies has no intelligence. It depends entirely on the host computer for processing. The dumb terminals transmit and receiving data over a communications channel",

TECHNICAL MANUAL

18

"A family of operating systems for both personal computers (PC) to mainframes (Mainframes many processors). Supports large number of users (multi-user) and enables the execution of different tasks simultaneously (multitasking). Its ease of adaptation to portability across platforms and applications offered make it spreads quickly. Unix was developed in the late sixties at Bell Laboratories, and has the early eighties was used mainly restricted to academia. The firm AT & T was the first to market it 1983", "Universal Resource Locator. Unified System identification of network resources. Addresses consist of protocol, FQDN and local address within the server document. Identifies objects WWW, Gopher, FTP, news, etc... It is a chain that supplies the Internet address of a Web site or a World Wide Web resource, along with the protocol for which you have access to that site or that resource. The most common type of URL is http://, which provides the Internet address of a Web page", "Microsoft BASIC version used to develop Windows applications that have become popular. It is similar to Microsoft QuickBASIC, but not 100% compatible with it. The develop user interfaces carrying objects toolbox to the Visual Basic application format", "is one of the most attractive Internet services. This application, which Netscape software is used, to transmit and display images, audio, graphics and texts through network", "Short for Internet or WWW. Literally network. Is the media Internet. That is, the resources created in HTML and its derivatives", "Web Documents with information (text, images, video, audio, etc...), Which is presented in the same screen. A Web page is in a web server and is brought to the computer the user to view", "Set of web pages that make up a unit together", "operating system launched by Microsoft in 1998, as the successor to Windows 95. Is the most visible differences with the former is the integration of the operating system with Internet Explorer", "Zip is a compressed file format, the most widely used within the files that can be Internet down, because some files are very large so tablets should be lowered so that the faster download"}; Random azar = new Random(); int x = azar.Next(0, lista.Length); seleccionada = lista[x]; seleccionada1 = lista2[x];

tamao = seleccionada.Length; c = new char[tamao + tamao - 1]; for (int i = 0; i < tamao; i++) { s = s + (char.ToUpper(seleccionada[i])); } for (int i = 0; i < tamao + tamao - 3; i++) { c[i] = '_'; c[i + 1] = ' '; i++; } ////////########### ESPACIOS ############ for (int k = 0; k < seleccionada.Length; k++) { if (seleccionada[k] == ' ') { c[k + k] = ' ';

TECHNICAL MANUAL

19

} } ////////########################################### c[0] = s[0]; c[c.Length - 1] = s[s.Length - 1]; for (int i = 0; i < (tamao + tamao - 1); i++) { ss = ss + c[i]; } label1.Text = ss; label5.Text = seleccionada1; } private void textBox1_KeyDown_1(object sender, KeyEventArgs e) { letraEncontrada = false; if (e.KeyCode == Keys.Enter) { if (textBox1.Text != "" && textBox1.Text != " ") { letra = char.Parse(textBox1.Text); letra = (Char.ToUpper(letra)); //MessageBox.Show(letra.ToString()); //MessageBox.Show(s); //Ensear palabra oculta textBox1.Text = ""; for (int i = 0; i < s.Length; i++) { if (s[i] == letra) { letraEncontrada = true; int q = 0; for (int j = 0; j < s.Length; j++) { if (s[j] == letra) { c[q] = s[j]; } q += 2; } ss = ""; for (int k = 0; k < (tamao + tamao - 1); k++) { ss = ss + c[k]; } label1.Text = ss; } } if (letraEncontrada == false) { CONTADOR--; label4.Text = CONTADOR.ToString(); if (CONTADOR == 4) { pictureBox1.Visible = false; pictureBox2.Visible = true; } if (CONTADOR == 3) { pictureBox2.Visible = false; pictureBox3.Visible = true; } if (CONTADOR == 2) { pictureBox3.Visible = false; pictureBox4.Visible = true; }

TECHNICAL MANUAL

20

if (CONTADOR == 1) { pictureBox4.Visible = false; pictureBox5.Visible = true; } if (CONTADOR == 0) { pictureBox5.Visible = false; pictureBox6.Visible = true; } letraEncontrada = false; } if (CONTADOR == 0) { MessageBox.Show("Sorry!\n\n You lose"); label1.Visible = false; textBox1.Visible = false; button1.Visible = true; label4.Visible = false; label3.Visible = false; label2.Visible = false; pictureBox6.Visible = false; pictureBox5.Visible = false; pictureBox4.Visible = false; pictureBox3.Visible = false; pictureBox2.Visible = false; pictureBox1.Visible = false; } } else { MessageBox.Show("NOTHING HAS NOT ENTERED IN THE FIELD"); }

//######3 chekar si la frase se ha completado ######3 for (int i = 0; i < c.Length; i++) { if (c[i] == '_') { break; } if (i == c.Length - 1) { MessageBox.Show("You win\nCONGRATULATIONS!!!"); label1.Visible = false; label2.Visible = false; textBox1.Visible = false; button1.Visible = true; label4.Visible = false; label3.Visible = false; pictureBox6.Visible = false; pictureBox5.Visible = false; pictureBox4.Visible = false; pictureBox3.Visible = false; pictureBox2.Visible = false; pictureBox1.Visible = false; } } //####3########3######3######3######3######3######3######3 } }

TECHNICAL MANUAL

21

private void button1_Click_1(object sender, EventArgs e) { Form2_animales_Load(sender, e); } private void button2_Click_1(object sender, EventArgs e) { Form1 principal = new Form1(); principal.Visible = true; Close(); } private void salirToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); } private void cambiarPalabraToolStripMenuItem_Click(object sender, EventArgs e) { Form2_animales_Load(sender, e); label5.Visible = false; }

private void button2_Click(object sender, EventArgs e) { label5.Visible = true; }

TECHNICAL MANUAL

22

You might also like