示例#1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // see if we're an admin
            WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            bool             hasAdministrativeRight = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (hasAdministrativeRight)
            {
                this.Text = "Administrator: " + this.Text;
            }

            sc.SetLWTreeView(navTree);

            sc.LoadPlugins();

            if (sConsoleFile != null && File.Exists(sConsoleFile))
            {
                // load up the console file
                ReadConsoleFile(sConsoleFile);
            }
        }