1
0
Fork 0

minor style updates

This commit is contained in:
Henrik Hautakoski 2025-01-16 17:31:15 +01:00
parent 5d3ebc1001
commit beeb6a184d
4 changed files with 9 additions and 11 deletions

View file

@ -6,7 +6,6 @@ using Timer = System.Windows.Forms.Timer;
/* /*
* ClockLabel is a special label that will display the system time. * ClockLabel is a special label that will display the system time.
*/ */
class ClockLabel : Label class ClockLabel : Label
{ {
/** /**

View file

@ -20,7 +20,7 @@ namespace App
if (args.Length > 0) { if (args.Length > 0) {
string arg = args[0].ToLower().Trim(); string arg = args[0].ToLower().Trim();
// Settings // Settings
if (arg.StartsWith("/c")) { if (arg.StartsWith("/c")) {
@ -33,7 +33,6 @@ namespace App
// Screensaver // Screensaver
else if (arg.StartsWith("/s")) { else if (arg.StartsWith("/s")) {
saver.Run(); saver.Run();
} else { } else {
MessageBox.Show("Sorry, but the command line argument \"" + arg + MessageBox.Show("Sorry, but the command line argument \"" + arg +
"\" is not valid.", "Colorclock", "\" is not valid.", "Colorclock",

View file

@ -34,7 +34,7 @@ class ScreenSaver
private void OnTick(object? myObject, EventArgs? myEventArgs) private void OnTick(object? myObject, EventArgs? myEventArgs)
{ {
Update(); Update();
} }
private static void Update() private static void Update()
@ -46,4 +46,4 @@ class ScreenSaver
form.BackColor = color; form.BackColor = color;
} }
} }
} }

View file

@ -11,11 +11,11 @@ namespace App
public Window() public Window()
{ {
InitializeComponent(new Rectangle(0, 0, 200, 200)); InitializeComponent(new Rectangle(0, 0, 200, 200));
} }
public Window(Rectangle bounds) public Window(Rectangle bounds)
{ {
InitializeComponent(bounds); InitializeComponent(bounds);
@ -23,15 +23,15 @@ namespace App
public Window(Screen scr) public Window(Screen scr)
{ {
InitializeComponent(scr.Bounds); InitializeComponent(scr.Bounds);
} }
private void InitializeComponent(Rectangle bounds) private void InitializeComponent(Rectangle bounds)
{ {
Bounds = bounds; Bounds = bounds;
// Set some good values for a Sreensaver window. // Set some good values for a Sreensaver window.
BackColor = Color.White; BackColor = Color.White;
FormBorderStyle = FormBorderStyle.None; FormBorderStyle = FormBorderStyle.None;
StartPosition = FormStartPosition.Manual; StartPosition = FormStartPosition.Manual;
Cursor.Hide(); Cursor.Hide();