1
1
using System ;
2
2
using System . Threading . Tasks ;
3
3
using System . Windows . Forms ;
4
+ using PhpVersionSwitcher . Properties ;
4
5
5
6
namespace PhpVersionSwitcher
6
7
{
@@ -19,8 +20,8 @@ public partial class MainForm : Form
19
20
20
21
public MainForm ( )
21
22
{
22
- this . httpServer = new ServiceManager ( Properties . Settings . Default . HttpServerServiceName ) ;
23
- this . phpVersions = new VersionsManager ( Properties . Settings . Default . PhpDir , this . httpServer ) ;
23
+ this . httpServer = new ServiceManager ( Settings . Default . HttpServerServiceName ) ;
24
+ this . phpVersions = new VersionsManager ( Settings . Default . PhpDir , this . httpServer ) ;
24
25
this . waitingForm = new WaitingForm ( ) ;
25
26
26
27
this . InitializeComponent ( ) ;
@@ -47,9 +48,9 @@ private void InitializeMainMenu()
47
48
}
48
49
49
50
this . httpServerMenu = new ToolStripMenuItem ( this . httpServer . ServiceName ) ;
50
- this . httpServerStart = this . httpServerMenu . DropDownItems . Add ( "Start" , Properties . Resources . Start , this . httpServerStart_Clicked ) ;
51
- this . httpServerStop = this . httpServerMenu . DropDownItems . Add ( "Stop" , Properties . Resources . Stop , this . httpServerStop_Clicked ) ;
52
- this . httpServerRestart = this . httpServerMenu . DropDownItems . Add ( "Restart" , Properties . Resources . Restart , this . httpServerRestart_Clicked ) ;
51
+ this . httpServerStart = this . httpServerMenu . DropDownItems . Add ( "Start" , Resources . Start , this . httpServerStart_Clicked ) ;
52
+ this . httpServerStop = this . httpServerMenu . DropDownItems . Add ( "Stop" , Resources . Stop , this . httpServerStop_Clicked ) ;
53
+ this . httpServerRestart = this . httpServerMenu . DropDownItems . Add ( "Restart" , Resources . Restart , this . httpServerRestart_Clicked ) ;
53
54
this . UpdateHttpServerMenuState ( ) ;
54
55
55
56
this . notifyIconMenu . Items . Add ( new ToolStripSeparator ( ) ) ;
@@ -61,7 +62,7 @@ private void InitializeMainMenu()
61
62
private void UpdateHttpServerMenuState ( )
62
63
{
63
64
bool running = this . httpServer . IsRunning ( ) ;
64
- this . httpServerMenu . Image = running ? Properties . Resources . Start : Properties . Resources . Stop ;
65
+ this . httpServerMenu . Image = running ? Resources . Start : Resources . Stop ;
65
66
this . httpServerStart . Enabled = ! running ;
66
67
this . httpServerStop . Enabled = running ;
67
68
this . httpServerRestart . Enabled = running ;
0 commit comments