Web viewWir wollen dass das Programm nicht auf einem Doppelklick sondern nur auf einem Klick geht
Transcript of Web viewWir wollen dass das Programm nicht auf einem Doppelklick sondern nur auf einem Klick geht
Übung- Schnittkraftberechnung
Schnittkraftberechnung
Aufgabenstellung:-Dialogmaske erstellen Gefragt sind: vc,d,n
Formeln: vc= π.d.n/1000d= π.n/1000.vcn= π.d /1000.vc
Dialogmaske Entwurf:
Schnittgeschwindigkeit berechnen
d=(Bild)
n=
Berechnen(Buttom) vc=
Ceylan Isik/document.docx 05.05.23 1
vc? d? n?d,n vc,n d,vc
Übung- Schnittkraftberechnung
Dialogmaske Ergebnis:
Ceylan Isik/document.docx 05.05.23 2
Übung- Schnittkraftberechnung
Programmcode:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace Schnittgeschwindigkeit1{ public partial class Form1 : Form { double d = 0, n = 0, vc = 0; public Form1() { InitializeComponent(); }
private void pictureBox1_Click(object sender, EventArgs e) {
}
private void textBox1_TextChanged(object sender, EventArgs e) {
}
private void button1_Click(object sender, EventArgs e) { vc = Math.PI * Convert.ToDouble(text_d.Text) * Convert.ToDouble(text_n.Text) / 1000; label_vc.Text = vc.ToString(); } }}
Ceylan Isik/document.docx 05.05.23 3
Übung- Schnittkraftberechnung
Ausgabe:
Ceylan Isik/document.docx 05.05.23 4
Übung- Schnittkraftberechnung
Aufgabenstellung:
Wir wollen dass das Programm nicht auf einem Doppelklick sondern nur auf einem Klick geht.
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace Schnittgeschwindigkeit{ public partial class Form1 : Form { double d = 0, n = 0, vc = 0;
public Form1() { InitializeComponent(); }
private void label1_Click(object sender, EventArgs e) {
}
private void label2_Click(object sender, EventArgs e) {
}
private void label6_Click(object sender, EventArgs e) {
}
private void label9_Click(object sender, EventArgs e) {
Ceylan Isik/document.docx 05.05.23 5
Übung- Schnittkraftberechnung
}
private void button1_Click(object sender, EventArgs e) { }
private void label14_Click(object sender, EventArgs e) {
}
private void label13_Click(object sender, EventArgs e) {
}
private void text_d_TextChanged(object sender, EventArgs e) { d = 1000 * Math.PI * Convert.ToDouble(text_vc.Text) / Math.PI / Convert.ToDouble(text_n.Text); text_d.Text = d.ToString();
}
private void n_aufruf(object sender, EventArgs e) { n = 1000 * Convert.ToDouble(text_vc.Text) / Math.PI / Convert.ToDouble(text_d.Text); text_n.Text = n.ToString();
}
private void text_n_TextChanged(object sender, EventArgs e) {
}
private void vc_aufruf(object sender, EventArgs e) { vc = Math.PI * Convert.ToDouble(text_n.Text) * Convert.ToDouble(text_d.Text) / 1000; text_vc.Text = vc.ToString(); }
}}
Ceylan Isik/document.docx 05.05.23 6
Übung- Schnittkraftberechnung
Dialogmaske:
Ceylan Isik/document.docx 05.05.23 7