Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            varContainer         = new MyVarContainer();
            testService          = new AutoResetEvent(false);
            testServiceInstalled = !e.Args.Contains("-no_service_check");
            WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());

            hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator);

            base.OnStartup(e);
            this.threadServiceChecker = new Thread(new ThreadStart(this.ServiceChecker));
            this.threadServiceChecker.Start();
        }
Ejemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            varContainer = new MyVarContainer();
            testService = new AutoResetEvent(false);
            testServiceInstalled = !e.Args.Contains("-no_service_check");
            WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator);

            base.OnStartup(e);
            this.threadServiceChecker = new Thread(new ThreadStart(this.ServiceChecker));
            this.threadServiceChecker.Start();
        }