http://www.megaupload.com/?d=ZZ3YW574
so che non è completa ma spero di migliorarla e finirla con altre funzioni entro 1-2 settimane
grazie ancora, Max
Il file al quale si sta tentando di accedere è temporaneamente non disponibile. Riprova più tardi.
max96696 ha scritto:non riesco a gestire gli stati booleani
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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
double Total1=0;
double Total2;
bool buttonPiuClick = false;
bool buttonMenoClick = false;
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 1;
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 2;
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 3;
}
private void button4_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 4;
}
private void button5_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 5;
}
private void button6_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 6;
}
private void button7_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 7;
}
private void button8_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 8;
}
private void button9_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 9;
}
private void button0_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + 0;
}
private void buttonVirgola_Click(object sender, EventArgs e)
{
MessageBox.Show("la funzione non è ancora supportata", "scusa =D");
}
private void buttonClear_Click(object sender, EventArgs e)
{
textBox1.Clear();
}
private void buttonPiu_Click(object sender, EventArgs e)
{
bool buttonPiuClick = true;
bool buttonMenoClick = false;
Total1 = Total1 + double.Parse(textBox1.Text);
textBox1.Clear();
}
private void buttonMeno_Click(object sender, EventArgs e)
{
bool buttonPiuClick = false;
bool buttonMenoClick = true;
Total1 = Total1 + double.Parse(textBox1.Text);
textBox1.Clear();
}
private void buttonUguale_Click(object sender, EventArgs e)
{
if (buttonPiuClick == true)
{
Total2 = Total1 + double.Parse(textBox1.Text);
textBox1.Text = Total2.ToString();
}
if (buttonMenoClick == true)
{
Total2 = Total1 - double.Parse(textBox1.Text);
textBox1.Text = Total2.ToString();
}
}
}
}
Visitano il forum: Nessuno e 2 ospiti
megalab.it: testata telematica quotidiana registrata al Tribunale di Cosenza n. 22/09 del 13.08.2009, editore Master New Media S.r.l.; © Copyright 2008 Master New Media S.r.l. a socio unico - P.I. 02947530784. GRUPPO EDIZIONI MASTER Spa Tutti i diritti sono riservati. Per la pubblicità: Master Advertising