50 lines
856 B
C#
50 lines
856 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ScreenSaver
|
|
{
|
|
static class Program
|
|
{
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
if (args.Length > 0)
|
|
{
|
|
string arg = args[0]?.ToLower()?.Trim()?.Substring(0, 2);
|
|
|
|
if (arg == "/c")
|
|
{
|
|
MessageBox.Show("There are no options.", "Screen Saver", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
}
|
|
else if (arg == "/p")
|
|
{
|
|
ShowScreenSaver();
|
|
}
|
|
else if (arg == "/s")
|
|
{
|
|
ShowScreenSaver();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
ShowScreenSaver();
|
|
}
|
|
}
|
|
|
|
static void ShowScreenSaver()
|
|
{
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
for (int i = 0; i < Screen.AllScreens.Length; i++)
|
|
{
|
|
ScreenForm screen = new ScreenForm(i);
|
|
screen.Show();
|
|
}
|
|
|
|
Application.Run();
|
|
}
|
|
|
|
}
|
|
}
|