コード例 #1
0
ファイル: frmStartup.cs プロジェクト: nginxtray/nginxtray
        // Stop PHP function
        private void StopPHP()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string phpprocess;

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

            ProcM.StopProcess(phpprocess);
        }
コード例 #2
0
ファイル: frmStartup.cs プロジェクト: nginxtray/nginxtray
        // Stop Nginx function
        private void StopNginx()
        {
            ProcessManagement ProcM = new ProcessManagement();

            string nginxprocess;

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

            ProcM.StopProcess(nginxprocess);
        }
コード例 #3
0
ファイル: frmStartup.cs プロジェクト: nginxtray/nginxtray
        // 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);
            }
            ;
        }
コード例 #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);
            }
        }
コード例 #5
0
ファイル: frmStartup.cs プロジェクト: nginxtray/nginxtray
        // 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);
            }
            ;
        }