private void button1_Click(object sender, EventArgs e) { try { a = read(textBox1, textBox2, textBox3); b = read(textBox4, textBox5, textBox6); c = new MyVector(); print(); } catch(Exception ex) { listBox1.Items.Add(ex.Message); } }
private MyVector read(TextBox x, TextBox y, TextBox z) { MyVector v = new MyVector(); v.X = int.Parse(x.Text); v.Y = int.Parse(y.Text); v.Z = int.Parse(z.Text); return v; }
private void button7_Click(object sender, EventArgs e) { if (a != null && b != null) c = a + b; print(); }
public static int Comparison(MyVector a, MyVector b) { return a.R().CompareTo(b.R()); }