Treceți la conținutul principal

LEGEA LUI OHM DC VC NET CODE COMPLET

/*
 * Created by SharpDevelop.
 * User: alex
 * Date: 7/6/2017
 * Time: 2:13 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace ohmdc
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();

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

int selectedMod = 0;

void Button1Click(object sender, EventArgs e)
{
selectedMod = 1;
//U = I * R
this.label5.Text = "Mod Selected : 1. U";
}

void TextBox1TextChanged(object sender, EventArgs e)
{

}

void TextBox3TextChanged(object sender, EventArgs e)
{

}

void Button2Click(object sender, EventArgs e)
{
if(selectedMod==1){
this.textBox3.Text =  DoubleToString(StringToDouble(this.textBox1.Text) *  StringToDouble(this.textBox2.Text));
}
}
double StringToDouble(string s){return Convert.ToDouble(s);}
string DoubleToString(double d){return Convert.ToString(d);}

void Button3Click(object sender, EventArgs e)
{
selectedMod = 2;
//I = U /R
this.label5.Text = "Mod Selected : 2. I";
}

void Button4Click(object sender, EventArgs e)
{
selectedMod = 3;
//R = U / I
this.label5.Text = "Mod Selected : 3. R";
}

void Button5Click(object sender, EventArgs e)
{
if(selectedMod==2){
this.textBox4.Text =  DoubleToString(StringToDouble(this.textBox6.Text) /  StringToDouble(this.textBox5.Text));
}
}

void Button6Click(object sender, EventArgs e)
{
if(selectedMod==3){
this.textBox7.Text =  DoubleToString(StringToDouble(this.textBox9.Text) /  StringToDouble(this.textBox8.Text));
}
}

void Button8Click(object sender, EventArgs e)
{
if(selectedMod==4){
this.textBox13.Text =  DoubleToString(StringToDouble(this.textBox15.Text) *  StringToDouble(this.textBox14.Text));
}
}

void Button9Click(object sender, EventArgs e)
{
selectedMod = 5;
//W = I * t
this.label5.Text = "Mod Selected : 5. W";
}

void Button10Click(object sender, EventArgs e)
{
selectedMod = 4;
//P = U * I
this.label5.Text = "Mod Selected : 4. P";
}

void Button7Click(object sender, EventArgs e)
{
if(selectedMod==5){
this.textBox10.Text =  DoubleToString(StringToDouble(this.textBox11.Text) *  StringToDouble(this.textBox12.Text));
}
}
}
}

Comentarii

Postări populare de pe acest blog

program principal cpp

#include "clasa.h" #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define DELAY 9000000 void delay() { for(long i=0;i<DELAY;i++); } //constructor cu initializare de la tastatura BigInt::BigInt() {char x; signed char t[400]; int i; printf("\nNumarul cu semn "); do s=getche(); while((s!='+')&&(s!='-')); n=0; do {x=getche(); t[n]=x-'0'; n++; } while((x>='0')&&(x<='9')); n--; for(i=0;i<n;i++) nr[i]=t[n-i-1]; } //constructor cu initializare prin parametri BigInt::BigInt(char semn,signed char numar[],int dim) {int i; s=semn; n=dim; for(i=0;i<n;i++) nr[i]=numar[n-i-1]; } //transform un int negativ in pozitiv int BigInt::Pozitiv(int x) {int a,vb; a=0; vb=0; while(vb==0) if((x+a)==0) vb=1; else a=a+1; x=a; return x; } //constructor dintr-un nr int obisnuit BigInt::BigInt(int x) {int i; if(x>=0) s='+'…

NUMERE PRIME ALGORITM C++

// NUMERE PRIME ALGORITM C++//  reediting from scratch //on this page is just the study for a next algoritm for generating the parime nr series like Fibonnaci or ....if possibile

74111121313417374414124343447 if u know the red part you can generate the orange part
1 0 1 111112222 1 1 23

o aplicatie php localitati romania

//APLICATIA SE REFERA LA BAZA DE DATE SIRUTA

//dragtable.js


/* dragtable v1.0 June 26, 2008 Dan Vanderkam, http://danvk.org/dragtable/ http://code.google.com/p/dragtable/ \Bsortabledraggable\B Instructions: - Download this file - Add <script src="dragtable.js"></script> to your HTML. - Add class="draggable" to any table you might like to reorder. - Drag the headers around to reorder them. This is code was based on: - Stuart Langridge's SortTable (kryogenix.org/code/browser/sorttable) - Mike Hall's draggable class (http://www.brainjar.com/dhtml/drag/) - A discussion of permuting table columns on comp.lang.javascript Licensed under the MIT license. */ // Here's the notice from Mike Hall's draggable script: //***************************************************************************** // Do not remove this notice. // // Copyright 2001 by Mike Hall. // See http…