Esempio n. 1
0
        //Takes an image file and sets up a document to host it
        private void ImportImageFile(string filename)
        {
            form.StatusNormalMessage("Importing File...");
            Cursor.Current = Cursors.WaitCursor;

            //create the document and set up its view
            NuGenDocument doc = NewDocument();

            if (!doc.ImportFile(filename))
            {
                Cursor.Current = Cursors.Arrow;

                MessageBox.Show("Could not import image!");
                RemoveDocument(doc);

                return;
            }

            doc.InitDefaults();

            form.EnableControls();
            form.CheckedBackgroundOption(doc.BackgroundSelection);
            form.CheckedPointViewOption(docViewMap.GetView(doc).ViewPointSelection);
            form.StatusNormalMessage("Ready.");
            Cursor.Current = Cursors.Arrow;
        }