Пример #1
0
 private void ListViewCompleteReloadWithAssigningPID()
 {
     if (_iisExpressConfig.CheckIISExpressConfigExistence())
     {
         _iisSites = IISConfigReader.ReadXmlFromConfig(_iisExpressConfig);
         _iisSites = IISProcessManager.AssignProcessIds(_iisSites);
         ListViewReInsertItems();
         textBox1.Text = "";
     }
 }
Пример #2
0
 private void runSiteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
     {
         var folderPath = @"/path:";
         folderPath += folderBrowserDialog1.SelectedPath;
         IISProcessManager.ExecuteProcess(
             _vm.IISExpressAddress,
             folderPath
             );
     }
 }
Пример #3
0
 private void StopSelectedApplication(int selected)
 {
     IISProcessManager.ExecuteProcess("taskkill", "/pid "
                                      + _iisSites[selected].ProcessId);
     /*IISProcessManager.RemoveProcessId(Int32.Parse(_iisSites[selected].ProcessId));*/
     _iisSites[selected].Status    = "Stopped";
     _iisSites[selected].ProcessId = "Not Found";
     ListViewCompleteReloadMappedWithWebsiteList();
     notifyIcon1.ShowBalloonTip(700,
                                "Application Stopped",
                                "Your application " +
                                _iisSites[selected].SiteName +
                                " is now stopped.", ToolTipIcon.Info);
 }
Пример #4
0
 private void StartSelectedApplication(int selected)
 {
     /*            int processId = */
     try
     {
         IISProcessManager.ExecuteProcess(
             _iisExpressConfig.IISExpressAddress, "/site:\""
             + _iisSites[selected].SiteName + "\"");
     }
     catch (Exception ex)
     {
         _exitFromNotification = true;
         Application.Exit();
         return;
     }
     /*_iisSites[selected].ProcessId = processId.ToString();*/
     _iisSites[selected].Status = "Started";
     ListViewCompleteReloadWithAssigningPID();
     notifyIcon1.ShowBalloonTip(700,
                                "Application hosted",
                                "Your application " +
                                _iisSites[selected].SiteName +
                                " is hosted", ToolTipIcon.Info);
 }
Пример #5
0
 private void StopAllIISHostedApplications()
 {
     IISProcessManager.KillAllhostedApplications();
     _vm.RefreshSiteList();
 }
Пример #6
0
 private void StopAllIISHostedApplications()
 {
     IISProcessManager.KillAllhostedApplications();
     ListViewCompleteReloadWithAssigningPID();
 }