Esempio n. 1
0
		public bool Prepare(string p1, string p2)
		{
			WaveTech.Scutex.Providers.COM.ComBypassProvider.ComBypass bypass = new WaveTech.Scutex.Providers.COM.ComBypassProvider.ComBypass();

			if (bypass.IsComBypassEnabled())
				bypass.RemoveComBypass();

			bypass.SetComBypass(p1, p2);

			WaveTech.Scutex.Licensing.LicensingManager _licensingMgr = null;

			try
			{
				_licensingMgr = new WaveTech.Scutex.Licensing.LicensingManager();
			}
			catch (Exception ex)
			{
				try
				{
					if (!EventLog.SourceExists("Scutex"))
						EventLog.CreateEventSource("Scutex", "Application");

					EventLog.WriteEntry("Scutex", ex.ToString(), EventLogEntryType.Warning, 500);
				}
				catch { }

				return false;
			}

			if (_licensingMgr == null)
				return false;

			return true;
		}
Esempio n. 2
0
        public bool Prepare(string p1, string p2)
        {
            WaveTech.Scutex.Providers.COM.ComBypassProvider.ComBypass bypass = new WaveTech.Scutex.Providers.COM.ComBypassProvider.ComBypass();

            if (bypass.IsComBypassEnabled())
            {
                bypass.RemoveComBypass();
            }

            bypass.SetComBypass(p1, p2);

            WaveTech.Scutex.Licensing.LicensingManager _licensingMgr = null;

            try
            {
                _licensingMgr = new WaveTech.Scutex.Licensing.LicensingManager();
            }
            catch (Exception ex)
            {
                try
                {
                    if (!EventLog.SourceExists("Scutex"))
                    {
                        EventLog.CreateEventSource("Scutex", "Application");
                    }

                    EventLog.WriteEntry("Scutex", ex.ToString(), EventLogEntryType.Warning, 500);
                }
                catch { }

                return(false);
            }

            if (_licensingMgr == null)
            {
                return(false);
            }

            return(true);
        }