Exemplo n.º 1
0
        // Stop PHP function
        private void StopPHP()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string phpprocess;

            phpprocess = Properties.Settings.Default.PHPProcess.Replace(".exe", "");

            ProcM.StopProcess(phpprocess);
        }
Exemplo n.º 2
0
        // Stop Nginx function
        private void StopNginx()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string nginxprocess;

            nginxprocess = Properties.Settings.Default.NginxProcess.Replace(".exe", "");

            ProcM.StopProcess(nginxprocess);
        }
Exemplo n.º 3
0
        // Start Nginx function
        private void StartNginx()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string nginxdirectory;

            nginxdirectory = Properties.Settings.Default.NginxDirectory; // Take Nginx Directory from settings

            string nginxprocess;

            nginxprocess = Properties.Settings.Default.NginxProcess;       // Take Nginx Directory from settings

            if (ProcM.StartProcess(nginxdirectory, nginxprocess) == false) // If there are problems, show a ballontip error
            {
                TrayIcon.ShowBalloonTip(20000, "Nginx does not start", "The file path or process name could be wrong", ToolTipIcon.Error);
            }
            ;
        }
Exemplo n.º 4
0
        public void MenuItemStart_Click1()
        {
            this.processList           = new ProcessManagement();
            this.MenuItemStart.Enabled = false;
            this.MenuItemStop.Enabled  = true;

            if (this.processList.start()) // Call function to start Nginx
            {
                this.showIcon(startIcon);
                timer1.Enabled = true;
                return;
            }
            else
            {
                this.showIcon(errorIcon);
                errorIcon.ShowBalloonTip(1000, "Ошибка в командной строке", "Не удалось запустить " + this.processList.ProcessIndex + "-й процесс", ToolTipIcon.Error);
            }
        }
Exemplo n.º 5
0
        // Start PHP function
        private void StartPHP()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string phpdirectory;

            phpdirectory = Properties.Settings.Default.PHPDirectory; // Take Nginx Directory from settings

            string phpprocess;

            phpprocess = Properties.Settings.Default.PHPProcess; // Take Nginx Directory from settings

            string phparguments;

            phparguments = "-b " + Properties.Settings.Default.PHPAddress;

            if (ProcM.StartProcess(phpdirectory, phpprocess, phparguments) == false) // If there are problems, show a ballontip error
            {
                TrayIcon.ShowBalloonTip(20000, "PHP does not start", "The file path, process name or address could be wrong", ToolTipIcon.Error);
            }
            ;
        }