コード例 #1
0
        private void nieuw(object sender, EventArgs e)
        {
            SchetsWin s = new SchetsWin();

            s.MdiParent = this;
            s.Show();
        }
コード例 #2
0
 private void nieuw(object sender, EventArgs e)
 {
     s           = new SchetsWin();
     s.MdiParent = this;
     s.Show();
     s.schets.Changed = false;
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        private void load(object sender, EventArgs e)
        {
            SchetsWin s = new SchetsWin();

            s.MdiParent = this;
            s.Show();
            s.LoadFile(sender, e);
        }
コード例 #5
0
        private void nieuw(object sender, EventArgs e)
        {
            SchetsWin s = new SchetsWin();

            s.MdiParent = this;
            s.Schetscontrol.MaakStartlijst();
            s.Show();
        }
コード例 #6
0
ファイル: Hoofdscherm.cs プロジェクト: tennapel/schetseditor
 //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();
 }
コード例 #7
0
        //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();
            }
        }
コード例 #8
0
        /// <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();
            }
        }
コード例 #9
0
        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();
            }
        }
コード例 #10
0
        /// <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();
            }
        }
コード例 #11
0
        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();
            }
        }
コード例 #12
0
ファイル: Hoofdscherm.cs プロジェクト: danielverh/Schets
        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();
                }
            }
        }
コード例 #13
0
        // 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();
            }
        }
コード例 #14
0
ファイル: Hoofdscherm.cs プロジェクト: arjanadriaanse/imp-p3
 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.");
         }
     }
 }
コード例 #15
0
ファイル: Hoofdscherm.cs プロジェクト: Gericom/SchetsPlus
        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();
            }
        }
コード例 #16
0
        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();
            }
        }
コード例 #17
0
        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);
                }
            }
        }
コード例 #18
0
ファイル: Hoofdscherm.cs プロジェクト: rbovenkamp/Imp
        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();
            }
        }
コード例 #19
0
ファイル: Hoofdscherm.cs プロジェクト: arjanadriaanse/imp-p3
 private void nieuw(object sender, EventArgs e)
 {
     SchetsWin s = new SchetsWin();
     s.MdiParent = this;
     s.Show();
 }
コード例 #20
0
 private void afsluiten(object sender, EventArgs e)
 {
     this.Close(); s = null;
 }
コード例 #21
0
ファイル: Hoofdscherm.cs プロジェクト: Dylrak/SchetsEditor
 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();
 }