-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Ko1ors/drag&drop
Drag&Drop, Dynamic Settings, ETH Module
- Loading branch information
Showing
48 changed files
with
1,621 additions
and
281 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
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,16 @@ | ||
namespace ETCModule.Settings | ||
{ | ||
public class Constants | ||
{ | ||
public class Menu | ||
{ | ||
public const string MenuKey = "etcModuleSettings"; | ||
} | ||
|
||
public class Parameters | ||
{ | ||
public const string Wallet = "etcWallet"; | ||
public const string UpdateTime = "etcUpdateTime"; | ||
} | ||
} | ||
} |
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 @@ | ||
using ModularWidget; | ||
|
||
namespace ETCModule.Settings | ||
{ | ||
internal static class SettingsExtension | ||
{ | ||
public static T Get<T>(this AppSettings settings, string parameterKey) | ||
{ | ||
return settings.Get<T>(Constants.Menu.MenuKey, parameterKey); | ||
} | ||
|
||
public static object Get(this AppSettings settings, string parameterKey) | ||
{ | ||
return settings.GetParameter(Constants.Menu.MenuKey, parameterKey)?.Value; | ||
} | ||
} | ||
} |
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,10 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class BlockReward : Root | ||
{ | ||
[JsonProperty("result")] | ||
public BlockRewardResult Result; | ||
} | ||
} |
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,26 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class BlockRewardResult | ||
{ | ||
[JsonProperty("blockNumber")] | ||
public string BlockNumber; | ||
|
||
[JsonProperty("timeStamp")] | ||
public string TimeStamp; | ||
|
||
[JsonProperty("blockMiner")] | ||
public string BlockMiner; | ||
|
||
[JsonProperty("blockReward")] | ||
public string BlockReward; | ||
|
||
[JsonProperty("uncles")] | ||
public List<object> Uncles; | ||
|
||
[JsonProperty("uncleInclusionReward")] | ||
public string UncleInclusionReward; | ||
} | ||
} |
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,13 @@ | ||
namespace ETHModule.Data | ||
{ | ||
public class ETHCompositeModel | ||
{ | ||
public EthPrice EthPrice { get; set; } | ||
|
||
public EthGasPrice EthGasPrice { get; set; } | ||
|
||
public double AvgBlockReward { get; set; } | ||
|
||
public double WalletBalance { get; set; } | ||
} | ||
} |
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,10 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class EthGasPrice : Root | ||
{ | ||
[JsonProperty("result")] | ||
public EthGasPriceResult Result; | ||
} | ||
} |
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,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class EthGasPriceResult | ||
{ | ||
[JsonProperty("LastBlock")] | ||
public string LastBlock; | ||
|
||
[JsonProperty("SafeGasPrice")] | ||
public string SafeGasPrice; | ||
|
||
[JsonProperty("ProposeGasPrice")] | ||
public string ProposeGasPrice; | ||
|
||
[JsonProperty("FastGasPrice")] | ||
public string FastGasPrice; | ||
} | ||
} |
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,10 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class EthPrice : Root | ||
{ | ||
[JsonProperty("result")] | ||
public EthPriceResult Result; | ||
} | ||
} |
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,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class EthPriceResult | ||
{ | ||
[JsonProperty("ethbtc")] | ||
public string Ethbtc; | ||
|
||
[JsonProperty("ethbtc_timestamp")] | ||
public string EthbtcTimestamp; | ||
|
||
[JsonProperty("ethusd")] | ||
public string Ethusd; | ||
|
||
[JsonProperty("ethusd_timestamp")] | ||
public string EthusdTimestamp; | ||
} | ||
} |
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,13 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public abstract class Root | ||
{ | ||
[JsonProperty("status")] | ||
public string Status; | ||
|
||
[JsonProperty("message")] | ||
public string Message; | ||
} | ||
} |
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,10 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ETHModule.Data | ||
{ | ||
public class WalletBalance : Root | ||
{ | ||
[JsonProperty("result")] | ||
public string Result; | ||
} | ||
} |
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,61 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<OutputType>Library</OutputType> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<UseWPF>true</UseWPF> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<OutputPath>..\ModularWidget\bin\Debug\Modules\</OutputPath> | ||
<LangVersion>8.0</LangVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>..\ModularWidget\bin\Release\Modules\</OutputPath> | ||
<LangVersion>8.0</LangVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Remove="Images\block-icon.svg" /> | ||
<None Remove="Images\ethereumLogo.svg" /> | ||
<None Remove="Images\ethwallet-icon.png" /> | ||
<None Remove="Images\ethwallet-icon2.png" /> | ||
<None Remove="Images\gas-icon.svg" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\ModularWidget\ModularWidget.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Resource Include="Images\block-icon.svg"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Resource> | ||
<Resource Include="Images\ethereumLogo.svg"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Resource> | ||
<Resource Include="Images\ethwallet-icon.png" /> | ||
<Resource Include="Images\ethwallet-icon2.png" /> | ||
<Resource Include="Images\gas-icon.svg"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Resource> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Page Update="UserControls\BlockRewardUC.xaml"> | ||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | ||
</Page> | ||
<Page Update="UserControls\EthPriceUC.xaml"> | ||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | ||
</Page> | ||
<Page Update="UserControls\EthWalletBalanceUC.xaml"> | ||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | ||
</Page> | ||
<Page Update="UserControls\GasTrackerUC.xaml"> | ||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | ||
</Page> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.