-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c955cf
commit db9b21e
Showing
9 changed files
with
147 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
// WatchOnlyBitcoinWallet | ||
// Copyright (c) 2016 Coding Enthusiast | ||
// Distributed under the MIT software license, see the accompanying | ||
// file LICENCE or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
using Avalonia.Input.Platform; | ||
using WatchOnlyBitcoinWallet.MVVM; | ||
|
||
namespace WatchOnlyBitcoinWallet.ViewModels | ||
{ | ||
public class AboutViewModel : ViewModelBase | ||
{ | ||
/// <summary> | ||
/// Make designer happy! | ||
/// </summary> | ||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. | ||
public AboutViewModel() : this("(Version 1.2.3)", null) | ||
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. | ||
{ | ||
} | ||
|
||
public AboutViewModel(string ver, IClipboard clipboard) | ||
{ | ||
VersionString = ver; | ||
this.clipboard = clipboard; | ||
|
||
CopyCommand = new BindableCommand<string>(Copy); | ||
} | ||
|
||
|
||
private readonly IClipboard clipboard; | ||
public string VersionString { get; } | ||
public string Address1 => "1Q9swRQuwhTtjZZ2yguFWk7m7pszknkWyk"; | ||
public string Address2 => "bc1q3n5t9gv40ayq68nwf0yth49dt5c799wpld376s"; | ||
public string DonateUri1 => $"bitcoin:{Address1}{Bip21Extras}"; | ||
public string DonateUri2 => $"bitcoin:{Address2}{Bip21Extras}"; | ||
|
||
private const string Bip21Extras = "?label=Coding-Enthusiast&message=Donation%20to%20WatchOnlyBitcoinWallet%20project"; | ||
|
||
public BindableCommand<string> CopyCommand { get; } | ||
private void Copy(string s) | ||
{ | ||
clipboard?.SetTextAsync(s); | ||
} | ||
} | ||
} |
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,73 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:vm="using:WatchOnlyBitcoinWallet.ViewModels" | ||
mc:Ignorable="d" | ||
x:Class="WatchOnlyBitcoinWallet.Views.AboutView" | ||
Height="285" Width="300" | ||
FontSize="14"> | ||
|
||
<Design.DataContext> | ||
<vm:AboutViewModel/> | ||
</Design.DataContext> | ||
|
||
<Grid RowDefinitions="auto,auto,auto,auto,auto,auto,*"> | ||
<TextBlock Text="Watch Only Bitcoin Wallet" VerticalAlignment="Top" | ||
FontFamily="Comic Sans MS" FontSize="22" FontWeight="Bold" | ||
HorizontalAlignment="Center" | ||
Margin="0,10,0,0" | ||
Grid.Row="0"/> | ||
<TextBlock Text="{Binding VersionString}" | ||
FontFamily="Comic Sans MS" FontSize="18" FontWeight="Bold" | ||
HorizontalAlignment="Center" | ||
Grid.Row="1"/> | ||
<TextBlock Text="by Coding Enthusiast" | ||
FontFamily="Comic Sans MS" FontSize="16" FontWeight="Bold" | ||
HorizontalAlignment="Center" | ||
Grid.Row="2"/> | ||
<TextBlock Text="Button icons by icons8.com" | ||
FontFamily="Comic Sans MS" FontSize="12" FontWeight="Bold" | ||
Margin="0,10,0,0" | ||
HorizontalAlignment="Center" | ||
Grid.Row="3"/> | ||
|
||
<HyperlinkButton Content="Github Repository Link" | ||
NavigateUri="https://github.com/Coding-Enthusiast/Watch-Only-Bitcoin-Wallet" | ||
Margin="0,15,0,0" | ||
Grid.Row="4"/> | ||
|
||
<HyperlinkButton Content="BitcoinTalk.org Announcement Link" | ||
NavigateUri="https://bitcointalk.org/index.php?topic=1616888.0" | ||
Grid.Row="5"/> | ||
|
||
<Grid ColumnDefinitions="*,auto,auto" RowDefinitions="auto,auto" Grid.Row="6"> | ||
<TextBox Text="{Binding Address1}" | ||
IsReadOnly="True" | ||
FontSize="11" | ||
Margin="3" | ||
Grid.Column="0" Grid.Row="0"/> | ||
<Button Content="Copy" | ||
Command="{Binding CopyCommand}" | ||
CommandParameter="{Binding Address1}" | ||
Grid.Column="1" Grid.Row="0"/> | ||
<HyperlinkButton Content="Donate" | ||
NavigateUri="{Binding DonateUri1}" | ||
Grid.Column="2" Grid.Row="0"/> | ||
|
||
<TextBox Text="{Binding Address2}" | ||
IsReadOnly="True" | ||
FontSize="11" | ||
Margin="3" | ||
Grid.Column="0" Grid.Row="1"/> | ||
<Button Content="Copy" | ||
Command="{Binding CopyCommand}" | ||
CommandParameter="{Binding Address2}" | ||
Grid.Column="1" Grid.Row="1"/> | ||
<HyperlinkButton Content="Donate" | ||
NavigateUri="{Binding DonateUri2}" | ||
Grid.Column="2" Grid.Row="1"/> | ||
</Grid> | ||
|
||
</Grid> | ||
</UserControl> |
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,17 @@ | ||
// WatchOnlyBitcoinWallet | ||
// Copyright (c) 2016 Coding Enthusiast | ||
// Distributed under the MIT software license, see the accompanying | ||
// file LICENCE or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
using Avalonia.Controls; | ||
|
||
namespace WatchOnlyBitcoinWallet.Views | ||
{ | ||
public partial class AboutView : UserControl | ||
{ | ||
public AboutView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |