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

Added build instructions for newbies to Csharp. #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ Display a web page as your screensaver
2. Select "Install" to install, or "Test" to test it out without installing
3. If installing, the Screen Saver Settings dialog will pop up with the correct screen saver selected
4. Use the `Settings...` button in the same dialog to change the web page(s) displayed by the screen saver

## Build instructions

0. Have the .NET Framework installed
1. Clone or Download the repository
2. Open a command prompt in the project folder and enter:

`C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe Web-Page-Screensaver.csproj`

3. In the folder bin\Debug\ rename Web-Page-Screensaver.exe to Web-Page-Screensaver.scr
4. Right click Web-Page-Screensaver.scr to Test or Install.
2 changes: 1 addition & 1 deletion ScreensaverForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void BrowseTo(string url)
webBrowser.Visible = true;
try
{
Debug.WriteLine($"Navigating: {url}");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That $ is for string interpolation. if you got a build error with it in that means you've not got the most recent .Net version selected as string interpolation was added in C# 6

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated

(with string interpolation $"Navigating: {url}" is equivalent to "Navigating: " +url.toString() removing the $ changes the meaning to be the hardcoded and booring string: "Navigating: {url}"

Debug.WriteLine("Navigating: {url}");
webBrowser.Navigate(url);
}
catch
Expand Down