Esempio n. 1
0
        public static void ShowWindowModeless(VerifierBase verifier)
        {
            var wnd = new BatchModeVerificationWindow();

            wnd.SetVerifier(verifier);
            wnd.Show(WindowWrapper.GetWordActiveWindowWrapper());
        }
Esempio n. 2
0
        public static Form GetRegisteredInteractiveVerifierForm <T>(Document docToCheck) where T : VerifierBase
        {
            string typeFullName = typeof(T).FullName ?? "";

            if (s_existingVerifiers.ContainsKey(typeFullName))
            {
                var verifiers = s_existingVerifiers[typeFullName];
                for (int i = 0; i < verifiers.Count; i++)
                {
                    VerifierBase verif = verifiers[i];
                    if (verif.Document.Equals(docToCheck))
                    {
                        var verifWindow = (verif.VerificationWindowInteractive as Form);
                        if (verifWindow == null || verifWindow.Disposing || verifWindow.IsDisposed)
                        {
                            verifiers.RemoveAt(i);
                            return(null);
                        }

                        return(verifWindow);
                    }
                }
            }

            return(null);
        }
        protected void WireVerifierAndWindow(VerifierBase verifier)
        {
            // wire verifier and window together
            m_verifier = verifier;
            verifier.VerificationWindowInteractive = this;

            //var verifWindowForm = m_verificationWindow as Form;
            this.Text = verifier.Title;
            SetSuggestionsViewerControl(verifier.SuggestionViewerType);

            if (!String.IsNullOrEmpty(verifier.HelpTopicFileName))
            {
                SetHelp(verifier.HelpTopicFileName);
            }

            foreach (UserSelectedActions act in Enum.GetValues(typeof(UserSelectedActions)))
            {
                if (act == UserSelectedActions.None || act == UserSelectedActions.Resume || act == UserSelectedActions.Stop)
                {
                    continue;
                }

                if (verifier.ActionsToDisable.Has(act))
                {
                    DisableAction(act);
                }
            }

            verifier.OnInitWindow();
        }
        public static void ShowWindowModeless(VerifierBase verifier)
        {
            var wnd = new InteractiveVerificationWindow();

            wnd.WireVerifierAndWindow(verifier);
            wnd.Show(WindowWrapper.GetWordActiveWindowWrapper());
        }
Esempio n. 5
0
 public static void ShowWindowModal(VerifierBase verifier)
 {
     using (var wnd = new BatchModeVerificationWindow())
     {
         wnd.SetVerifier(verifier);
         wnd.ShowDialog(WindowWrapper.GetWordActiveWindowWrapper());
     }
 }
 public static void ShowWindowModal(VerifierBase verifier)
 {
     using (var wnd = new InteractiveVerificationWindow())
     {
         wnd.WireVerifierAndWindow(verifier);
         wnd.ShowDialog(WindowWrapper.GetWordActiveWindowWrapper());
     }
 }
Esempio n. 7
0
 private void SetVerifier(VerifierBase verifier)
 {
     m_verifier = verifier;
     verifier.VerificationWindowBatchMode = this;
     this.Text = verifier.Title;
 }