private void Form1_Load(object sender, EventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:0035"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); Console.WriteLine("1 + 2 = " + hasilTambah); double hasilKurang = obj.Kurang(3, 2); Console.WriteLine("3 - 2 = " + hasilKurang); double hasilKali = obj.Kali(2, 2); Console.WriteLine("2 x 2 = " + hasilKali); double hasilBagi = obj.Bagi(2, 2); Console.WriteLine("2 / 2 = " + hasilBagi); Console.ReadLine(); Koordinat objk = new Koordinat(); textBox1.Text = "1+2 = " + hasilTambah; textBox2.Text = "3-2 + " + hasilKurang; textBox3.Text = "2x2 + " + hasilKurang; textBox4.Text = "2/2 + " + hasilKurang; }
private void Form1_Load(object sender, EventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); Console.WriteLine("1 + 2 = " + hasilTambah); double hasilKurang = obj.Kurang(3, 2); Console.WriteLine("3 - 2 = " + hasilKurang); double hasilKali = obj.Kali(2, 2); Console.WriteLine("2 x 2 = " + hasilKali); double hasilBagi = obj.Bagi(2, 2); Console.WriteLine("2 / 2 = " + hasilBagi); Console.ReadLine(); Koordinat objk = new Koordinat(); label1.Text = "1 + 2 = " + hasilTambah.ToString(); label2.Text = "3 - 2 = " + hasilKurang.ToString(); label3.Text = "2 * 2 = " + hasilKali.ToString(); label4.Text = "2 / 2 = " + hasilBagi.ToString(); //label5.Text = "Hasil Koordinat = " + Koordinat.ToString(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); Console.WriteLine("1 + 2 = " + hasilTambah); double hasilKurang = obj.Kurang(3, 2); Console.WriteLine("3 - 2 = " + hasilKurang); double hasilKali = obj.Kali(2, 2); Console.WriteLine("2 x 2 = " + hasilKali); double hasilBagi = obj.Bagi(2, 2); Console.WriteLine("2 / 2 = " + hasilBagi); Console.ReadLine(); Koordinat objk = new Koordinat(); }
static void Main(string[] args) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); Console.WriteLine("1 + 2 = " + hasilTambah); double hasilKurang = obj.Kurang(3, 2); Console.WriteLine("3 - 2 = " + hasilKurang); double hasilKali = obj.Kali(2, 2); Console.WriteLine("2 x 2 = " + hasilKali); double hasilBagi = obj.Bagi(2, 2); Console.WriteLine("2 / 2 = " + hasilBagi); Console.ReadLine(); Koordinat objk = new Koordinat(); }
private void Form1_Load(object sender, EventArgs e) { bool OFF = false; tTambah.Enabled = OFF; tKurang.Enabled = OFF; tKali.Enabled = OFF; tBagi.Enabled = OFF; BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); Console.WriteLine("1 + 2 = " + hasilTambah); double hasilKurang = obj.Kurang(3, 2); Console.WriteLine("3 - 2 = " + hasilKurang); double hasilKali = obj.Kali(2, 2); Console.WriteLine("2 x 2 = " + hasilKali); double hasilBagi = obj.Bagi(2, 2); Console.WriteLine("2 / 2 = " + hasilBagi); Console.ReadLine(); Koordinat objk = new Koordinat(); tTambah.Text = "1 + 2 = " + hasilTambah.ToString(); tKurang.Text = "3 + 2 = " + hasilKurang.ToString(); tKali.Text = "2 x 2 = " + hasilKali.ToString(); tBagi.Text = "2 / 2 = " + hasilBagi.ToString(); }
private void Form1_Load(object sender, EventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); double hasilKurang = obj.Kurang(3, 2); double hasilKali = obj.Kali(2, 2); double hasilBagi = obj.Bagi(2, 2); }
public Form1() { InitializeComponent(); BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); double hasilKurang = obj.Kurang(3, 2); double hasilKali = obj.Kali(2, 2); double hasilBagi = obj.Bagi(2, 2); label1.Text = "1 + 2 = " + hasilTambah.ToString(); label2.Text = "3 - 2 = " + hasilKurang.ToString(); label3.Text = "2 x 2 = " + hasilKali.ToString(); label4.Text = "2 / 2 = " + hasilBagi.ToString(); }
private void Form1_Load(object sender, EventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1907"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(1, 2); double hasilKurang = obj.Kurang(3, 2); double hasilKali = obj.Kali(2, 2); double hasilBagi = obj.Bagi(2, 2); Koordinat objk = new Koordinat(); label2.Text = "1 + 2 = " + hasilTambah + Environment.NewLine + "3 - 2 = " + hasilKurang + Environment.NewLine + "2 x 2 = " + hasilKali + Environment.NewLine + "2 / 2 = " + hasilBagi + Environment.NewLine; }
private void button1_Click(object sender, EventArgs e) { BasicHttpBinding bind = new BasicHttpBinding(); ChannelFactory <IMatematika> objChannel = new ChannelFactory <IMatematika>(bind, "http://localhost:1910"); IMatematika obj = objChannel.CreateChannel(); double hasilTambah = obj.Tambah(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)); label3.Text = "Hasil Penjumlahan : " + hasilTambah; //add label1.Text + var hasilTambah double hasilKurang = obj.Kurang(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)); label4.Text = "Hasil Pengurangan : " + hasilKurang; //add label1.Text + var hasilTambah double hasilKali = obj.Kali(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)); label5.Text = "Hasil Perkalian : " + hasilKali; //add label1.Text + var hasilTambah double hasilBagi = obj.Bagi(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)); label6.Text = "Hasil Pembagian : " + hasilBagi; //add label1.Text + var hasilTambah Console.ReadLine(); }