Ejemplo n.º 1
0
 private void ListViewCompleteReloadWithAssigningPID()
 {
     if (_iisExpressConfig.CheckIISExpressConfigExistence())
     {
         _iisSites = IISConfigReader.ReadXmlFromConfig(_iisExpressConfig);
         _iisSites = IISProcessManager.AssignProcessIds(_iisSites);
         ListViewReInsertItems();
         textBox1.Text = "";
     }
 }
Ejemplo n.º 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
             );
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 5
0
 private void StopAllIISHostedApplications()
 {
     IISProcessManager.KillAllhostedApplications();
     _vm.RefreshSiteList();
 }
Ejemplo n.º 6
0
 private void StopAllIISHostedApplications()
 {
     IISProcessManager.KillAllhostedApplications();
     ListViewCompleteReloadWithAssigningPID();
 }