Professional Documents
Culture Documents
Penggunaan Library Di Project Metnum
Penggunaan Library Di Project Metnum
Penggunaan Library Di Project Metnum
using
using
using
using
using
using
using
using
using
using
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Threading.Tasks;
System.Windows.Forms;
info.lundin.math;
namespace WindowsFormsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
textBox2.Text = "0";
textBox3.Text = "0";
textBox4.Text = "0";
}
private void button15_Click(object sender, EventArgs e)
{
try
{
// penggunaan library
ExpressionParser parser = new ExpressionParser(); // memanggil class
pada library
//tambahkan class variable
DoubleValue xval = new DoubleValue();
DoubleValue yval = new DoubleValue();
textBox1.Text += "1";
}
private void button11_Click(object sender, EventArgs e)
{
textBox1.Text += "2";
}
private void button12_Click(object sender, EventArgs e)
{
textBox1.Text += "3";
}
private void button10_Click(object sender, EventArgs e)
{
textBox1.Text += ".";
}
private void button5_Click(object sender, EventArgs e)
{
textBox1.Text += "0";
}
private void button16_Click(object sender, EventArgs e)
{
textBox1.Text += "/";
}
private void button14_Click(object sender, EventArgs e)
{
textBox1.Text += "*";
}
private void button9_Click(object sender, EventArgs e)
{
textBox1.Text += "-";
}
private void button13_Click(object sender, EventArgs e)
{
textBox1.Text += "+";
}
private void button17_Click(object sender, EventArgs e)
{
int a =0;
a = textBox1.Text.Length;
textBox1.Text = textBox1.Text.Remove(a - 1, 1);
}
private void button18_Click(object sender, EventArgs e)
{
textBox1.ResetText();
textBox2.Text = "0";
textBox3.Text = "0";
textBox4.Text = "0";
textBox5.ResetText();
}
}
}