Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Fixing a crash an and UI issue #51

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
00ec93b
Merge pull request #36 from MarkWhybird/master
cwc Nov 17, 2017
ab7b53b
Fixing a crash and a UI issue
carlossanlop Mar 20, 2019
b6bf0f9
Fix crash
Mar 21, 2019
a912f2d
Merge pull request #2 from carlossanlop/FixBug
carlossanlop Sep 6, 2020
f647468
Delete unnecessary files.
carlossanlop Sep 6, 2020
57967cf
csproj upgrade to .NET 5.0, remove name dashes.
carlossanlop Sep 6, 2020
3bdff09
sln upgrade and remove name dashes.
carlossanlop Sep 6, 2020
e7d391e
.gitignore simplify.
carlossanlop Sep 6, 2020
53a0656
launchSettings.json add new file.
carlossanlop Sep 6, 2020
44660af
.reg rename regkey (remove dashes), simplify URLs.
carlossanlop Sep 6, 2020
6c19cb8
Program.cs
carlossanlop Sep 6, 2020
896e064
PreferencesForm.cs
carlossanlop Sep 6, 2020
0bfa5bb
PreferencesForm.Designer.cs
carlossanlop Sep 6, 2020
d74ed21
PreferencesManager.cs
carlossanlop Sep 6, 2020
17435ff
PrefsByScreenUserControl.cs
carlossanlop Sep 6, 2020
df668f0
PrefsByScreenUserControl.Designer.cs
carlossanlop Sep 6, 2020
f648521
ScreensaverForm.cs
carlossanlop Sep 6, 2020
8e66a84
ScreensaverForm.Designer.cs
carlossanlop Sep 6, 2020
5fdf32d
ScreensaverForm.resx add new automatically created file.
carlossanlop Sep 6, 2020
fc7c55d
ScreenSaverForm
carlossanlop Sep 6, 2020
1d624b2
Program.cs remove obsolete regkey set, required for Internet Explorer…
carlossanlop Sep 6, 2020
e407b43
PreferencesManager.cs update default websites.
carlossanlop Sep 6, 2020
b23b4b2
PrefsByScreenUserControl.resx automatic update.
carlossanlop Sep 6, 2020
2104146
resx files delete.
carlossanlop Sep 7, 2020
7b6d05a
Design changes
carlossanlop Sep 7, 2020
a3aac94
Remove obsolete reg files
carlossanlop Sep 8, 2020
0af6b68
Heavy update.
carlossanlop Sep 8, 2020
b2d54d0
More updates
carlossanlop Sep 8, 2020
b6fb83f
Simplify mouse and keyboard handling. Pending to review why WebView2 …
carlossanlop Sep 9, 2020
aa1c057
Address .NET 5.0 RC1 warnings
carlossanlop Sep 10, 2020
eff1691
Fix tabIndex and address sizes in a screen with 100% DPI.
carlossanlop Sep 10, 2020
c6cf7b0
Remove AnyCPU
carlossanlop Sep 10, 2020
d9d1e76
Add PublishTrimmed and Platforms
carlossanlop Sep 10, 2020
679d55d
Add FolderProfile.pubxml
carlossanlop Sep 10, 2020
da7596d
PrefsByScreenUserControl.cs Rename EventHandler methods
carlossanlop Sep 10, 2020
127126b
ScreensaverForm.cs ensure the screen size is used (avoid overwrite by…
carlossanlop Sep 10, 2020
5c9a9a8
ScreenInformation.cs remove unused properties, ensure URLs have a def…
carlossanlop Sep 10, 2020
d7e550f
Properties.cs remove default URLs from here.
carlossanlop Sep 10, 2020
a78cc5b
Extensions.cs remove redundant extensions, use typed extension.
carlossanlop Sep 10, 2020
66a8988
Program.cs revert versioning change (do not add yet). Ensure no argum…
carlossanlop Sep 10, 2020
7eefa04
Merge pull request #3 from carlossanlop/UpgradeToNet50
carlossanlop Sep 10, 2020
250607c
Add *.pubxml files for x64 and x86.
carlossanlop Sep 10, 2020
890bffd
Delete the default pubxml file.
carlossanlop Sep 10, 2020
9ebe7ae
csproj
carlossanlop Sep 10, 2020
ced1bd7
FInal readme with screenshot, no published files yet.
carlossanlop Sep 10, 2020
08c1c54
Merge pull request #4 from carlossanlop/FinalTouches50
carlossanlop Sep 10, 2020
ba54dc0
typo in readme
ChayoteJarocho Mar 28, 2021
74e6781
Create dotnet.yml (#7)
ChayoteJarocho Mar 29, 2021
4788012
Small updates (#8)
ChayoteJarocho Mar 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: .NET

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
202 changes: 6 additions & 196 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,196 +1,6 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

# Roslyn cache directories
*.ide/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

#NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
#*.pubxml

# NuGet Packages Directory
packages/*
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

Thumbs.db
/.vs
/.vs
/.vs/slnx.sqlite
/.vs/ProjectSettings.json
**/.vs/
**/.vscode/
**/bin/
**/obj/
**/Properties/*
**/*.user
4 changes: 0 additions & 4 deletions .hgignore

This file was deleted.

59 changes: 59 additions & 0 deletions Extensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Microsoft.Win32;
using System;

namespace WebPageScreensaver
{
public static class Extensions
{
public static RegistryKey GetOrCreateSubKey(this RegistryKey root, string subKeyName)
{
if (root == null)
{
throw new ArgumentNullException(nameof(root));
}
if (string.IsNullOrWhiteSpace(subKeyName))
{
throw new ArgumentException($"Argument is null or whitespace: {nameof(subKeyName)}");
}

RegistryKey? key = root.OpenSubKey(subKeyName, writable: true);
if (key == null)
{
key = root.CreateSubKey(subKeyName, writable: true);
if (key == null)
{
throw new UnauthorizedAccessException($"Could not get/create key to registry: {subKeyName}");
}
}
return key;
}

public static string GetOrCreateValue<T>(this RegistryKey root, string valueName, T defaultValue)
{
if (root == null)
{
throw new ArgumentNullException(nameof(root));
}
if (defaultValue == null)
{
throw new ArgumentNullException(nameof(defaultValue));
}
if (string.IsNullOrWhiteSpace(valueName))
{
throw new ArgumentNullException(nameof(valueName));
}

object? obj = root.GetValue(valueName);
if (obj == null)
{
root.SetValue(valueName, defaultValue);
obj = root.GetValue(valueName);
if (obj == null)
{
throw new UnauthorizedAccessException($"Could not get/create the registry value: {valueName}");
}
}
return obj.ToString() ?? string.Empty;
}
}
}
23 changes: 23 additions & 0 deletions MultiFormContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace WebPageScreensaver
{
internal class MultiFormContext : ApplicationContext
{
public MultiFormContext(List<Form> forms)
{
if (forms == null)
{
throw new ArgumentNullException(nameof(forms));
}

foreach (Form form in forms)
{
form.FormClosed += (s, args) => ExitThread();
form.Show();
}
}
}
}
23 changes: 23 additions & 0 deletions MultiScreenMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace WebPageScreensaver
{
/// <summary>
/// Specifies the different ways a screensaver can be shown in multiple screens.
/// </summary>
internal enum MultiScreenMode
{
/// <summary>
/// Same webpage in all screens.
/// </summary>
Mirror,

/// <summary>
/// Each screen has its own individual list of webpages.
/// </summary>
Separate,

/// <summary>
/// Show one webpage split among all the screens.
/// </summary>
Span
}
}
Binary file removed PreUpgradePrefs.reg
Binary file not shown.
Loading