private void nieuw(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Show(); }
private void nieuw(object sender, EventArgs e) { s = new SchetsWin(); s.MdiParent = this; s.Show(); s.schets.Changed = false; }
private void Exporteren(object sender, EventArgs e) { SchetsWin activeChild = (SchetsWin)this.ActiveMdiChild; SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.Filter = "Schetsplus (*.sp)|*.sp|PNG Images (*.png)|*.png|JPEG Images (*.jpg)|*.jpg|BMP Images (*.bmp)|*.bmp"; if (saveDialog.ShowDialog() == DialogResult.OK && saveDialog.FileName.Length > 0) { Bitmap bitmap = activeChild.schetscontrol.Schets.getBitmap(); activeChild.schetscontrol.Schets.Teken(activeChild.schetscontrol.Schets.BitmapGraphics); switch (saveDialog.FilterIndex) { case 1: activeChild.schetscontrol.Schets.Bewaar(saveDialog.FileName); break; case 2: bitmap.Save(saveDialog.FileName, System.Drawing.Imaging.ImageFormat.Png); break; case 3: bitmap.Save(saveDialog.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); break; case 4: bitmap.Save(saveDialog.FileName, System.Drawing.Imaging.ImageFormat.Bmp); break; } activeChild.schetscontrol.Schets.Schoon(); } }
private void load(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Show(); s.LoadFile(sender, e); }
private void nieuw(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Schetscontrol.MaakStartlijst(); s.Show(); }
//Functie om een bmp, jpg, png te openen naar een nieuw scherm private void open(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; if(s.openen(sender, e)) s.Show(); else s.Close(); }
//Deze opent een select dialog en geeft de geselecteerde filenaam door aan de inlees methode. private void open(object sender, EventArgs e) { OpenFileDialog dialoog = new OpenFileDialog(); dialoog.Filter = "PNG-file|*.png|JPG-file|*.jpg|BMP-file|*.bmp"; dialoog.Title = "Afbeelding opslaan"; if (dialoog.ShowDialog() == DialogResult.OK) { SchetsWin nieuwfile = new SchetsWin(); nieuwfile.MdiParent = this; nieuwfile.inlezen(dialoog.FileName); nieuwfile.Show(); } }
/// <summary> /// Opent een afbeelding /// </summary> private void Import(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Kies een bestand om te openen"; ofd.Filter = "PNG|*.png|JPEG|*.jpg|Bitmap Image|*.bmp|GIF|*.gif"; if (ofd.ShowDialog() == DialogResult.OK) { SchetsWin s = new SchetsWin(); s.MdiParent = this; ImageTool i = new ImageTool(); i.DrawImage(s.schetscontrol, ofd.FileName); s.Show(); } }
private void openen(object sender, EventArgs e) { OpenFileDialog fi = new OpenFileDialog(); fi.Title = "Open a .Schets file"; fi.Filter = "Schets file|*.Schets"; if (fi.ShowDialog() == System.Windows.Forms.DialogResult.OK) { StreamReader sr = new StreamReader(fi.FileName); SchetsWin s = new SchetsWin(sr) { MdiParent = this }; s.Show(); } }
/// <summary> /// Opent een XML file /// </summary> private void Open(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Kies een bestand om te openen"; ofd.Filter = "XML|*.xml"; if (ofd.ShowDialog() == DialogResult.OK) { SchetsWin s = new SchetsWin(); s.MdiParent = this; Read read = new Read(); read.ReadXML(ofd.FileName, s); s.Show(); } }
private void openvenster(object sender, EventArgs e) { OpenFileDialog openKiezer = new OpenFileDialog(); openKiezer.Filter = "Schets-files (*.SCHETS)|*.SCHETS|" + "Alle files (*.*)|*.*"; openKiezer.Title = "Open Schets in new window"; DialogResult resultaat = openKiezer.ShowDialog(); if (resultaat == DialogResult.OK) { string bestandsnaam = openKiezer.FileName; SchetsWin s = new SchetsWin(); s.MdiParent = this; s.OpenBestand(bestandsnaam); s.Show(); } }
private void open(object sender, EventArgs e) { // Maak een windows explorer dialoog om een bestand te openen OpenFileDialog dialog = new OpenFileDialog(); // Schets bestandstype: dialog.Filter = "Schets bestand (*.sch) | *.sch"; if (dialog.ShowDialog() == DialogResult.OK) { BestandLader.BestandObject obj = BestandLader.LaadSchets(dialog.FileName); if (obj != null) { SchetsWin s = new SchetsWin(obj); s.MdiParent = this; s.Show(); } } }
// Openen Toegevoegd private void open(object sender, EventArgs e) { OpenFileDialog dialoog = new OpenFileDialog(); dialoog.Title = "Schets openen"; dialoog.Filter = "Image Files(*.jpg; *.jpeg; *.bmp)|*.jpg; *.jpeg; *.bmp"; if (dialoog.ShowDialog() == DialogResult.OK) { SchetsWin s = new SchetsWin(); s.MdiParent = this; Bitmap bit = new Bitmap(dialoog.FileName); s.Text = dialoog.FileName; s.MaakbitmapvanFile(bit); s.Schetscontrol.MaakStartlijst(); s.Show(); } }
private void open(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Open een File"; ofd.Filter = "Alle Files|*.*"; if (ofd.ShowDialog(this) == DialogResult.OK) { try { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.importeer(ofd.FileName); s.Show(); } catch { MessageBox.Show("File kon niet worden gelezen."); } } }
private void Open(object sender, EventArgs e) { OpenFileDialog f = new OpenFileDialog(); f.Filter = "Images (*.sppp;*.png;*.jpg;*.bmp)|*.sppp;*.png;*.jpg;*.bmp"; if (f.ShowDialog() == DialogResult.OK && f.FileName.Length > 0) { SchetsWin s = new SchetsWin(); if (Path.GetExtension(f.FileName) == ".sppp") { s.LoadProject(File.ReadAllBytes(f.FileName)); } else { s.LoadBitmap(new Bitmap(new MemoryStream(File.ReadAllBytes(f.FileName)))); } s.MdiParent = this; s.Show(); } }
private void openviatekst(object sender, EventArgs e) { OpenFileDialog dialoog = new OpenFileDialog(); dialoog.Title = "Schets openen"; dialoog.Filter = "Tekstfiles|*.txt|Alle files|*.*";; if (dialoog.ShowDialog() == DialogResult.OK) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Text = dialoog.FileName; Laden.laadhet(dialoog.FileName, s.Schetscontrol); Graphics g = s.Schetscontrol.MaakBitmapGraphics(); s.Schetscontrol.MaakStartlijst(); foreach (SchetsItem i in s.Schetscontrol.Itemlijst) { i.Tekenitem(g); } s.Show(); } }
private void Importeren(object sender, EventArgs e) { OpenFileDialog openDialog = new OpenFileDialog(); openDialog.Filter = "Schetsplus (*.sp)|*.sp|PNG Images (*.png)|*.png|JPEG Images (*.jpg)|*.jpg|BMP Images (*.bmp)|*.bmp"; if (openDialog.ShowDialog() == DialogResult.OK && openDialog.FileName.Length > 0) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Show(); SchetsWin activeChild = (SchetsWin)this.ActiveMdiChild; if (Path.GetExtension(openDialog.FileName) != ".sp") { activeChild.importeerBitmap(openDialog.FileName); } else { activeChild.schetscontrol.Schets.Open(openDialog.FileName); } } }
private void open(object sender, EventArgs e) { OpenImageDialog dialog = new OpenImageDialog(); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { SchetsWin s; if (dialog.FileName.EndsWith(".schets")) { s = new SchetsWin(File.ReadAllText(dialog.FileName)); } else { Image img = Image.FromFile(dialog.FileName); Bitmap bmp = new Bitmap(img); s = new SchetsWin(bmp); } s.MdiParent = this; s.Show(); } }
private void afsluiten(object sender, EventArgs e) { this.Close(); s = null; }
private void open(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog(); open.Filter = "JPEG-image|*.jpg|PNG-image|*.png|BMP-image|*.bmp|Project-file|*.sketch"; if (open.ShowDialog() == DialogResult.OK) { s = new SchetsWin(); s.MdiParent = this; s.Open(open.FileName); } s.Show(); }