Ejemplo n.º 1
0
 void reload()
 {
     foreach (Control y in tabController.Controls)
     {
         foreach (Control x in y.Controls)
         {
             if (x is GroupBox && x.Name.StartsWith("gb"))
             {
                 var.loadControls((GroupBox)x);
             }
         }
     }
 }
Ejemplo n.º 2
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>();
        }
Ejemplo n.º 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>();
		}