Exemplo n.º 1
0
        private void TerminalServerCheck()
        {
            var tsd = new TerminalServerDetection();

            if (!tsd.IsTerminalServer())
            {
                return;
            }

            var edition = EditionFactory.Instance.Edition;

            if (!edition.ValidOnTerminalServer)
            {
                Logger.Error("Tryed to run " + edition.Name + " with installed Terminal Services.");
                var caption = edition.Name;
                var message = TranslationHelper.Instance.TranslatorInstance.GetTranslation("Program", "UsePDFCreatorTerminalServer",
                                                                                           "Please use \"PDFCreator Terminal Server\" for use on computers with installed Terminal Services.\r\n\r\nPlease visit our website for more information or contact us directly: [email protected]");
                var result = MessageWindow.ShowTopMost(message, caption, MessageWindowButtons.MoreInfoCancel, MessageWindowIcon.Exclamation);
                if (result == MessageWindowResponse.MoreInfo)
                {
                    Process.Start(Urls.PdfCreatorTerminalServerUrl);
                }
                Shutdown(2);
            }
        }
 public void IsTerminalServer_SuiteMaskIsNotTerminalAndNotSingeUserTs_ReturnsFalse()
 {
     _osvi.wSuiteMask = ~TerminalServerDetection.SuiteMask.VER_SUITE_TERMINAL & ~TerminalServerDetection.SuiteMask.VER_SUITE_SINGLEUSERTS;
     Assert.IsFalse(_terminalServerDetection.IsTerminalServer());
 }
Exemplo n.º 3
0
 public void IsTerminalServer_SuiteMaskIsTerminal_ReturnsTrue()
 {
     _osvi.wSuiteMask = TerminalServerDetection.SuiteMask.VER_SUITE_TERMINAL;
     Assert.IsTrue(_terminalServerDetection.IsTerminalServer());
 }