Exemplo n.º 1
0
 void ScreenAnnotateMode()
 {
     if (annotationForm == null)
     {
         // save owner reference
         prevOwner = Owner;
         // hide this toolbar and the mainform
         Hide();
         Application.DoEvents();
         System.Threading.Thread.Sleep(250);
         // create the annotation form (this takes a screen grab)
         annotationForm = new AnnotationForm();
         annotationForm.Dap = tsEngineState.Dap;
         annotationForm.Show();
         // set the owner to the annotation form
         Owner = annotationForm;
         // show this toolbar
         Show();
         // show annotation tools
         tsAnnotate.Visible = true;
         // show DEngine state tools
         tsEngineState.Mode = FigureToolStripMode.DEngineState;
         tsEngineState.De = annotationForm.De;
         tsPropState.Visible = true;
         tsPropState.Dap = tsEngineState.Dap;
         tsPropState.De = annotationForm.De;
         tsPropState.Dv = annotationForm.Dv;
         // personal toolbar
         tsPersonal.Visible = true;
         System.Diagnostics.Debug.Assert(MainForm is MainForm, "ERROR: mainForm is not of type MainForm");
         PtUtils.LoadPersonalToolsFromSource(tsPersonal,
             PtUtils.CreatePersonalToolsSource(((MainForm)MainForm).PersonalToolStrip));
         tsPersonal.De = annotationForm.De;
     }
 }
Exemplo n.º 2
0
 void ShowAnnotationForm()
 {
     // hide this form
     Hide();
     Application.DoEvents();
     System.Threading.Thread.Sleep(500);
     // create the annotation form (this takes a screen grab)
     annotationForm = new AnnotationForm();
     annotationForm.Show();
     annotationForm.KeyPreview = true;
     annotationForm.KeyDown += new KeyEventHandler(annotationForm_KeyDown);
 }