Skip to content
Draft
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
6 changes: 3 additions & 3 deletions ThorgApp/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@
<value>n1.mining-proxy.imapp.pl:8073</value>
</setting>
<setting name="dialog_antivir_message" serializeAs="String">
<value>Your antivirus is blocking Thorg's mining module called “EthDcrMiner64.exe”. If you do not have antivirus software installed you can unblock this by going to your Windows Security settings, and then clicking on Virus and Threat Protections.
<value>Your antivirus is blocking Thorg's mining module called “EthDcrMiner64.exe”. If you do not have antivirus software installed you can unblock this by going to your Windows Security settings, and then clicking on Virus and Threat Protections.
If it doesn't help you might want to restart Thorg after changing settings in your antivirus.</value>
</setting>
<setting name="dialog_gpu_message" serializeAs="String">
<value>No worries though! We will soon release an update with support for cards that have less than 6B of RAM. Also, stay tuned for CPU support that is just around the corner.
<value>No worries though! We will soon release an update with support for cards that have less than 6B of RAM. Also, stay tuned for CPU support that is just around the corner.
Till then you can explore the app and get to know Thorg a bit better!</value>
</setting>
<setting name="dialog_wallet_message" serializeAs="String">
<value>Thorg is most suited for addresses that the user has custody of, compared to some other individual than the Thorg user (such as a centralized exchange) having custody of the address.
<value>Thorg is most suited for addresses that the user has custody of, compared to some other individual than the Thorg user (such as a centralized exchange) having custody of the address.
Most exchanges do not support L2 payments like Polygon that Thorg uses. Please change your wallet address to one that you're in control of, such as MetaMask.</value>
</setting>
</GolemUI.Properties.Settings>
Expand Down
2 changes: 2 additions & 0 deletions ThorgApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ private void ConfigureServices(IServiceCollection services)
services.AddTransient(typeof(ViewModel.CustomControls.NotificationBarViewModel));
services.AddTransient(typeof(ViewModel.StatisticsViewModel));
services.AddTransient(typeof(ViewModel.TRexViewModel));
services.AddTransient(typeof(ViewModel.CharityViewModel));

services.AddTransient(typeof(DashboardMain));
services.AddTransient(typeof(NotificationBar));
services.AddTransient(typeof(DashboardSettings));
services.AddTransient(typeof(DashboardSettingsAdv));
services.AddTransient(typeof(DashboardStatistics));
services.AddTransient(typeof(DashboardTRex));
services.AddTransient(typeof(DashboardCharity));

services.AddTransient(typeof(SettingsViewModel));
services.AddTransient(typeof(SettingsAdvViewModel));
Expand Down
12 changes: 12 additions & 0 deletions ThorgApp/Command/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public class Config

[JsonProperty("account")]
public string? Account { get; set; }
[JsonProperty("charity_wallet")]
public string? CharityAccount { get; set; }
[JsonProperty("charity_percentage")]
public double? CharityAmmount { get; set; }

}

Expand Down Expand Up @@ -199,6 +203,14 @@ public Config? Config
{
cmd.Append(" --account \"").Append(value.Account).Append('"');
}
if (value.CharityAccount != null)
{
cmd.Append(" --charity-wallet \"").Append(value.CharityAccount).Append('"');
}
if (value.CharityAmmount != null)
{
cmd.Append(" --charity-percentage \"").Append(value.CharityAmmount).Append('"');
}
var _none = this.ExecToText(cmd.ToString());
}
}
Expand Down
15 changes: 15 additions & 0 deletions ThorgApp/DesignViewModel/CharityViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using GolemUI.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GolemUI.DesignViewModel
{
public class CharityViewModel
{
public string CharityWallet => "xearwag0ag5s4ge8";
public double CharityPercentage => 0.2f;
}
}
1 change: 1 addition & 0 deletions ThorgApp/Interfaces/IProviderConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface IProviderConfig : INotifyPropertyChanged
public void UpdateActiveCpuThreadsCount(int threadsCount);
void UpdateWalletAddress(string? walletAddress = null);
void UpdateNodeName(string? value);
void UpdateCharity(string? wallet, double? procentage);

Task Prepare(bool isGpuCapable, bool isLowMemoryMode);
}
Expand Down
4 changes: 2 additions & 2 deletions ThorgApp/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ThorgApp/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
<Value Profile="(Default)">n1.mining-proxy.imapp.pl:8073</Value>
</Setting>
<Setting Name="dialog_antivir_message" Type="System.String" Scope="Application">
<Value Profile="(Default)">Your antivirus is blocking Thorg's mining module called “EthDcrMiner64.exe”. If you do not have antivirus software installed you can unblock this by going to your Windows Security settings, and then clicking on Virus and Threat Protections.
<Value Profile="(Default)">Your antivirus is blocking Thorg's mining module called “EthDcrMiner64.exe”. If you do not have antivirus software installed you can unblock this by going to your Windows Security settings, and then clicking on Virus and Threat Protections.
If it doesn't help you might want to restart Thorg after changing settings in your antivirus.</Value>
</Setting>
<Setting Name="dialog_gpu_message" Type="System.String" Scope="Application">
<Value Profile="(Default)">No worries though! We will soon release an update with support for cards that have less than 6B of RAM. Also, stay tuned for CPU support that is just around the corner.
<Value Profile="(Default)">No worries though! We will soon release an update with support for cards that have less than 6B of RAM. Also, stay tuned for CPU support that is just around the corner.
Till then you can explore the app and get to know Thorg a bit better!</Value>
</Setting>
<Setting Name="dialog_wallet_message" Type="System.String" Scope="Application">
<Value Profile="(Default)">Thorg is most suited for addresses that the user has custody of, compared to some other individual than the Thorg user (such as a centralized exchange) having custody of the address.
<Value Profile="(Default)">Thorg is most suited for addresses that the user has custody of, compared to some other individual than the Thorg user (such as a centralized exchange) having custody of the address.
Most exchanges do not support L2 payments like Polygon that Thorg uses. Please change your wallet address to one that you're in control of, such as MetaMask.</Value>
</Setting>
</Settings>
Expand Down
1 change: 0 additions & 1 deletion ThorgApp/Src/BenchmarkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using System.Windows;
using GolemUI.Miners.Phoenix;
using GolemUI.Miners.TRex;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;

namespace GolemUI.Src
{
Expand Down
35 changes: 25 additions & 10 deletions ThorgApp/Src/ProviderConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ public async Task Prepare(bool isGpuCapable, bool isLowMemoryMode)
{ "invalid-share", 0m },
{ "hash-rate", 0m }
}), out _args, out _info);
/* if (isGpuCapable)
{
_provider.ActivatePreset("hminer");
changedProperties.Add("IsMiningActive");
}*/
/* if (isGpuCapable)
{
_provider.ActivatePreset("hminer");
changedProperties.Add("IsMiningActive");
}*/
}
else
{
Expand All @@ -195,11 +195,11 @@ public async Task Prepare(bool isGpuCapable, bool isLowMemoryMode)
{ "invalid-share", 0m },
{ "hash-rate", 0m }
}), out _args, out _info);
/* if (isGpuCapable)
{
_provider.ActivatePreset("gminer");
changedProperties.Add("IsMiningActive");
}*/
/* if (isGpuCapable)
{
_provider.ActivatePreset("gminer");
changedProperties.Add("IsMiningActive");
}*/
}
else
{
Expand Down Expand Up @@ -282,5 +282,20 @@ public async Task Prepare(bool isGpuCapable, bool isLowMemoryMode)
}
}
}

public void UpdateCharity(string? charityAccount, double? charityAmmount)
{
var config = Config ?? _provider.Config;
if (config != null)
{
config.CharityAccount = charityAccount;
config.CharityAmmount = charityAmmount;
_provider.Config = Config;
}
OnPropertyChanged("Config");
OnPropertyChanged("CharityWallet");
OnPropertyChanged("CharityAmmount");
}

}
}
16 changes: 16 additions & 0 deletions ThorgApp/ThorgApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="DesignViewModel\CharityViewModel.cs" />
<Compile Include="DesignViewModel\DesignTRexViewModel.cs" />
<Compile Include="Miners\BenchmarkGpuStatus.cs" />
<Compile Include="Miners\BenchmarkLiveStatus.cs" />
Expand Down Expand Up @@ -136,6 +137,9 @@
<Compile Include="Src\Sentry\SentryContext.cs" />
<Compile Include="Src\Sentry\SentryUserFeedback.cs" />
<Compile Include="Src\StartWithWindows.cs" />
<Compile Include="UI\DashboardCharity.xaml.cs">
<DependentUpon>DashboardCharity.xaml</DependentUpon>
</Compile>
<Compile Include="UI\DashboardTRex.xaml.cs">
<DependentUpon>DashboardTRex.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -288,9 +292,11 @@
<DependentUpon>UsageDescription.xaml</DependentUpon>
</Compile>
<Compile Include="Validators\NonEmptyStringValidator.cs" />
<Compile Include="Validators\PercentageValueValidator.cs" />
<Compile Include="Validators\TransferAmountValidator.cs" />
<Compile Include="Validators\NodeNameValidator.cs" />
<Compile Include="Validators\EthAddrValidator.cs" />
<Compile Include="ViewModel\CharityViewModel.cs" />
<Compile Include="ViewModel\CustomControls\NotificationBar\NotificationBarNotification.cs" />
<Compile Include="ViewModel\CustomControls\NotificationBar\NotificationBarViewModel.cs" />
<Compile Include="ViewModel\CustomControls\NotificationBar\NotificationState.cs" />
Expand Down Expand Up @@ -339,6 +345,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UI\DashboardCharity.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UI\DashboardTRex.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -992,5 +1002,11 @@
<ItemGroup>
<Folder Include="Utils\" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Icons\DefaultStyle\png\Charity.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\heart-icon.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
1 change: 1 addition & 0 deletions ThorgApp/UI/Dashboard.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<RadioButton ToolTip="Dashboard" IsChecked="{Binding Path=SelectedPage, Converter={StaticResource RadioBoolToIntConverter}, ConverterParameter=1}" GroupName="nav" Style="{StaticResource NavSidepanelButtonDashboard}"/>
<RadioButton ToolTip="Wallet" IsChecked="{Binding Path=SelectedPage, Converter={StaticResource RadioBoolToIntConverter}, ConverterParameter=3}" GroupName="nav" Style="{StaticResource NavSidepanelButtonWallet}"/>
<RadioButton ToolTip="Settings" IsChecked="{Binding Path=SelectedPage, Converter={StaticResource RadioBoolToIntConverter}, ConverterParameter=2}" GroupName="nav" Style="{StaticResource NavSidepanelButtonSettings}"/>
<RadioButton ToolTip="Charity" IsChecked="{Binding Path=SelectedPage, Converter={StaticResource RadioBoolToIntConverter}, ConverterParameter=6}" GroupName="nav" Style="{StaticResource NavSidepanelButtonCharity}" Margin="0,0,0,40"/>
<!--<RadioButton ToolTip="TRex" IsChecked="{Binding Path=SelectedPage, Converter={StaticResource RadioBoolToIntConverter}, ConverterParameter=5}" GroupName="nav" Style="{StaticResource NavSidepanelButtonSettings}"/>-->
</StackPanel>
</Border>
Expand Down
1 change: 1 addition & 0 deletions ThorgApp/UI/Dashboard.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public partial class Dashboard : Window
public Dashboard(DashboardSettingsAdv _dashboardSettingsAdv, INotificationService notificationService, IUserFeedbackService userFeedback, Interfaces.IProcessController processController, Src.SingleInstanceLock singleInstanceLock, Interfaces.IProviderConfig providerConfig, Src.BenchmarkService benchmarkService, Interfaces.IUserSettingsProvider userSettingsProvider, ViewModel.DashboardViewModel dashboardViewModel, NotificationBarViewModel notificationViewModel,
PhoenixMiner phoenixMiner, TRexMiner trexMiner)
{

_phoenixMiner = phoenixMiner;
_trexMiner = trexMiner;

Expand Down
Loading