Sabtu, 23 Maret 2019

Aplikasi Resizer Image



 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 Aplikasi_jaringan_net_3_0
{
    public partial class Form1 : Form
    {
        private Image gambar;
        public Form1()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false; tsize.MaxLength = 3;
            tsize.Enabled = false;
        }
        void ubahsize()
        {
            if (tsize.Text != "")
            {
                int persen = Convert.ToInt32(tsize.Text);
                int tinggi = (persen * Convert.ToInt32(ltinggi.Text)) / 100;
                int lebar = (persen * Convert.ToInt32(llebar.Text)) / 100;
                ltinggi.Text = Convert.ToString(tinggi);
                llebar.Text = Convert.ToString(lebar);
            }
        }
        void simpangambar()
        {
            int tinggi = Convert.ToInt32(ltinggi.Text);
            int lebar = Convert.ToInt32(llebar.Text);
            Bitmap ukuranbaru = new Bitmap(lebar, tinggi, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            Graphics gbr = Graphics.FromImage(ukuranbaru); gbr.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighSpeed;
            gbr.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
            gbr.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            gbr.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighSpeed;
            Rectangle rect = new Rectangle(0, 0, lebar, tinggi);
            gbr.DrawImage(gambar, rect);
            SaveFileDialog simpan = new SaveFileDialog();
            simpan.Filter = "Jpeg Format|*.Jpg";
            simpan.RestoreDirectory = true;
            if (simpan.ShowDialog() != DialogResult.Cancel)
            {
                ukuranbaru.Save(simpan.FileName);
                ukuranbaru.Dispose();
                MessageBox.Show("Gambar Berhasil Disimpan", "Info");
            }
        }
        void bukagambar()
        {
            OpenFileDialog bukagambar = new OpenFileDialog();
            if (bukagambar.ShowDialog() == DialogResult.OK)
            {
                this.gambar = Image.FromFile(bukagambar.FileName);
                picture.SizeMode = PictureBoxSizeMode.StretchImage;
                picture.ImageLocation = bukagambar.FileName;
                ltinggi.Text = gambar.Height.ToString();
                llebar.Text = gambar.Width.ToString();
                tsize.Enabled = true;
                tsize.Clear();
            }
        }

        private void bsimpan_Click(object sender, EventArgs e)
        {
            simpangambar();
        }

        private void tsize_TextChanged(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) 
            {   
                ubahsize(); 
            }
        }
        private void bbuka_Click(object sender, EventArgs e)
        {
    bukagambar();
        }
    }
}





Senin, 18 Maret 2019

Aplikasi Billing Warnet ceria








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;
using System.Diagnostics;

namespace WindowsFormsApplication4
{
    public partial class Form1 : Form
    {
        private Stopwatch wkt = null;
        public Form1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (textBox1.Text != "")
            {
                wkt = new Stopwatch();
                if (button1.Text == "LOGIN")
                {
                    if (radioButton1.Checked)
                    {
                        label5.Text = "1 jam";
                    }
                    else if (radioButton2.Checked)
                    {
                        label5.Text = "5 jam";
                    }
                    else if (radioButton3.Checked)
                    {
                        label5.Text = "2 jam";
                    }
                    else if (radioButton4.Checked)
                    {
                        label5.Text = "4 jam";
                    }
                    label4.Visible = true;
                    wkt.Start();
                    button1.Text = "Stop";
                    label5.Visible = true;
                    button1.Text = "Stop";
                }
                else if (button1.Text == "Stop")
                {
                    wkt.Start(); if (radioButton1.Checked)
                    {
                        MessageBox.Show("Jumlah tagihan anda sebesar Rp 2000", "Total Tagihan Paket Regular");
                    }
                    if (radioButton2.Checked)
                    {
                        MessageBox.Show("Jumlah Tagihan anda sebesar Rp 9000", "Total Tahihan Paket Hemat");
                    }
                    if (radioButton3.Checked)
                    {
                        MessageBox.Show("Jumlah Tagihan anda sebesar Rp 5000", "Total Tahihan Paket Game 1");
                    }
                    if (radioButton4.Checked)
                    {
                        MessageBox.Show("Jumlah Tagihan anda sebesar Rp 9000", "Total Tahihan Paket Game 2");
                    }
                    wkt.Reset();
                    label5.Visible = false;
                    button1.Text = "LOGIN";
                    textBox1.Text = null;
                    textBox2.Text = "Rp";
                }
            }
            else if (textBox1.Text == "")
            {
                MessageBox.Show("Nama Harus Diisi!!!", "Important Message");
            }

        }








Jumat, 05 Oktober 2018

Tugas Konfigurasi Vlan Routing


Konfigurasi Switch :


Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#vlan 10
Switch(config-vlan)#int fa0/1
Switch(config-if)#sw mo tr
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Switch(config-if)#exit
Switch(config)#int fa0/6
Switch(config-if)#sw mo tr
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to up
Switch(config-if)#exit
Switch(config)#vlan 30
Switch(config-vlan)#vlan 30
Switch(config-vlan)#int fa0/2
Switch(config-if)#sw mo tr
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Switch(config-if)#exit
Switch(config)#int fa0/6
Switch(config-if)#sw mo tr
Switch(config-if)#exit
Switch(config)#

Konfigurasi  router : 


Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 172.17.10.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int fa0/1
Router(config-if)#ip add 172.17.30.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#






Nama    : Nur farchatun
Nim      : 13161003
Kelas    : 13.5A.35
Matkul  : Administrasi Jaringan
Dosen   : Angga Ardiansyah






Aplikasi Resizer Image

 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq...