Lucrare pentru colocviul de practica informatica an II calculatoare COTFAS VLAD CALC 2

Similar documents
Lucrare pentru colocviu de practică

Operatii pop si push-stiva

Convertor Binar -> Zecimal Rosu Alin, Calculatoare, An2 Mod de Functionare: Am creat un program, in Windows Form Application, care converteste un

Lampiran B. Program pengendali

namespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components;

#pragma comment(lib, "irrklang.lib") #include <windows.h> namespace SuperMetroidCraft {

Exemplu pentru utilizarea metodelor grafice

using namespace System::Drawing::Drawing2D; using namespace System::Collections::Generic;

APARAT DE MASURA. Descrierea programului

and event handlers Murach's C# 2012, C6 2013, Mike Murach & Associates, Inc. Slide 1

Nano River Technologies April 2009

Using VO Windows in a.net Windows Form Application

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

Given the C++ declaration statement below, which of the following represents the value of exforsys? e) None of the above. 1K

SDI & MDI Applications

Rezolvare fişă de laborator Java Iniţiere în limbajul Java

Laborator 8 Java Crearea claselor de obiecte. Variabilele (campurile) clasei de obiecte

Laborator 3 Java. Introducere in programarea vizuala

Getting started with Java

Curs practic de Java

Yes, this is still a listbox!

PNI SmartCAM. versiune Android. - manual de utilizare-

Laborator 5 Instrucțiunile repetitive

To enter the number in decimals Label 1 To show total. Text:...

FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources

Lab 4: Adding a Windows User-Interface

GHID DE UTILIZARE A APLICAȚIEI MINISTRA PLAY PE SMART TV

BAZE DE DATE SUPORT PENTRU AFACERI

THE HONG KONG POLYTECHNIC UNIVERSITY Faculty of Engineering. Computer Programming Closed-book Written Test 3 Date: 28 March 2009 Time: 2:30 3:30 pm

AppOBP > PrOBPT > class Timp import java.text.decimalformat;

1. Create your First VB.Net Program Hello World

Instructions for writing Web Services using Microsoft.NET:

Class Test 5. Create a simple paint program that conforms to the following requirements.

Database Applications

32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio

Ingineria Sistemelor de Programare

JDBC Accesul la baze de date

1 Dept: CE.NET Programming ( ) Prof. Akash N. Siddhpura. Working with Form: properties, methods and events

Using the Quinn-Curtis.Net Software (QCChart2D and QCRTGraph) with Managed C++ (MC++)

Parallel Programming Languages 1 - OpenMP

C13. INTERFATA PARALELA PROGRAMABILA (PPI) I8255A (PIO)

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

1 de :02

Laborator 9. Programare orientată pe obiecte Laborator 9. 1) Să se realizeze o aplicaţie care să rezolve ecuaţii de gradul al doilea.

IBSDK Quick Start Tutorial for C# 2010

Documentation: RAG Regression Analysis Graph

Laborator 2 Aplicatii Java

C++/CLI Essentials. Student Guide Revision 1.0. Object Innovations Course 431

Using the TekScope IVI-COM Driver from C#.NET

Multimedia. If the user is working on a spreadsheet, he or she may start typing numbers and performing calculations.

Birotică Profesională. Cursul 12

JDBC Java Database Connectivity

Programming in C# Project 1:

ANALYSIS OF DATA TRANSMITTED BETWEEN THE SERVER AND THE CLIENT THROUGH DIFFERENT TYPES OF COMMUNICATION

Learning VB.Net. Tutorial 17 Classes

This PDF was generated in real-time using DynamicPDF; Generator for.net.

ICS3C/4C/3U/4U Unit 2 Workbook Selection: If Statement

Syllabus. 1. Program information. 2. Course information Instructors. 3. Total estimated time. 4. Prerequisites. Page 1/5

Developing an app using Web Services, DB2, and.net

Dr. House Developer Documentation

Tehnici avansate de programare

Drawing Geometrical Objects. Graphic courtesy of Eric Roberts

Fişiere in C++ Un fişier este o colecţie de date indicat printr-un nume şi o extensie. Numele este desparţit de extensie prin punct.

Exercises C-Programming

Abandoned Cart - Magento 2 USER MANUAL MAGEDELIGHT.COM

mith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut

OVERLOADING METHODS AND CONSTRUCTORS: The Ball Class

PLC APPLICATION FOR BRUSHLESS MOTOR POSITIONING

Capturing the Mouse. Dragging Example

OhioState::OpenGLPanel. OpenGL and Windows. Public methods. OpenGLPanel : Forms::Control

CT862 Section 1 Introduction

Nebraska - eforms. Tips and Tricks

Metodele ShowDialog() şi Clear(). Evenimentul MouseEnter.

Creating a nice GUI. OpenGL and Windows. Note: VS 2003 shown. Create a new Project

This PDF was generated in real-time using DynamicPDF; Generator for.net.

For this example, we will set up a small program to display a picture menu for a fast food take-away shop.

CSCI 111 Midterm 1, version A Exam Fall Solutions 09.00am 09.50am, Tuesday, October 13, 2015

The following program computes a Calculus value, the "trapezoidal approximation of

CSC 211 Intermediate Programming


User-Defined Controls

Course 2D_SL: 2D-Computer Graphics with Silverlight Chapter C1: The Intro Project

Error! Bookmark not defined.

Laborator 3 Aplicatii Java

Keeping Track, Menus. CSC 330 Object-Oriented Programming 1

We're going to show you how to draw a variety of items including: Lines, simple shapes. Images from bitmap and other image files. Text.

Menus. You ll find MenuStrip listed in the Toolbox. Drag one to your form. Where it says Type Here, type Weather. Then you ll see this:

visual studio vs#d express windows desktop

Quartz. ArcGIS Runtime SDK for Android

Graphics with GDI + WHAT S IN THIS CHAPTER?

1. Introduction to the OpenCV library

Introduction to Matlab

This is the start of the server code

Porting your Dyalog Application to Internet

OFFICE MAX. Selectie produse. disponibile pentru comandă online la data de

Introduction to Matlab

Programming with Visual Studio Higher (v. 2013)

DISTRIBUTED DIFFERENTIAL CRIPTANALYSIS OF FEAL - 8

CS 160: Interactive Programming

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.

Transcription:

Lucrare pentru colocviul de practica informatica an II calculatoare COTFAS VLAD CALC 2 Descriere: Aplicatia este creata cu ajutorul programului Microsoft Visual Studio 2005 CLR form application, si este folosita pentru afisarea unei sinusoide sin(x). Programul este format din 2 NumericUpDown, 4 butoane, si 4 textboxuri. Codul sursa: static int verificaregrid=1; // 0 grid off, 1 grid on, 2 grid static int scalare=0; // 0 scalare off, 1 scalare on #pragma endregion private: System::Void button1_click(system::object^ sender, // modificare obiecte this->label1->location = System::Drawing::Point(12, this- >Height-57); this->numericupdown1->location = System::Drawing::Point(70, this->height-60); this->label2->location = System::Drawing::Point(140, this- >Height-57); this->numericupdown2->location = System::Drawing::Point(220, this->height-60); this->button1->location = System::Drawing::Point(this->Width-95, this- >Height-65); this->button2->location = System::Drawing::Point(this- >Width-170, this->height-65); this->button3->location = System::Drawing::Point(this- >Width-245, this->height-65); this->button4->location = System::Drawing::Point(this- >Width-320, this->height-65); this->label3->location = System::Drawing::Point(this->Width-70, 5); this->label4->location = System::Drawing::Point(this->Width-40, 5);

switch (verificaregrid){ case 0: case 1: case 2: this->button2->text="grid off"; break; this->button2->text="grid on"; break; this->button2->text="grid"; break; // initializare System::Drawing::Graphics^ Desen=this->CreateGraphics(); System::Drawing::Pen^ Creion_rosu, ^Creion_blueD, ^Creion_blue, ^Creion_gri, ^Creion_gri_d; Creion_rosu=gcnew System::Drawing::Pen(System::Drawing::Color::Red); Creion_blueD=gcnew System::Drawing::Pen(System::Drawing::Color::DeepSkyBlue); Creion_blue=gcnew System::Drawing::Pen(System::Drawing::Color::SteelBlue); Creion_gri=gcnew System::Drawing::Pen(System::Drawing::Color::Gray); Creion_gri_d=gcnew System::Drawing::Pen(System::Drawing::Color::LightGray); Desen->Clear(System::Drawing::Color(this->BackColor)); int latime=this->width; int inaltime=this->height; double perioadasinus=system::convert::todouble(this- >numericupdown1->value); double inaltimesinus=system::convert::toint32(this- >numericupdown2->value); int factor_s=inaltime/ 2-50+System::Convert::ToInt32(inaltimeSinus); int yy=factor_s; int y=0, i=0; double x;

i,inaltime); i,inaltime); i,latime,i); i,latime,i); if(verificaregrid!=0){ for (int i=0; i<=latime; i+=10) if (i%50==0) Desen->DrawLine(Creion_gri, i, 0, else if(verificaregrid!=2) Desen->DrawLine(Creion_gri_d, i, 0, for (int i=0; i<=inaltime; i+=10) if (i%50==0) Desen->DrawLine(Creion_gri, 0, else if(verificaregrid!=2) Desen->DrawLine(Creion_gri_d, 0, 15+inaltime/2-50); Desen->DrawLine(Creion_blueD, 0, 15+inaltime/2-50, latime, Desen->DrawLine(Creion_blueD, 0, 0, 0, inaltime); do { //y=15+inaltimesinus+factor_s*(1-system::math::sin(x)); //x=i*perioadasinus*system::math::pi/100;// 0.0314; x=i*perioadasinus*system::math::pi/(latime-15); y=system::convert::toint32(15-inaltimesinus+factor_s*(1-system::math::sin(x))); Desen->DrawLine(Creion_rosu, i-1, yy, i, y); yy=y; i++; while (i<=latime); if(scalare==0){ this->button3->text="scalare off"; else if(this->numericupdown1->value>=6){ //scalare trunchiata this->button3->text="scalare on"; this->clientsize = System::Drawing::Size(System::Convert::ToInt32(perioadaSinus*100), 432);

delete Desen, Creion_rosu, Creion_blue, Creion_blueD, Creion_gri, Creion_gri_d; private: System::Void button2_click(system::object^ sender, if(verificaregrid==2) verificaregrid=0; else if(verificaregrid>=0) verificaregrid++; private: System::Void button3_click(system::object^ sender, if(scalare==1) scalare=0; else if(scalare>=0) scalare++; private: System::Void button4_click(system::object^ sender, System::Drawing::Graphics^ Desen; Desen = this->creategraphics(); Desen->Clear(System::Drawing::Color(this->BackColor)); private: System::Void numericupdown1_valuechanged(system::object^ sender, private: System::Void numericupdown2_valuechanged(system::object^ sender, private: System::Void Form1_Resize(System::Object^ sender, private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {

private: System::Void Form1_Click(System::Object^ sender, this->label3->text=string::concat(control::mouseposition.x); this->label4->text=string::concat(control::mouseposition.y); ; Poze:

3