Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
update 04-blackcat readme with screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
conceptdev committed Jul 23, 2019
1 parent 73d3100 commit d3de495
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.user
*.sln.docstates
*.userprefs
*.DS_Store

# Xamarin.Android
Resource.designer.cs
Expand Down
25 changes: 17 additions & 8 deletions Chapter04/FS/BlackCat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@ urlFragment: chapter04-fs-blackcat

Simple Xamarin.Forms application written in F#, that loads text from a file, to show on the screen:

![iOS app showing text loaded from file](Screenshots/01.png)

```fsharp
// Get access to the text resource.
let assembly = base.GetType().GetTypeInfo().Assembly
let resource = "TheBlackCat.txt"
// Get access to the text resource.
let assembly = base.GetType().GetTypeInfo().Assembly
let resource = "TheBlackCat.txt"
// Get all the lines of the file.
let lines = seq { use stream = assembly.GetManifestResourceStream(resource)
use reader = new StreamReader(stream)
while not reader.EndOfStream do
yield reader.ReadLine() }
// Get all the lines of the file.
let lines = seq { use stream = assembly.GetManifestResourceStream(resource)
use reader = new StreamReader(stream)
while not reader.EndOfStream do
yield reader.ReadLine() }
```

> [!NOTE]
> **BlackCatPage.fs** line 21 might need to be updated to:
>
> `let resource = "BlackCat.TheBlackCat.txt"`
>
> If you experience a null reference exception.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chapter04/FS/BlackCat/Screenshots/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Chapter04/FS/ColorBlocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ products:
- xamarin
urlFragment: chapter04-fs-colorblocks
---
# Greetings F\#
# Greetings F\# in Xamarin.Forms

Simple Xamarin.Forms application written in F#, rendering blocks of color:

Expand Down

0 comments on commit d3de495

Please sign in to comment.