private VlcMonitor(Label statusLabel, ShutdauwnForm shutdawunForm) { this.monitorRunning = true; this.statusLabel = statusLabel; this.vlcStatus = VlcStatus.MediaStopped; VlcMonitor.instance = this; this.shutdawunForm = shutdawunForm; this.monitorVlc(statusLabel); }
private ShutDownTimer(Label statusLabel, DateTime shutdownDateTime, ShutdauwnForm shutdawunForm) { ShutDownTimer.instance = this; this.shutdownDateTime = shutdownDateTime; this.statusLabel = statusLabel; this.timerRunning = true; this.shutdawunForm = shutdawunForm; this.timer(); }
public ShutdauwnForm() { ShutdauwnForm.instance = this; InitializeComponent(); this.minutesUpDown.Value = Properties.Settings.Default.minutesUpDown; this.hoursUpDown.Value = Properties.Settings.Default.hoursUpDown; this.minimizeCheckBox.Checked = Properties.Settings.Default.minimizeToTray; this.philipsHueIpTextBox.Text = Properties.Settings.Default.philipsHueIp; this.philipsHueUsernameTextBox.Text = Properties.Settings.Default.philipsHueUsername; this.turnOffCheckBox.Checked = Properties.Settings.Default.turnOffLightsOnShutdown; }
public static void StartTimer(Label statusLabel, ShutdauwnForm shutdawunForm, int minutes, int hours) { TimeSpan duration = new TimeSpan(hours, minutes, 0); new Task(() => new ShutDownTimer(statusLabel, DateTime.Now + duration, shutdawunForm)).Start(); }
public static void StartMonitoring(Label statusLabel, ShutdauwnForm shutdauwnForm) { // Start a thread that will handle the monitoring new Task(() => new VlcMonitor(statusLabel, shutdauwnForm)).Start(); }