-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/MarvinKlein1508/SignaturePad
- Loading branch information
Showing
20 changed files
with
108 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/BGImageDemo" | ||
|
||
<Demos.Core.SignaturePadDemos.BackgroundImageDemo @rendermode="InteractiveServer" /> | ||
<BackgroundImageDemo @rendermode="InteractiveServer" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/Disabled" | ||
|
||
<Demos.Core.SignaturePadDemos.DisabledDemo @rendermode="InteractiveServer" /> | ||
<DisabledDemo @rendermode="InteractiveServer" /> |
4 changes: 4 additions & 0 deletions
4
BlazorSRRDemo/BlazorSRRDemo/Components/Pages/ExistingSignature.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@page "/ExistingSignature" | ||
|
||
<ExistingSignatureDemo @rendermode="InteractiveServer" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/" | ||
|
||
<Demos.Core.SignaturePadDemos.HomeDemo @rendermode="InteractiveServer" /> | ||
<HomeDemo @rendermode="InteractiveServer" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/OptionsDemo" | ||
|
||
<Demos.Core.SignaturePadDemos.OptionsDemo @rendermode="InteractiveServer" /> | ||
<OptionsDemo @rendermode="InteractiveServer" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
@using BlazorSRRDemo | ||
@using BlazorSRRDemo.Components | ||
@using Demos.Core | ||
@using Demos.Core.SignaturePadDemos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@page "/ExistingSignature" | ||
|
||
<ExistingSignatureDemo /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/BGImageDemo" | ||
|
||
<Demos.Core.SignaturePadDemos.BackgroundImageDemo /> | ||
<BackgroundImageDemo /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/Disabled" | ||
|
||
<Demos.Core.SignaturePadDemos.DisabledDemo /> | ||
<DisabledDemo /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@page "/ExistingSignature" | ||
|
||
|
||
<ExistingSignatureDemo /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
Welcome to your new app. | ||
|
||
<Demos.Core.SignaturePadDemos.HomeDemo /> | ||
<HomeDemo /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@page "/OptionsDemo" | ||
|
||
<Demos.Core.SignaturePadDemos.OptionsDemo /> | ||
<OptionsDemo /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@using System.Text | ||
@inject NavigationManager navigationManager | ||
@inject SignatureInMemoryService memoryService | ||
|
||
<h1>SignaturePad Default Demo</h1> | ||
<SignaturePad @bind-Value="Input.Signature" style="width: 100%;" /> | ||
|
||
|
||
@if (Input.Signature.Any()) | ||
{ | ||
<h2>Signature</h2> | ||
<img src="@Input.SignatureAsBase64" /> | ||
<button type="button" class="btn btn-primary" @onclick="SaveSignature">Save signature</button> | ||
<button type="button" class="btn btn-primary" @onclick="OpenSignature">Open signature</button> | ||
} | ||
|
||
@if(memoryService.Signature.Any()) | ||
{ | ||
<button type="button" class="btn btn-primary ms-1" @onclick="ReadSignature">Read signature</button> | ||
} | ||
|
||
@code { | ||
public MyInput Input { get; set; } = new(); | ||
|
||
public ExistingSignatureDemo() | ||
{ | ||
Input.Signature = Encoding.UTF8.GetBytes("data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAALgAAAA5CAYAAACF3+G6AAAAAXNSR0IArs4c6QAADlZJREFUeF7t3QOULFkSBuB/1rZt27Zt88zatm3be9actW3bmLVtz25+b+7dyZed1ZXVXV1d3ZVxTp3u1y95b9y4EX/8EbVPRpnHCBwuyY2T+Pm3JP8sn88m+eqEG5wiyVmSnC7JX5NcJslxkhwqyeGTHKVc7x9J9kvyqSRfT/KOeTzwqlxjn1V50Rnf8xBJLlAU7YxJTp3k4ElOleT0SQ5b/j3jZfccXpX/CBs5uZzzsyTvTPKlJN9sFscnkvx2E9fbtaeuqoKfO8kxk5w1yX+SXDDJ2ZIcq8w0q3noGWb9L0k+k+S/nXMsjON2/kbBWekvJvllscz/Luf/uaXAf2wtrPOXBed5j9HzXH8vC47Cn2OG5971h+5WBadA10py1OIGnKYoM8s7RCjqp4vr8MPG/fheOekH5XeL4pPFGg+53jyPsaNcOMlJyqI8UZKTl4Vql7lEs2DfO88b7uRr7SYFv3qzZV8tyfnK5E+bl/2TfCPJ54oy2+p9dqrcorHuT0tiEZ6pxAI79V3m9tw7VcE998WSXKgJ4q6Z5LTrjIgAToDGhfh4kh8VhZ7bIC7JhcQNFixr/ook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K5CYII="); | ||
} | ||
|
||
private void SaveSignature() | ||
{ | ||
memoryService.Signature = Input.Signature; | ||
} | ||
|
||
private void OpenSignature() | ||
{ | ||
navigationManager.NavigateTo(Input.SignatureAsBase64); | ||
} | ||
|
||
private void ReadSignature() | ||
{ | ||
Input.Signature = memoryService.Signature; | ||
StateHasChanged(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters