Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Thursday, 10 September 2015

Android dan IOS di Visual studio dengan Xamarin Full Patch

Android di Visual studio dengan Xamarin

Visual studio tidak hanya mampu membangun aplikasi Windows Phone tetapi saat ini sudah dapat membangun sebuah aplikasi berbasis Android dan IOS menggunakan xamarin.


Xamarin adalah sebuah aplikasi pemograman yang menggunakan bahasa C# dan di topang beberapa keunggulan lainya , diantaranya :

  • Membuat aplikasi Native dengan hanya bahasa C#. semua yang bisa dilakukan dengan Java dan Objective C bisa dilakukan C# di Xamarin.
  • Dengan Xamarin studio anda bisa dengan mudah dalam membangun aplikasi Mobile.
  • Xamarin adalah satu-satunya platform yang bisa memperbolehkan kita membangun atau membuat aplikasi Native iOS dan Android dari Visual Studio.
  • Xamarin selalu Update API-API terbaru dari Google (Android) dan Apple(iOS).
  • Menyediakan banyak dokumentasi, tutorial, guide dan support yang membantu user dalam mengembangkan aplikasinya dengan Xamarin.


 System Requirement :
  • Hanya support pada patch : [Xamarin.Android 4.8.00013] &  [Xamarin.iOS 1.3.250.0]
  • Visual Studio 2010 pro or better




INSTRUCTIONS



1. Copy "mandroid.exe" to "C:\Program Files (x86)\MSBuild\Xamarin\Android"
(or "C:\Program Files\MSBuild\Xamarin\Android" if you are on a 32-bit operating system)

2. Copy "mtouch.exe" to "C:\Program Files (x86)\MSBuild\Xamarin\iOS"
(or "C:\Program Files\MSBuild\Xamarin\iOS" if you are on a 32-bit operating system)

Tahapan - tahap Instalasi Xamarin : 
1. Java JDK :

Download
100MB
Java JDK

2. Android SDK :

Download
136MB
Android SDK

3. Android NDK :

Download
450MB
Android NDK

4. GTK# :

Download
24MB
GTK#

5. Xamarin Studio :

Download
30MB
Xamarin Studio

6. Xamarin.Android :

Download
Click to Start
Xamarin.Android

7. Xamarin.IOS :

Download
Click to Start
Xamarin.IOS

Download Patch :


Download
26MB
PATCH

Wednesday, 26 August 2015

Membuat Kalkulator Sederhana pada C#

Hasil Aplikasi :



Code program :





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 Kalkulator
{
    public partial class Form1 : Form
    {
        string operation = "";
        Double value = 0;
        bool operation_pressed = false;

        public Form1()
        {
            InitializeComponent();

            this.Closing += new System.ComponentModel.CancelEventHandler(this.formCancel_Closing);
        }

        private void formCancel_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            string pesan = "Apakah Anda yakin ingin keluar?";
            string auth = "Konfirmasi";
            DialogResult konfirm = MessageBox.Show(pesan, auth, MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (konfirm == DialogResult.Yes)
            {
                Application.Exit();
            }
            else
            { e.Cancel = true; }
        }

        private void aboutMeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string pesan = "Nama : Iyunal Iqbal Kahfi XI-TKJ A / 13";
            string auth = "Author";
            MessageBox.Show(pesan, auth);
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string pesan = "Apakah Anda yakin ingin keluar?";
            string auth = "Konfirmasi";
            DialogResult konfirm = MessageBox.Show(pesan, auth, MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (konfirm == DialogResult.Yes)
            {
                Application.Exit();
            }
            else
            { };
        }

        //function ON
        public void form_on()
        {
            MessageBox.Show("Nyalakan Terlebih Dahulu", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Stop);
        }
        private void On_Click(object sender, EventArgs e)
        {
            on.Text = "ON";
            textBox1.Text = "0";
            label99.Text = "0";
        }
        //END

        //function OFF
        private void button20_Click(object sender, EventArgs e)
        {
            on.Text = "OFF";
            textBox1.Clear();
            value = 0;
            textBox1.Text = "";
            label99.Text = "";
        }
        //END

        private void Clear_click(object sender, EventArgs e)
        {
            if (on.Text == "ON")
            {
                textBox1.Clear();
                value = 0;
                operator_label.Text = ".";
                textBox1.Text = "0";
                label99.Text = "0";
            }
            else
            {
                form_on();
            }
        }

        private void Button_Click(object sender, EventArgs e)
        {
            Button b = (Button)sender;
            if (on.Text == "ON")
            {
                if ((textBox1.Text == "0") || (operation_pressed))
                    textBox1.Clear();
                operation_pressed = false;
                textBox1.Text = textBox1.Text + b.Text;
            }
            else
            {
                form_on();
            }
        }

        private void Operator_Click(object sender, EventArgs e)
        {
            Button b = (Button)sender;
            if (on.Text == "ON")
            {
                if (value != 0)
                {
                    button14.PerformClick();
                    value = Double.Parse(textBox1.Text);
                    operation_pressed = true;
                    operation = b.Text;
                    label99.Text = value + "";
                    operator_label.Text = operation;
                }
                else
                {
                    value = Double.Parse(textBox1.Text);
                    operation_pressed = true;
                    operation = b.Text;
                    label99.Text = value + "";
                    operator_label.Text = operation;
                }
            }
            else
            {
                form_on();
            }
        }

        //function
        public double jumlah(double a, double b)
        {
            double hasil = a + b;
            return hasil;
        }
        public double kurang(double a, double b)
        {
            double hasil = a - b;
            return hasil;
        }
        public double kali(double a, double b)
        {
            double hasil = a * b;
            return hasil;
        }
        public double bagi(double a, double b)
        {
            double hasil = a / b;
            return hasil;
        }
        //end function

        private void button14_Click(object sender, EventArgs e)
        {
            //textBox1.Text = hasil(value, Double.Parse(textBox1.Text));
            if (on.Text == "ON")
            {

                double c, d;
                c = value;
                d = Double.Parse(textBox1.Text);

                switch (operation)
                {
                    case "+":
                        textBox1.Text = jumlah(c, d).ToString();
                        break;
                    case "-":
                        textBox1.Text = kurang(c, d).ToString();
                        break;
                    case "*":
                        textBox1.Text = kali(c, d).ToString();
                        break;
                    case "/":
                        textBox1.Text = bagi(c, d).ToString();
                        break;
                }
                //value = Int32.Parse(textBox1.Text);
                operation_pressed = false;
                operation = "";
            }
            else
            {
                form_on();
            }
        }

        private void button10_Click(object sender, EventArgs e)
        {
            if (on.Text == "ON")
            {
                if (textBox1.Text.Length > 0)
                {
                    int panjang = textBox1.Text.Length;
                    textBox1.Text = textBox1.Text.Remove(panjang - 1, 1);
                    if (textBox1.Text == "")
                    {
                        textBox1.Text = "0";
                    }
                }
            }
            else
            {
                form_on();
            }
        }
    }
}

Thursday, 20 August 2015

[Operator Logic] Contoh Code Aplikasi Sederhana dalam Implementasi Operasi Logika Pada C#

Hasil Aplikasi


Contoh Code Program / Aplikasi Warung



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 OperatorLogikaRadioCheckBox
{
    public partial class Form1 : Form
    {
        string makan, minum;
        bool pesan_pressed = false;

        public Form1()
        {
            InitializeComponent();
        }

        public void thanks()
        {
            MessageBox.Show("Terima Kasih", "Thanks", MessageBoxButtons.OK);
        }

        private void radio_click(object sender, EventArgs e)
        {
            RadioButton b = (RadioButton)sender;
            makan = "- " + b.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (pesan_pressed == false)
            {
                pesan_pressed = true;
                thanks();
                makan_label.Text = makan;
                if (checkBox1.Checked)
                {
                    minum = minum + checkBox1.Text + "\r\t";
                }
                if (checkBox2.Checked)
                {
                    minum = minum + checkBox2.Text + "\r\t";
                }
                if (checkBox3.Checked)
                {
                    minum = minum + checkBox3.Text + "\r\t";
                }
                if (checkBox4.Checked)
                {
                    minum = minum + checkBox4.Text + "\r\t";
                }
                if (checkBox5.Checked)
                {
                    minum = minum + checkBox5.Text + "\r\t";
                }
                if (checkBox6.Checked)
                {
                    minum = minum + checkBox6.Text + "\r\t";
                }
                minum_label.Text = minum;
            }
            else
            {
                MessageBox.Show("Anda Sudah Memesan !", "Warning", MessageBoxButtons.OK);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            makan_label.Text = "";
            minum_label.Text = "";
            minum = "";
            pesan_pressed = false;
        }
    }
}




Download Aplikasinya Disini :


Download
Download Here
Click to Download
close
close