Blame view

Vrh.Log4Pro.MaintenanceConsole/Program.cs 951 Bytes
c0dd7bdf   Schwirg László   Add project files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Microsoft.Web.Administration;
  using System.Management;
  using System.Diagnostics;
  
  using Vrh.XmlProcessing;
  using System.Xml.Linq;
  
  namespace Vrh.Log4Pro.MaintenanceConsole
  {
  	class Program
  	{
  		static void Main(string[] args)
  		{
  			try { Console.SetWindowSize(120, 64); } 
  			catch (Exception ex)
  			{
  				ColorConsole.WriteLine("Change the size of the console fonts smaller!"); 
  				Console.ReadKey();
  				return;
  			}
  
  			var mm = new Menu("Log4ProIS Maintenance Console")
  				.AddMenuItem(new Menu.Item("WAM", "Web Application Manager", WebApplicationManager.Execute))
  				.AddMenuItem(new Menu.Item("WSM", "Windows Service Manager", WindowsServiceManager.Execute))
  				.SetSelectionMode(Menu.SelectionMode.Single);
  
  			mm.ExecuteMenu();
  			ColorConsole.WriteLine("Press any key to exit..."); Console.ReadKey();
  		}
  	}
  }