namespace spojneice { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

Similar documents
pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1

CALCULATOR APPLICATION

NIZOVI.

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

You can call the project anything you like I will be calling this one project slide show.

Veverica (za ocene >=3)

b) program deljiv3; uses wincrt; var i:integer; begin i:=3; while i<100 do begin write(i:5); i:=i+3; end; end.

Object oriented lab /second year / review/lecturer: yasmin maki

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

CSIS 1624 CLASS TEST 6

/*#include <iostream> // Prvi zadatak sa integralnomg ispita

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

... ; ako je a n parno. ; ako je a n neparno

Osnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

for i:=2 to n do if glasovi[i]>max then begin max:=glasovi[i]; k:=i {*promenljiva k ce cuvati indeks takmicara sa najvise glasova *} end;

Click on the empty form and apply the following options to the properties Windows.

var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin ListBox1.Items.LoadFromFile('d:\brojevi.

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:

Visual Basic/C# Programming (330)

IBSDK Quick Start Tutorial for C# 2010

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

Uputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj list.

II. Programming Technologies

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

Form Properties Window

Answer on Question# Programming, C#

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

Izrada VI laboratorijske vježbe

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

UNIT-3. Prepared by R.VINODINI 1

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

x y = z Zadaci - procedure

UNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET

Uvod u relacione baze podataka

Conventions in this tutorial

Huw Talliss Data Structures and Variables. Variables

بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية

APARAT DE MASURA. Descrierea programului

Uvod u programiranje - vežbe. Kontrola toka izvršavanja programa

C# winforms gridview

Start Visual Studio, create a new project called Helicopter Game and press OK

VB komande. Programiranje 1

Chapter 12. Tool Strips, Status Strips, and Splitters

Kada se pokrene forma da bude plave boje. Dugme Crtaj krugove da iscrtava slučajan broj N krugova istog poluprečnika r (1/4 visine forme) čiji su

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

LAMPIRAN A : LISTING PROGRAM

Z1. Dati RDF graf predstavljen u JSON-LD sintaksi potrebno je grafički predstaviti u skladu sa RDF notacijom. (5 poena)

Визуал програмчлал. Багш: Ж. Шинэбаяр /Маг/

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Programiranje III razred

NI USB-TC01 Thermocouple Measurement Device

Visual Basic/C# Programming (330)

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

Create your own Meme Maker in C#

Writing Your First Autodesk Revit Model Review Plug-In

For. 1) program ispis; {ispisuje brojeve od 1 do 5 jedan ispod drugog} uses wincrt; var s,i:integer; begin for i:=1 to 5do writeln(i); end.

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

User-Defined Controls

Quick Guide for the ServoWorks.NET API 2010/7/13

Računarske osnove Interneta (SI3ROI, IR4ROI)

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems

Campo Minato Nel Form1 sono presenti i seguenti componenti:

Uputstva za instaliranje čitača Datalogic Skorpio u operativnom sistemu Windows 7 i višim POM-NA-XX-46, V3.0

VHDLPrimeri Poglavlje5.doc

Representing Recursive Relationships Using REP++ TreeView

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

عنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان

Savoy ActiveX Control User Guide

Developing for Mobile Devices Lab (Part 1 of 2)

PREDMET. Osnove Java Programiranja. Čas JAVADOC

PS2 Random Walk Simulator

FDSc in ICT. Building a Program in C#

// autor igre Ivan Programerska sekcija package mine;

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

Appendix A Programkod

Informacioni sistemi i baze podataka

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project

private void Form1_Load(object sender, EventArgs e) {

I PISMENI ZADATAK III6 I GRUPA IME I PREZIME

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic

namespace Gen837X222A1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];

Uvod u programiranje

Variable Neighborhood Descent - VND (Metoda promenljivog spusta)

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued

Transcription:

Spojnice

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace spojneice public partial class Form1 : Form public Form1() InitializeComponent(); int n; int rbroj = r.next(1, 11);//bira se nasumični broj od 1 do 10 string igra = "igra"+rbroj;//bira se nasumično kategorija(kategorije nose naziv od igra1 do igra10) private void button1_click(object sender, EventArgs e) Random r = new Random(); int indeks; StreamReader sr = new StreamReader(igra + ".txt");//čita se datoteka string[] niz1 = new string[8]; string[] niz2 = new string[8]; label1.text = sr.readline();//prvi red u tekstualnoj datoteci je zahtev spojnice i on se ispisuje u label1 for (int i = 0; i < 8; i++) string s = sr.readline(); niz1[i] = s.substring(0, s.indexof('/'));//formira se niz1 u kojem se pamte leve strane svakog reda u tekstualnoj datoteci bool //stavljamo da ima dugmadi sa desne strane koje treba popuniti while (ind) ind = false;//nema više dugmadi za popunjavanje switch (indeks) //indeks je pozicija dugmeta koje se popunjava //ako nije popunjeno na njega se stavlja desni deo reda //ako jeste popunjeno ide na novo dugme case 1: if (button10.text == "") button10.text = s.substring(s.indexof('/') + 1); case 2: if (button11.text == "") button11.text = s.substring(s.indexof('/') + 1);

case 3: if (button12.text == "") button12.text = s.substring(s.indexof('/') + 1); case 4: if (button13.text == "") button13.text = s.substring(s.indexof('/') + 1); case 5: if (button14.text == "") button14.text = s.substring(s.indexof('/') + 1); case 6: if (button15.text == "") button15.text = s.substring(s.indexof('/') + 1); case 7: if (button16.text == "") button16.text = s.substring(s.indexof('/') + 1); case 8: if (button17.text == "") button17.text = s.substring(s.indexof('/') + 1); niza1 button2.text = niz1[0];//u dugmad sa leve strane se redom ispisuju vrednosti button3.text = niz1[1]; button4.text = niz1[2]; button5.text = niz1[3]; button6.text = niz1[4]; button7.text = niz1[5]; button8.text = niz1[6]; button9.text = niz1[7];

button2.backcolor = button3.backcolor = button4.backcolor = button5.backcolor = button6.backcolor = button7.backcolor = button8.backcolor = button9.backcolor= button10.backcolor = button11.backcolor = button12.backcolor = button13.backcolor = button14.backcolor = button15.backcolor = button16.backcolor = button17.backcolor = Color.DodgerBlue; label1.backcolor = Color.DodgerBlue;//sva dugmad se boje u plavu boju label2.text = "90"; timer1.enabled = true;//tajmer počinje sa otkucavanjem n = 90;//90 sekundi je na raspolaganju za igranje int ukupno = 0, pojam = 0; private void RacunajZaDugme(Button dugme1, Button dugme2, string igr) string s1 = dugme1.text + "/" + dugme2.text; StreamReader sr = new StreamReader(igr + ".txt");//čita se datoteka string s2 = sr.readline(); while(!sr.endofstream)//čita sve dok se ne pročitaju svi redovi s2=sr.readline(); if(s1==s2) ukupno += 4;//ako je string s1 jednak stringu s2 (tj. ako ste pogodili) dobijate 4 boda dugme1.backcolor = Color.Green;//dugmad se boje u zelenu boju dugme2.backcolor = Color.Green; if (s1!= s2) dugme1.backcolor = Color.Red;//ako se omaši dugme se boji u crvenu boju pojam++;//uvodi se promenjiva pojam koja broji koliko se puta koristila metoda if (pojam == 8)//ako je korišćena 8 puta onda je kraj igre i resetuje se rezultat KrajIgre(); pojam = 0; ukupno = 0; label 2 private void timer1_tick(object sender, EventArgs e) n--;//broj sekundi se smanjuje label2.text = n.tostring();//broj sekundi se ispisuje pri svakom otkucaju u if (n == 0)//ako je broj sekundi 0 onda je kraj igre KrajIgre(); private void KrajIgre() timer1.enabled = false;//tajmer prestaje sa otkucavanjem Resenje(igra); MessageBox.Show("Osvojili ste " + ukupno + " poena!!!", "Kraj igre");//ispisuje se broj poena button2.text = button3.text = button4.text = button5.text = button6.text = button7.text = button8.text = button9.text = button10.text = button11.text = button12.text = button13.text =

button14.text = button15.text = button16.text = button17.text = "";//briše se tekst iz dugmadi i boje se u belu boju button2.backcolor = button3.backcolor = button4.backcolor = button5.backcolor = button6.backcolor = button7.backcolor = button8.backcolor = button9.backcolor = button10.backcolor = button11.backcolor = button12.backcolor = button13.backcolor = button14.backcolor = button15.backcolor = button16.backcolor = button17.backcolor = Color.White; label1.text = ""; label1.backcolor = Color.DarkBlue; label2.text = ""; n = 90;//resetuje se vreme listbox1.items.clear();//prazni se listbox sa tačnim rešenjima private void Resenje(string ig) StreamReader sr = new StreamReader(ig + ".txt"); while (!sr.endofstream) string s = sr.readline(); listbox1.items.add(s);//ispisuju se tacna rešenja u listbox1 int i; private void button2_click(object sender, EventArgs e)//uvodi se promenjiva i koja dobija vrednost zavisno od toga koje je dugme kliknuto i = 1; private void button3_click(object sender, EventArgs e) i = 2; private void button4_click(object sender, EventArgs e) i = 3; private void button5_click(object sender, EventArgs e) i = 4; private void button6_click(object sender, EventArgs e) i = 5; private void button7_click(object sender, EventArgs e) i = 6; private void button8_click(object sender, EventArgs e) i = 7; private void button9_click(object sender, EventArgs e) i = 8; private void button10_click(object sender, EventArgs e)

//zavisno od vrednosti i vidimo koje je dugme prvo kliknuto i proveravamo preko metode da li je pogodjeno rešenje case 1: RacunajZaDugme(button2, button10, igra); case 2: RacunajZaDugme(button3, button10, igra); case 3: RacunajZaDugme(button4, button10, igra); case 4: RacunajZaDugme(button5, button10, igra); case 5: RacunajZaDugme(button6, button10, igra); case 6: RacunajZaDugme(button7, button10, igra); case 7: RacunajZaDugme(button8, button10, igra); case 8: RacunajZaDugme(button9, button10, igra); private void button11_click(object sender, EventArgs e) case 1: RacunajZaDugme(button2, button11, igra); case 2: RacunajZaDugme(button3, button11, igra); case 3: RacunajZaDugme(button4, button11, igra); case 4: RacunajZaDugme(button5, button11, igra); case 5: RacunajZaDugme(button6, button11, igra); case 6: RacunajZaDugme(button7, button11, igra); case 7: RacunajZaDugme(button8, button11, igra); case 8: RacunajZaDugme(button9, button11, igra); private void button12_click(object sender, EventArgs e) case 1: RacunajZaDugme(button2, button12, igra); case 2: RacunajZaDugme(button3, button12, igra); case 3: RacunajZaDugme(button4, button12, igra); case 4: RacunajZaDugme(button5, button12, igra); case 5: RacunajZaDugme(button6, button12, igra); case 6: RacunajZaDugme(button7, button12, igra); case 7: RacunajZaDugme(button8, button12, igra); case 8: RacunajZaDugme(button9, button12, igra); private void button13_click(object sender, EventArgs e)

case 1: RacunajZaDugme(button2, button13, igra); case 2: RacunajZaDugme(button3, button13, igra); case 3: RacunajZaDugme(button4, button13, igra); case 4: RacunajZaDugme(button5, button13, igra); case 5: RacunajZaDugme(button6, button13, igra); case 6: RacunajZaDugme(button7, button13, igra); case 7: RacunajZaDugme(button8, button13, igra); case 8: RacunajZaDugme(button9, button13, igra); private void button14_click(object sender, EventArgs e) case 1: RacunajZaDugme(button2, button14, igra); case 2: RacunajZaDugme(button3, button14, igra); case 3: RacunajZaDugme(button4, button14, igra); case 4: RacunajZaDugme(button5, button14, igra); case 5: RacunajZaDugme(button6, button14, igra); case 6: RacunajZaDugme(button7, button14, igra); case 7: RacunajZaDugme(button8, button14, igra); case 8: RacunajZaDugme(button9, button14, igra); private void button15_click(object sender, EventArgs e) case 1: RacunajZaDugme(button2, button15, igra); case 2: RacunajZaDugme(button3, button15, igra); case 3: RacunajZaDugme(button4, button15, igra); case 4: RacunajZaDugme(button5, button15, igra); case 5: RacunajZaDugme(button6, button15, igra); case 6: RacunajZaDugme(button7, button15, igra); case 7: RacunajZaDugme(button8, button15, igra); case 8: RacunajZaDugme(button9, button15, igra); private void button16_click(object sender, EventArgs e)

case 1: RacunajZaDugme(button2, button16, igra); case 2: RacunajZaDugme(button3, button16, igra); case 3: RacunajZaDugme(button4, button16, igra); case 4: RacunajZaDugme(button5, button16, igra); case 5: RacunajZaDugme(button6, button16, igra); case 6: RacunajZaDugme(button7, button16, igra); case 7: RacunajZaDugme(button8, button16, igra); case 8: RacunajZaDugme(button9, button16, igra); private void button17_click(object sender, EventArgs e) case 1: RacunajZaDugme(button2, button17, igra); case 2: RacunajZaDugme(button3, button17, igra); case 3: RacunajZaDugme(button4, button17, igra); case 4: RacunajZaDugme(button5, button17, igra); case 5: RacunajZaDugme(button6, button17, igra); case 6: RacunajZaDugme(button7, button17, igra); case 7: RacunajZaDugme(button8, button17, igra); case 8: RacunajZaDugme(button9, button17, igra);