Esempio n. 1
0
        private void AddImage(string path)
        {
            try
            {
                Image tmp = Image.FromFile(path);
            }
            catch
            {
                MessageBox.Show("Keine gültige Bilddatei");
                return;
            }

            ImageForm tmpFrm = new ImageForm();
            tmpFrm.prnt = this;
            tmpFrm.setImageFile(path);
            tmpFrm.CurOverlay.DSTString = Data.DefaultDistance;
            tmpFrm.CurOverlay.StartString = Data.DefaultStart;
            tmpFrm.CurOverlay.Orientation = Data.DefaultDir;
            tmpFrm.CurOverlay.createGrid();
            tmpFrm.Show();
            activeImage = tmpFrm;
            unlockControls();

            ImageForms.Add(tmpFrm);
        }
Esempio n. 2
0
 public void removeImage(ImageForm ifrm)
 {
     Debug.WriteLine("Form closing");
     ImageForms.Remove(ifrm);
     ifrm.Dispose();
     if (ImageForms.Count > 0)
     {
         ImageForms[0].Activate();
         Debug.WriteLine(ImageForms[0].Text + "Activated");
     }
     else
     {
         lockControls();
     }
 }