LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a.

Size: px
Start display at page:

Download "LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a."

Transcription

1 130 LISTING PROGRAM 1. Mainform.cs using System; using System.Drawing; using System.Windows.Forms; namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class MainForm : Form public MainForm() InitializeComponent(); void FilteringToolStripMenuItemClick(object sender, EventAr s e) Filtering a = new Filtering(); void DeteksiTepiToolStripMenuItemClick(object sender, EventArgs e) DeteksiTepi a = new DeteksiTepi(); void AboutToolStripMenuItemClick(object sender, EventArgs e) Help a = new Help(); void AboutToolStripMenuItem1Click(object sender, EventArgs e) About a = new About(); void ExitToolStripMenuItemClick(object sender, EventArgs e) if (MessageBox.Show("Are you sure to exit the Aplication?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Application.Exit();

2 Filtering.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics; using System.IO; namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class Filtering : Form Bitmap img; bool bitdev; double Dev; double probabilitas; IntPtr point = IntPtr.Zero; public Filtering() InitializeComponent(); Bitmap geometric(bitmap image) int lebar = image.width; int panjang = image.height; double merah = 0, hijau = 0, biru = 0, hasilred = 1, hasilgreen = 1, hasilblue = 1; double redfinal, greenfinal, bluefinal; Bitmap imagehasil = new Bitmap(lebar, panjang); for (int i = 0; i < panjang-2; i++) for (int j = 0; j < lebar-2; j++) for (int k = i; k <= i + 2; k++) for (int l = j; l <= j + 2; l++) merah = image.getpixel(l, k).r; if (merah == 0) merah = 255; hijau = image.getpixel(l, k).g; if (hijau == 0) hijau = 255; biru = image.getpixel(l, k).b;

3 132 if (biru == 0) biru = 255; hasilred *= merah; hasilgreen *= hijau; hasilblue *= biru; redfinal = Math.Pow(hasilred,(1.0/9.0)); double RED = Math.Round(redfinal); greenfinal = Math.Pow(hasilgreen,(1.0/9.0)); double GREEN = Math.Round(greenfinal, 0); bluefinal = Math.Pow(hasilblue,(1.0/9.0)); double BLUE = Math.Round(bluefinal, 0); imagehasil.setpixel(j + 1, i + 1, Color.FromArgb(255, (in t)red, (int)green, (int)blue)); hasilred = 1; hasilgreen = 1; hasilblue = 1; return imagehasil; void HomeToolStripMenuItemClick(object sender, EventArgs e) MainForm a = new MainForm(); void DeteksiTepiToolStripMenuItemClick(object sender, EventArgs e) DeteksiTepi a = new DeteksiTepi(); void AboutToolStripMenuItemClick(object sender, EventArgs e) Help a = new Help(); void AboutToolStripMenuItem1Click(object sender, EventArgs e) About a = new About(); void PictureBox4Click(object sender, EventArgs e) try OpenFileDialog ofile = new OpenFileDialog(); ofile.filter = "Images File(*.bmp) *.bmp";

4 133 if (ofile.showdialog() == DialogResult.OK) Bitmap cit = new Bitmap (ofile.filename); if (cit.height <= 300 && cit.width <= 300) pcitraasli.image = cit; img = new Bitmap(new Bitmap(oFile.FileName), pcitraasli.width, pcitraasli.height) ; pcitraasli.image = img; textbox6.text=cit.width.tostring(); textbox5.text=cit.height.tostring(); textbox4.text=ofile.safefilename.tostring(); MessageBox.Show("Image Pixel must be 300x300", "Warning"); catch (Exception) throw new ApplicationException("Failed Loading!"); void ClearClick(object sender, EventArgs e) pcitraasli.image=null; pcitranoise.image=null; pcitrafilter.image=null; textbox4.text=""; textbox5.text=""; textbox6.text=""; combobox1.text=null; void ExitToolStripMenuItemClick(object sender, EventArgs e) if (MessageBox.Show("Are you sure to exit the Aplication?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Application.Exit(); private double getgaussiannumbers() Random rand = new Random(); double x, y, kotak; if (bitdev) bitdev = false; return Dev * 1; do x = 2 * rand.nextdouble() - 1;

5 134 y = 2 * rand.nextdouble() - 1; kotak = x * x + y * y; while (kotak >= 1 kotak == 0); var kutub = Math.Sqrt(- 2 * Math.Log(kotak) / kotak); Dev = y * kutub; bitdev = true; return x * kutub; void SaveClick(object sender, EventArgs e) if(pcitrafilter.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pcitrafilter.image.save(save.filename, System.Drawing.Imaging.ImageFormat.Bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void GeometricMeanFIlterClick(object sender, EventArgs e) Bitmap bit = new Bitmap(pcitraNoise.Image); pcitrafilter.image=geometric(bit); void GaussianClick(object sender, EventArgs e) Bitmap citraasli = new Bitmap(pcitraAsli.Image); int x = citraasli.width; int y = citraasli.height; Bitmap citrahasil = citraasli; if ((combobox1.text) == "10%") probabilitas = 10; if ((combobox1.text) == "20%") probabilitas = 20; if ((combobox1.text) == "30%") probabilitas = 30; if ((combobox1.text) == "40%") probabilitas = 40; if ((combobox1.text) == "50%") probabilitas = 50;

6 135 double gaussiannumber = 0.0; int step, newpixel, pixelsize = x * y; BitmapData bmpdata = null; byte[] Pxl; Random rnd = new Random(); Rectangle box = new Rectangle(0, 0, x, y); int Depth = System.Drawing.Bitmap.GetPixelFormatSize(citraAsli.PixelFormat); step = Depth / 8; bmpdata = citraasli.lockbits(box, ImageLockMode.ReadWrite, citraasli.pixelformat); Pxl = new byte[pixelsize * step]; point = bmpdata.scan0; Marshal.Copy(point, Pxl, 0, Pxl.Length); for (int i = 0; i < Pxl.Length; i += step) if (i < Pxl.Length - step) for (int j = 0; j < step; j++) gaussiannumber = getgaussiannumbers(); newpixel = Convert.ToInt32(gaussianNumber * probabilitas) + Convert.ToInt32(Pxl[i + j]); if (newpixel < 0) newpixel = 0; if (newpixel > 255) newpixel = 255; Pxl[i + j] = Convert.ToByte(newPixel); Marshal.Copy(Pxl, 0, point, Pxl.Length); citraasli.unlockbits(bmpdata); pcitranoise.image=citraasli; void SaltpepperClick(object sender, EventArgs e) Bitmap citraasli = new Bitmap(pcitraAsli.Image); int x = citraasli.width; int y = citraasli.height; Bitmap citrahasil = citraasli; if ((combobox1.text) == "10%") probabilitas = Convert.ToInt32(0.1*x*y); if ((combobox1.text) == "20%") probabilitas = Convert.ToInt32(0.2*x*y); if ((combobox1.text) == "30%") probabilitas = Convert.ToInt32(0.3*x*y); if ((combobox1.text) == "40%") probabilitas = Convert.ToInt32(0.4*x*y); if ((combobox1.text) == "50%") probabilitas = Convert.ToInt32(0.5*x*y); int x1,y1,val; Random rand = new Random(); for (int i = 0; i < probabilitas; i++)

7 )); x1 = rand.next(0,x-1); y1 = rand.next(0,y-1); val = rand.next(1,10); if (val <= 5) citrahasil.setpixel(x1,y1,color.fromargb(255,0,0,0)); citrahasil.setpixel(x1,y1,color.fromargb(255,255,255, pcitranoise.image=citraasli; void Button1Click(object sender, EventArgs e) if(pcitranoise.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pcitranoise.image.save(save.filename, System.Drawing. Imaging.ImageFormat.Bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); 3. Deteksi Tepi using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Linq; using System.Diagnostics; using System.IO; using System.Drawing; using System.Drawing.Imaging; using System.Text; using System.Windows.Forms;

8 137 using System.Runtime.InteropServices; namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class DeteksiTepi : Form Bitmap img; public DeteksiTepi() InitializeComponent(); void HomeToolStripMenuItemClick(object sender, EventArgs e) MainForm ua = new MainForm(); ua.showdialog (); void FilteringToolStripMenuItemClick(object sender, EventArgs e) Filtering us = new Filtering(); us.showdialog(); void AboutToolStripMenuItemClick(object sender, EventArgs e) Help uf = new Help(); uf.showdialog(); void AboutToolStripMenuItem1Click(object sender, EventArgs e) About ug = new About(); ug.showdialog(); void PictureBox5Click(object sender, EventArgs e) try OpenFileDialog ofile = new OpenFileDialog(); ofile.filter = "Images File(*.bmp) *.bmp"; if (ofile.showdialog() == DialogResult.OK) Bitmap cit = new Bitmap (ofile.filename); if (cit.height <= 300 && cit.width <= 300) citraasli.image = cit; img = new Bitmap(new Bitmap(oFile.FileName), citraasli.width, citraasli.height); citraasli.image = img; textbox1.text=cit.width.tostring();

9 138 textbox2.text=cit.height.tostring(); textbox3.text=ofile.safefilename.tostring(); MessageBox.Show("Image Pixel must be 300x300", "Warning"); catch (Exception) throw new ApplicationException("Failed Loading!"); void PictureBox8Click(object sender, EventArgs e) try OpenFileDialog ofile = new OpenFileDialog(); ofile.filter = "Images File(*.bmp) *.bmp"; if (ofile.showdialog() == DialogResult.OK) Bitmap cit = new Bitmap (ofile.filename); if (cit.height <= 300 && cit.width <= 300) citrafiltering.image = cit; img = new Bitmap(new Bitmap(oFile.FileName), citrafiltering.width, citrafiltering.height); citrafiltering.image = img; textbox9.text=cit.width.tostring(); textbox7.text=cit.height.tostring(); textbox8.text=ofile.safefilename.tostring(); MessageBox.Show("Image Pixel must be 300x300", "Warning"); catch (Exception) throw new ApplicationException("Failed Loading!"); void ClearDeteksiClick(object sender, EventArgs e) citraasli.image=null; citrafiltering.image=null; psobel.image=null; probert.image=null; pprewitt.image=null; pfsobel.image=null; pfprewitt.image=null; pfrobert.image=null; textbox1.text=null;textbox2.text=null;textbox3.text=null; textbox7.text=null;textbox8.text=null;textbox9.text=null;

10 139 textboxs1.text=null;textboxs2.text=null;textboxs3.text=null; textboxs4.text=null;textboxs5.text=null;textboxs6.text=null; textboxp1.text=null;textboxp2.text=null;textboxp3.text=null; textboxp4.text=null;textboxp5.text=null;textboxp6.text=null; textboxr1.text=null;textboxr2.text=null;textboxr3.text=null; textboxr4.text=null;textboxr5.text=null;textboxr6.text=null; void ExitToolStripMenuItemClick(object sender, EventArgs e) if (MessageBox.Show("Are you sure to exit the Aplication?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Application.Exit(); private Bitmap SobelEdgeDetect(Bitmap original) Bitmap sobel = new Bitmap(original); int [,] arr_r; int [,] arr_g; int [,] arr_b; byte[,] temp_array; arr_r = new int[sobel.width, sobel.height]; arr_g = new int[sobel.width, sobel.height]; arr_b = new int[sobel.width, sobel.height]; temp_array=new byte[sobel.width, sobel.height]; double x; double y; double grad; for (int i = 1; i < (sobel.width - 1); i++) for (int j = 1; j < (sobel.height - 1); j++) arr_r[i, j] = original.getpixel(i, j).r; arr_g[i, j] = original.getpixel(i, j).g; arr_b[i, j] = original.getpixel(i, j).b; 3; arr_r[i, j] = (arr_r[i, j] + arr_g[i, j] + arr_b[i, j]) / for (int i = 1; i < (sobel.width-1); i++) for (int j = 1; j < (sobel.height-1); j++) x=system.math.abs(1*arr_r[i-1,j-1]+2*arr_r[i- 1,j] + 1*arr_r[i-1,j+1] - arr_r[i+1, j-1] - 2 * arr_r[i+1, j] - arr_r[i + 1, j + 1]); y=system.math.abs(1*arr_r[i-1,j-1]+2*arr_r[i,j- 1]+1*arr_r[i+1,j-1]-1*arr_r[i-1,j+1]-2*arr_r[i,j+1]-1*arr_r[i+1,j+1]);

11 140 grad = System.Math.Sqrt(x*x+y*y); if ( grad > 255) grad =255; temp_array[i, j] =(byte)(grad); sobel.setpixel(i,j,color.fromargb(temp_array[i, j],tem p_array[i, j],temp_array[i,j])); return sobel; private Bitmap PrewittEdgeDetect(Bitmap original) Bitmap prewitt = new Bitmap(original); int [,] arr_r; int [,] arr_g; int [,] arr_b; byte[,] temp_array; arr_r = new int[prewitt.width, prewitt.height]; arr_g = new int[prewitt.width, prewitt.height]; arr_b = new int[prewitt.width, prewitt.height]; temp_array=new byte[prewitt.width, prewitt.height]; double x; double y; double grad; 3; for (int i = 1; i < (prewitt.width - 1); i++) for (int j = 1; j < (prewitt.height - 1); j++) arr_r[i, j] = original.getpixel(i, j).r; arr_g[i, j] = original.getpixel(i, j).g; arr_b[i, j] = original.getpixel(i, j).b; arr_r[i, j] = (arr_r[i, j] + arr_g[i, j] + arr_b[i, j]) / for (int i = 1; i < (prewitt.width-1); i++) for (int j = 1; j < (prewitt.height-1); j++) x=system.math.abs(1*arr_r[i-1,j-1]+1*arr_r[i- 1,j] + 1*arr_r[i-1,j+1] - 1 * arr_r[i+1, j-1] - 1* arr_r[i+1, j] - 1*arr_r[i + 1, j + 1]); y=system.math.abs(1*arr_r[i-1,j-1]+1*arr_r[i,j- 1]+1*arr_r[i+1,j-1]-1*arr_r[i-1,j+1]-1*arr_r[i,j+1]-1*arr_r[i+1,j+1]); grad = System.Math.Sqrt(x*x+y*y); if ( grad > 255) grad =255; temp_array[i, j] =(byte)(grad); prewitt.setpixel(i,j,color.fromargb(temp_array[i, j],t emp_array[i, j],temp_array[i,j]));

12 141 return prewitt; private Bitmap RobertEdgeDetect(Bitmap original) Bitmap robert = new Bitmap(original); int [,] arr_r; int [,] arr_g; int [,] arr_b; byte[,] temp_array; arr_r = new int[robert.width, robert.height]; arr_g = new int[robert.width, robert.height]; arr_b = new int[robert.width, robert.height]; temp_array=new byte[robert.width, robert.height]; double x; double y; double grad; 3; for (int i = 1; i < (robert.width - 1); i++) for (int j = 1; j < (robert.height - 1); j++) arr_r[i, j] = original.getpixel(i, j).r; arr_g[i, j] = original.getpixel(i, j).g; arr_b[i, j] = original.getpixel(i, j).b; arr_r[i, j] = (arr_r[i, j] + arr_g[i, j] + arr_b[i, j]) / for (int i = 0; i < (robert.width-1); i++) for (int j = 0; j < (robert.height-1); j++) x=system.math.abs(arr_r[i, j] - arr_r[i + 1, j + 1]); y=system.math.abs(arr_r[i + 1, j] - arr_r[i, j + 1]); grad = x+y; if ( grad > 255) grad =255; temp_array[i, j] =(byte)(grad); robert.setpixel(i,j,color.fromargb(temp_array[i, j],te mp_array[i, j],temp_array[i,j])); return robert; void RobertFilterClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraFiltering.Image); int x = bit.height; int y = bit.width; double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y);

13 142 for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r; if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; pfrobert.image=robertedgedetect(imagehasil); time.stop(); textboxr6.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxr4.text = hitungmse((bitmap)citrafiltering.image,(bitmap)pfrobert.image).tostring(); textboxr5.text = hitungpsnr(convert.todouble(textboxr4.text)).tostring(); void SaveroberClick(object sender, EventArgs e) if(probert.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) probert.image.save(save.filename, System.Drawing.Imag ing.imageformat.bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SaveSobelClick(object sender, EventArgs e) if(psobel.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) psobel.image.save(save.filename, System.Drawing.Imagi

14 143 ng.imageformat.bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SavePrewittClick(object sender, EventArgs e) if(pprewitt.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pprewitt.image.save(save.filename, System.Drawing.Imaging.ImageFormat.Bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SfSobelClick(object sender, EventArgs e) if(pfsobel.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pfsobel.image.save(save.filename, System.Drawing. Imaging.ImageFormat.Bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SfPrewittClick(object sender, EventArgs e) if(pfprewitt.image!= null)

15 144 SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pfprewitt.image.save(save.filename, System.Drawin g.imaging.imageformat.bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); double hitungmse(bitmap imageasli, Bitmap imagehasil) double sum = 0; double pxasli; double pxhasil; double MSE; for (int i = 0; i < imageasli.height; i++) for (int j = 0; j < imageasli.width; j++) pxasli = imageasli.getpixel(j, i).r; pxhasil = imagehasil.getpixel(j, i).r; sum += Math.Pow(pxAsli - pxhasil, 2); MSE = sum / (imageasli.height * imageasli.width); return MSE; double hitungpsnr (double MSE) double PSNR = Math.Log10(Math.Pow(255, 2)/MSE); return PSNR; void PrewittClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraAsli.Image); int x = bit.height; int y = bit.width; double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y); for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r;

16 145 if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; pprewitt.image=prewittedgedetect(imagehasil); time.stop(); textboxp3.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxp1.text = hitungmse((bitmap)citraasli.image,(bitmap)pprewitt.image).tostring(); textboxp2.text = hitungpsnr(convert.todouble(textboxp1.text)).tostring(); void SobelClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraAsli.Image); int x = bit.height; int y = bit.width; double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y); for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r; if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; psobel.image=sobeledgedetect(imagehasil); time.stop(); textboxs3.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxs1.text = hitungmse((bitmap)citraasli.image,(bitmap)psobel.image).tostring(); textboxs2.text = hitungpsnr(convert.todouble(textboxs1.text)).tostring(); void Button1Click(object sender, EventArgs e) if(psobel.image!= null)

17 146 SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) psobel.image.save(save.filename, System.Drawing.Imagi ng.imageformat.bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SobelFilterClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraFiltering.Image); int x = bit.height; int y = bit.width; double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y); for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r; if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; pfsobel.image=sobeledgedetect(imagehasil); time.stop(); textboxs6.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxs4.text = hitungmse((bitmap)citrafiltering.image,(bitmap)pfsobel.image).tostring(); textboxs5.text = hitungpsnr(convert.todouble(textboxs4.text)).tostring(); void PrewittFilterClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraFiltering.Image); int x = bit.height; int y = bit.width;

18 147 double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y); for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r; if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; pfprewitt.image=prewittedgedetect(imagehasil); time.stop(); textboxp6.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxp4.text = hitungmse((bitmap)citrafiltering.image,(bitmap)pfprewitt.image).tostring(); textboxp5.text = hitungpsnr(convert.todouble(textboxp4.text)).tostring(); void SfrobertClick(object sender, EventArgs e) if(pfrobert.image!= null) SaveFileDialog save = new SaveFileDialog(); save.filter = "Image Files *.bmp"; save.filename = "*.bmp"; if (save.showdialog() == DialogResult.OK) pfrobert.image.save(save.filename, System.Drawing.Ima ging.imageformat.bmp); MessageBox.Show("image save!", "save", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("error save!"); void SaveRobertClick(object sender, EventArgs e) Stopwatch time = new Stopwatch(); time.start(); Bitmap bit = new Bitmap(citraAsli.Image); int x = bit.height; int y = bit.width; double rd=0,bl=0,gr=0,gy=0; Bitmap imagehasil = new Bitmap(x,y);

19 148 for (int i = 0; i < x-1; i++) for (int j = 0; j <= y-1; j++) rd = bit.getpixel(i,j).r; if (rd <=0) rd = 255; gr = bit.getpixel(i,j).g; bl = bit.getpixel(i,j).b; gy = (rd*0.3 + gr* bl*0.11); imagehasil.setpixel(i,j,color.fromargb((int)gy,(int)gy,(i nt)gy)); gy = 0; probert.image=robertedgedetect(imagehasil); time.stop(); textboxr3.text = Math.Round(Convert.ToDecimal(time.ElapsedMilliseconds)/1000,4).ToString(); textboxr1.text = hitungmse((bitmap)citraasli.image,(bitmap)probert.image).tostring(); textboxr2.text = hitungpsnr(convert.todouble(textboxr1.text)).tostring(); 4. Help.cs namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class Help : Form public Help() InitializeComponent(); void HomeToolStripMenuItemClick(object sender, EventArgs e) MainForm a = new MainForm(); a.showdialog (); void FilteringToolStripMenuItemClick(object sender, EventArgs e) Filtering a = new Filtering(); void DeteksiTepiToolStripMenuItemClick(object sender, EventArgs e)

20 149 DeteksiTepi a = new DeteksiTepi(); void AboutToolStripMenuItem1Click(object sender, EventArgs e) About a = new About(); void ExitToolStripMenuItemClick(object sender, EventArgs e) if (MessageBox.Show("Are you sure to exit the Aplication?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Application.Exit(); 5. About.cs using System; using System.Drawing; using System.Windows.Forms; namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class About : Form public About() InitializeComponent(); void HomeToolStripMenuItemClick(object sender, EventArgs e) MainForm a = new MainForm(); a.showdialog (); void FilteringToolStripMenuItemClick(object sender, EventArgs e) Filtering a = new Filtering();

21 150 void DeteksiTepiToolStripMenuItemClick(object sender, EventArgs e) DeteksiTepi a = new DeteksiTepi(); void AboutToolStripMenuItemClick(object sender, EventArgs e) Help a = new Help(); void ExitToolStripMenuItemClick(object sender, EventArgs e) if (MessageBox.Show("Are you sure to exit the Aplication?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Application.Exit();

22 151 CURRICULUM VITAE Nama : Magdalena Refini Waty Siregar Alamat Sekarang : Jln. Bawang 8 No. 4, P.Simalingkar, Medan Alamat Orang Tua : Jln. Bawang 8 No. 4, P.Simalingkar, Medan Telp/ Hp : magdalena.siregar93@gmail.com Riwayat Pendidikan : S-1 Ilmu Komputer Universitas Sumatera Utara, Medan : SMA Negeri 5, Medan : SMP Negeri 2, Medan : SD Negeri , Medan : SD Swasta Timbul Jaya Medan Keahlian Bahasa : Indonesia, Inggris Bahasa Pemrograman : C#, MATLAB Database : MySql Design : Photoshop, Corel Draw Pengalaman Organisasi [ ] Anggota PMR SMA Negeri 5 Medan [2012-Sekarang] Anggota GSKM HKBP P. Simalingkar, Medan [ ] Anggota Kerohanian KMKI [ ] Anggota Kominfo IMILKOM [ ] Kepala Bidang Kominfo IMILKOM

23 152 Pengalaman Kepanitiaan [2012] Ketua Bidang Kesehatan PORSENI IMILKOM 2012 [2012] Bendahara Natal S1 ILKOMP 2012 [2012] Ketua Seksi Kesehatan Porseni IMILKOM 2012 [2013] Wakil Sekretaris Acara PMB IMILKOM 2013 [2014] Bendahara PMB Fasilkom-TI 2014 [2014] Bendahara Pelaksana Natal Oikumene USU 2014 [2015] Bendahara Pelaksana Paskah Oikumene USU 2015 [2015] Ketua Bidang Acara Seminar & Kompetisi Public Speaking IMILKOM 2015

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); }

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); } Listing Program Kode Program Menu Home: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using

More information

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i]; A-1 A LISTING PROGRAM 1. Fibonacci Code //membuat fungsi Fibonacci Code public static String GetFibonacciCode(int n) { StringBuilder fib = new StringBuilder("1"); int a, b, c; List fibs = new List();

More information

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this. A - 1 LISTING PROGRAM 1. Form Menu Utama using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; namespace KompresiCitra / / Description of MainForm.

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. // 1. MainForm.cs using System.Collections.Generic; using System.Drawing; LISTING PROGRAM / / Description of MainForm. / public partial class MainForm : Form public MainForm() The InitializeComponent()

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

More information

CALCULATOR APPLICATION

CALCULATOR APPLICATION CALCULATOR APPLICATION Form1.cs 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;

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM 46 LAMPIRAN A : LISTING PROGRAM 1. Mainform /* * Created by SharpDevelop. * User: User7 * Date: 28/09/2015 * Time: 9:38 * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() A-1 LISTING PROGRAM Form Mainform /* * Created by SharpDevelop. * User: Roni Anggara * Date: 5/17/2016 * Time: 8:52 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time. A1 LISTING PROGRAM 1. Module SkripsiUmri.py import sys, operator, codecs, time class Timer(object): def init (self): self.t1= time.time() def getelapsedltime(self): # gets total elapsed from class initialsation

More information

Lecture 8 Building an MDI Application

Lecture 8 Building an MDI Application Lecture 8 Building an MDI Application Introduction The MDI (Multiple Document Interface) provides a way to display multiple (child) windows forms inside a single main(parent) windows form. In this example

More information

Answer on Question# Programming, C#

Answer on Question# Programming, C# Answer on Question#38723 - Programming, C# 1. The development team of SoftSols Inc. has revamped the software according to the requirements of FlyHigh Airlines and is in the process of testing the software.

More information

Create your own Meme Maker in C#

Create your own Meme Maker in C# Create your own Meme Maker in C# This tutorial will show how to create a meme maker in visual studio 2010 using C#. Now we are using Visual Studio 2010 version you can use any and still get the same result.

More information

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

// Precondition: None // Postcondition: The address' name has been set to the // specified value set; // File: Address.cs // This classes stores a typical US address consisting of name, // two address lines, city, state, and 5 digit zip code. using System; using System.Collections.Generic; using System.Linq;

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 12 Visual Basic/C# Programming (330) REGIONAL 2017 Production Portion: Program 1: Calendar Analysis (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores

More information

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr. Kode Program Form Home namespace SkripsiLagi public partial class Form9 : Form public Form9() LISTING PROGRAM private void filetoolstripmenuitem_click(object sender, EventArgs e) Form2 fr = new Form2();

More information

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara A-1 LISTING PROGRAM 1. Form1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using IronPython.Hosting; using Microsoft.Scripting;

More information

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Huw Talliss Data Structures and Variables. Variables

Huw Talliss Data Structures and Variables. Variables Data Structures and Variables Variables The Regex class represents a read-only regular expression. It also contains static methods that allow use of other regular expression classes without explicitly

More information

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara A-1 LISTING PROGRAM mainform.vb Imports System.IO Public Class mainform Private Sub mainform_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load enkripsirb.checked = True

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() A- 1 LISTING PROGRAM Form1.cs (Pengirim) /* * Created by SharpDevelop. * User: Lia * Date: 3/13/2017 * Time: 9:43 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

CSIS 1624 CLASS TEST 6

CSIS 1624 CLASS TEST 6 CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed

More information

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler

More information

LAMPIRAN A LISTING PROGRAM

LAMPIRAN A LISTING PROGRAM A-1 LAMPIRAN A LISTING PROGRAM FUNGSI public void StopWatchStart() stopwatch.reset(); stopwatch.start(); Cursor.Current = Cursors.WaitCursor; txtlog.text = ""; public void StopWatchStop(string Title) stopwatch.stop();

More information

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

if (say==0) { k.commandtext = Insert into kullanici(k_adi,sifre) values(' + textbox3.text + ',' + textbox4.text + '); k. 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.Data.SqlClient;

More information

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding // Program 2 - Extra Credit // CIS 200-01 // Spring 2015 // Due: 3/11/2015 // By: Andrew L. Wright //Edited by : Ben Spalding // File: Prog2Form.cs // This class creates the main GUI for Program 2. It

More information

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version

More information

Object oriented lab /second year / review/lecturer: yasmin maki

Object oriented lab /second year / review/lecturer: yasmin maki 1) Examples of method (function): Note: the declaration of any method is : method name ( parameters list ).. Method body.. Access modifier : public,protected, private. Return

More information

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using 1 using System; 2 using System.Diagnostics; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Data; 6 using System.Drawing; 7 using System.Text; 8 using System.Windows.Forms;

More information

C# winforms gridview

C# winforms gridview C# winforms gridview 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;

More information

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Before you start - download the game assets from above or on MOOICT.COM to

More information

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

} } public void getir() { DataTable dt = vt.dtgetir(select* from stok order by stokadi); Form1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

You can call the project anything you like I will be calling this one project slide show.

You can call the project anything you like I will be calling this one project slide show. C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise

More information

Using Template Bookmarks for Automating Microsoft Word Reports

Using Template Bookmarks for Automating Microsoft Word Reports Using Template Bookmarks for Automating Microsoft Word Reports Darryl Bryk U.S. Army RDECOM-TARDEC Warren, MI 48397 Disclaimer: Reference herein to any specific commercial company, product, process, or

More information

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox] C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open

More information

Writing Your First Autodesk Revit Model Review Plug-In

Writing Your First Autodesk Revit Model Review Plug-In Writing Your First Autodesk Revit Model Review Plug-In R. Robert Bell Sparling CP5880 The Revit Model Review plug-in is a great tool for checking a Revit model for matching the standards your company has

More information

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at: This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface

More information

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock. C# Tutorial - Create a YouTube Alarm Clock in Visual Studio In this tutorial we will create a simple yet elegant YouTube alarm clock in Visual Studio using C# programming language. The main idea for this

More information

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application

More information

Chapter 8 Advanced GUI Features

Chapter 8 Advanced GUI Features 159 Chapter 8 Advanced GUI Features There are many other features we can easily add to a Windows C# application. We must be able to have menus and dialogs along with many other controls. One workhorse

More information

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1); LISTING PROGRAM FORM PERTAMA : function varargout = pertama(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @pertama_openingfcn,...

More information

IBSDK Quick Start Tutorial for C# 2010

IBSDK Quick Start Tutorial for C# 2010 IB-SDK-00003 Ver. 3.0.0 2012-04-04 IBSDK Quick Start Tutorial for C# 2010 Copyright @2012, lntegrated Biometrics LLC. All Rights Reserved 1 QuickStart Project C# 2010 Example Follow these steps to setup

More information

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems Excel and C# Overview Introduction to DatabaseSupport Systems Building a Web-Enabled Decision Support System Integrating DSS in Business Curriculum 2 Decision Support Systems (DSS) A decision support system

More information

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project. C# Tutorial - Create a Batman Gravity Run Game Start a new project in visual studio and call it gravityrun It should be a windows form application with C# Click OK Change the size of the to 800,300 and

More information

Team project 2017 Dony Pratidana S. Hum Bima Agus Setyawan S. IIP

Team project 2017 Dony Pratidana S. Hum Bima Agus Setyawan S. IIP Hak cipta dan penggunaan kembali: Lisensi ini mengizinkan setiap orang untuk menggubah, memperbaiki, dan membuat ciptaan turunan bukan untuk kepentingan komersial, selama anda mencantumkan nama penulis

More information

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

string spath; string sedifile = 277_005010X228.X12; string sseffile = 277_005010X228.SemRef.EVAL0.SEF; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI; 1 namespace

More information

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware; A-2 'gui_openingfcn', @AiSoftware_OpeningFcn,... 'gui_outputfcn', @AiSoftware_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1});

More information

Representing Recursive Relationships Using REP++ TreeView

Representing Recursive Relationships Using REP++ TreeView Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved. Representing Recursive

More information

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0. Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:

More information

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued XNA 4.0 RPG Tutorials Part 24 Level Editor Continued I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials

More information

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Eyes of the Dragon - XNA Part 37 Map Editor Revisited Eyes of the Dragon - XNA Part 37 Map Editor Revisited I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported operating systems

More information

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, create a new project called Helicopter Game and press OK C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 16 Visual Basic/C# Programming (330) REGIONAL 2016 Program: Character Stats (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores and answer keys! Property

More information

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); } เว บแอพล เคช น 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

More information

UNIT-3. Prepared by R.VINODINI 1

UNIT-3. Prepared by R.VINODINI 1 Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI

More information

Form Properties Window

Form Properties Window C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click

More information

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end A-1 LISTING PROGRAM 1. Form Cover function varargout = cover(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @cover_openingfcn,...

More information

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2 Class Test 4 Marks will be deducted for each of the following: -5 for each class/program that does not contain your name and student number at the top. -2 If program is named anything other than Question1,

More information

Quick Guide for the ServoWorks.NET API 2010/7/13

Quick Guide for the ServoWorks.NET API 2010/7/13 Quick Guide for the ServoWorks.NET API 2010/7/13 This document will guide you through creating a simple sample application that jogs axis 1 in a single direction using Soft Servo Systems ServoWorks.NET

More information

For this example, we will set up a small program to display a picture menu for a fast food take-away shop.

For this example, we will set up a small program to display a picture menu for a fast food take-away shop. 146 Programming with C#.NET 9 Fast Food This program introduces the technique for uploading picture images to a C# program and storing them in a database table, in a similar way to text or numeric data.

More information

Appendix A Programkod

Appendix A Programkod Appendix A Programkod ProgramForm.cs using System; using System.Text; using System.Windows.Forms; using System.Net; using System.IO; using System.Text.RegularExpressions; using System.Collections.Generic;

More information

بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية

بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية وتمتلك الشفرة البرمجية التالية : زر االقسام fr_dept fd = new

More information

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format); 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 Edidev.FrameworkEDIx64;

More information

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); }

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } 59 LISTING PROGRAM Form Utama : using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation;

More information

Computer measurement and control

Computer measurement and control Computer measurement and control Instructors: András Magyarkuti, Zoltán Kovács-Krausz BME TTK, Department of Physics 2017/2018 spring semester Copyright 2008-2018 András Magyarkuti, Attila Geresdi, András

More information

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format); 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 Edidev.FrameworkEDI;

More information

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button Create an Interest Calculator with C# In This tutorial we will create an interest calculator in Visual Studio using C# programming Language. Programming is all about maths now we don t need to know every

More information

Click on the empty form and apply the following options to the properties Windows.

Click on the empty form and apply the following options to the properties Windows. Start New Project In Visual Studio Choose C# Windows Form Application Name it SpaceInvaders and Click OK. Click on the empty form and apply the following options to the properties Windows. This is the

More information

Inheriting Windows Forms with Visual C#.NET

Inheriting Windows Forms with Visual C#.NET Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes

More information

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO.Ports; using Microsoft.FlightSimulator.SimConnect;

More information

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below. APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown

More information

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework Solairaju¹, N. Abdul Ali² and R.M. Karthikkeyan 3 1-2 : P.G. & Research Department of Mathematics, Jamal Mohamed College, Trichy 20.

More information

pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1

pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1 NIZOVI Niz deklarišemo navođenjemtipa elemenata za kojim sledi par srednjih zagrada[] i naziv niza. Ako je niz višedimenzionalni između zagrada[] se navode zarezi, čiji je broj za jedan manji od dimenzija

More information

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky Brian Kiser November 2010 Vigilant C# 2.5 Commonwealth of Kentucky Frankfort, Kentucky Table of Contents 1.0 Work Sample Description Page 3 2.0 Skills Demonstrated 2.1 Software development competency using

More information

II. Programming Technologies

II. Programming Technologies II. Programming Technologies II.1 The machine code program Code of algorithm steps + memory addresses: MOV AX,1234h ;0B8h 34h 12h - number (1234h) to AX register MUL WORD PTR [5678h] ;0F7h 26h 78h 56h

More information

private void Form1_Load(object sender, EventArgs e) {

private void Form1_Load(object sender, EventArgs e) { viii LAMPIRAN LISTING PROGRAM 1. Form Home using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using

More information

Conventions in this tutorial

Conventions in this tutorial This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial

More information

Chapter 6 Dialogs. Creating a Dialog Style Form

Chapter 6 Dialogs. Creating a Dialog Style Form Chapter 6 Dialogs We all know the importance of dialogs in Windows applications. Dialogs using the.net FCL are very easy to implement if you already know how to use basic controls on forms. A dialog is

More information

عنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان

عنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان در این مقاله با دو روش از روشهای خواندن اطالعات از فایل های اکسل و نوشتن آنها در DataGridView بدون استفاده از ( Automation Excelبا استفاده از NPOI و( ADO.Net آشنا میشوید. راه اول : با استفاده از (xls)

More information

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); }

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); } MEMBER PAYMENTS FORM public partial class MemberPaymentsForm : Form public MemberPaymentsForm() private void MemberPaymentsForm_Load(object sender, EventArgs e) // TODO: This line of code loads data into

More information

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points Assignment 1 Lights Out! in C# GUI Programming 10 points Introduction In this lab you will create a simple C# application with a menu, some buttons, and an About dialog box. You will learn how to create

More information

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } using System using System.Collections.Generic using System.ComponentModel using System.Data using System.Drawing using System.Text using System.Windows.Forms using Edidev.FrameworkEDI 1 namespace csharp_gen277x214

More information

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them. We are working on Visual Studio 2010 but this project can be remade in any other version of visual studio. Start a new project in Visual Studio, make this a C# Windows Form Application and name it zombieshooter.

More information

Lampiran 2 MASTER TABEL

Lampiran 2 MASTER TABEL 64 Lampiran 2 MASTER TABEL No. No. Responden Umur Pendidikan Pekerjaan Paritas Kanker 1 427363 35 S1 PNS 4 Tidak 2 504024 36 SMA IRT 4 Tidak 3 500316 35 SMA IRT 5 Tidak 4 504014 35 SMA PNS 1 Tidak 5 447158

More information

XNA 4.0 RPG Tutorials. Part 11b. Game Editors

XNA 4.0 RPG Tutorials. Part 11b. Game Editors XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on

More information

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi Turku University of Applied Sciences Degree Programme in Business Information Technology

More information

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43 A1 LISTING PROGRAM 1. Form Cover function varargout = cover(varargin) COVER MATLAB code for cover.fig COVER, by itself, creates a new COVER or raises the existing singleton*. H = COVER returns the handle

More information

G e n e r a l. wgln Outbound Interface Requirements. Version: 1.3 Date: 2015/06/29

G e n e r a l. wgln Outbound Interface Requirements. Version: 1.3 Date: 2015/06/29 G e n e r a l wgln Outbound Interface Requirements Version: 1.3 Date: 2015/06/29 2014 The Descartes Systems Group Inc. All rights reserved. Information in this document is subject to change without notice.

More information

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0]; 1 LISTING PROGRAM using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace SortingApplication static class Program / / The main entry point for

More information

Course IPCis: Image Processing with C# Chapter C2: Commented Code of the Histogram Project

Course IPCis: Image Processing with C# Chapter C2: Commented Code of the Histogram Project 1 Course IPCis: Image Processing with C# Chapter C2: Commented Code of the Histogram Project Copyright by V. Miszalok, last update: 25-08-2006 using System; //Home of the base class of all classes "System.Object"

More information

ComponentOne. Bitmap for WPF

ComponentOne. Bitmap for WPF ComponentOne Bitmap for WPF ComponentOne, a division of GrapeCity 201 South Highland Avenue, Third Floor Pittsburgh, PA 15206 USA Website: http://www.componentone.com Sales: sales@componentone.com Telephone:

More information

ComponentOne. Bitmap for WinForms

ComponentOne. Bitmap for WinForms ComponentOne Bitmap for WinForms ComponentOne, a division of GrapeCity 201 South Highland Avenue, Third Floor Pittsburgh, PA 15206 USA Website: http://www.componentone.com Sales: sales@componentone.com

More information

emkt Browserless Coding For C#.Net and Excel

emkt Browserless Coding For C#.Net and Excel emkt Browserless Coding For C#.Net and Excel Browserless Basic Instructions and Sample Code 7/23/2013 Table of Contents Using Excel... 3 Configuring Excel for sending XML to emkt... 3 Sandbox instructions

More information

FDSc in ICT. Building a Program in C#

FDSc in ICT. Building a Program in C# FDSc in ICT Building a Program in C# Objectives To build a complete application in C# from scratch Make a banking app Make use of: Methods/Functions Classes Inheritance Scenario We have a bank that has

More information

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

Savoy ActiveX Control User Guide

Savoy ActiveX Control User Guide Savoy ActiveX Control User Guide Jazz Soft, Inc. Revision History 1 Revision History Version Date Name Description 1.00 Jul, 31 st, 2009 Hikaru Okada Created as new document 1.00a Aug, 22 nd, 2009 Hikaru

More information

APARAT DE MASURA. Descrierea programului

APARAT DE MASURA. Descrierea programului APARAT DE MASURA Descrierea programului Acest program reprezinta un aparat de masura universal. Acest apparat poate fi modificat in functie de necesitatile utilizatorului. Modificarile pe care aparatul

More information

In-Class Worksheet #4

In-Class Worksheet #4 CSE 459.24 Programming in C# Richard Kidwell In-Class Worksheet #4 Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open. 1. Create a new Project either from the

More information

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init Option Strict On Imports System.Drawing.Imaging Imports System.Drawing Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.IO Imports System.Web Imports

More information

Ingegneria del Software T. Interfaccia utente

Ingegneria del Software T. Interfaccia utente Interfaccia utente Creating Windows Applications Typical windows-application design & development 1+ classes derived from System.Windows.Forms.Form Design UI with VisualStudio.NET Possible to do anything

More information

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende: APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende: Interfaz gráfica de wiimocap. Obtención de las variables de los tres acelerómetros. Algoritmos de reconocimiento de posiciones. Inclinación

More information