public MainForm(NamespaceManagerAction action, string url)
        {
            nsManager = new HttpApi();
            InitializeComponent();

            this.action = action;
            initialUrl  = url;
        }
Exemple #2
0
        public MainForm(NamespaceManagerAction action, string url)
        {
            nsManager = new HttpApi();
            InitializeComponent();

            this.action = action;
            this.initialUrl = url;
        }
Exemple #3
0
        private void Elevate(NamespaceManagerAction action, string url)
        {
            if (!Util.IsUserAnAdmin())
            {
                ProcessStartInfo procInfo = new ProcessStartInfo(Application.ExecutablePath, String.Format("-{0} {1}", action.ToString(), url));
                procInfo.UseShellExecute = true;
                procInfo.Verb            = "runas";
                procInfo.WindowStyle     = ProcessWindowStyle.Normal;

                Process.Start(procInfo);

                Application.Exit();
            }
        }
Exemple #4
0
        private void Elevate(NamespaceManagerAction action, string url)
        {
            if (!Util.IsUserAnAdmin())
            {
                ProcessStartInfo procInfo = new ProcessStartInfo(Application.ExecutablePath, String.Format("-{0} {1}", action.ToString(), url));
                procInfo.UseShellExecute = true;
                procInfo.Verb = "runas";
                procInfo.WindowStyle = ProcessWindowStyle.Normal;

                Process.Start(procInfo);

                Application.Exit();
            }
        }