Beispiel #1
0
		public FormSettings(Variables v, bool enable)
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
			
			var = v;
			handleAll(enable);
			txtServerRoot.Text = var.strApacheFolderPath;
		}
Beispiel #2
0
		public PHPConfig(Variables v)
		{
			var = v;
		}
Beispiel #3
0
		private void MainFormLoad(object sender, EventArgs e)
		{
			// Set the environment paths
            // This is just used so the developer can specify the root path without moving the compiled EXE every time
            strRootFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)+@"\Now\nothing";
            if (!Directory.Exists(strRootFolderPath)) strRootFolderPath = Directory.GetCurrentDirectory();
            
            versionToolStripMenuItem.Text = "Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            
			// Modify the status icons
			GraphicsPath path = new GraphicsPath();
			path.AddEllipse(0, 0, 13, 13);
			Region reg = new Region(path);
			
			foreach (Control x in gbStatus.Controls)
			{
				if (x is Label && x.Name.StartsWith("c"))
				{
					((Label)x).Region = reg;
					((Label)x).BackColor = Variables.cGray;
				}
				else if (x is CheckBox && x.Name.StartsWith("cb"))
				{
					((CheckBox)x).CheckedChanged += StatusCheckedChanged;
				}
			}
			
			//cWebserver.Region = reg;
			//cMySQL.Region = reg;
			//cCache.Region = reg;
			//cWebserver.BackColor = Variables.cGray;
			//cMySQL.BackColor = Variables.cGray;
			//cCache.BackColor = Variables.cGray;
			
            // Load all the variables and restore form state
            var = new Variables(strRootFolderPath);
            var.loadControls(gbStatus);
            
            listMP = new List<MonitoredProcess>();
		}
		public void attachVar(Variables v)
		{
			var = v;
		}