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 nieuw(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Schetscontrol.MaakStartlijst(); s.Show(); }
private void load(object sender, EventArgs e) { SchetsWin s = new SchetsWin(); s.MdiParent = this; s.Show(); s.LoadFile(sender, e); }
//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 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 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 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 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 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(); } }