Beispiel #1
0
        public void GetApplicationModels(
            RemotingService sender,
            string clientAddress,
            string signature,
            out Data.Transfer.Device[] devices,
            out PoolGroup[] configurations,
            out bool mining,
            out bool hasChanges,
            out bool dynamicIntensity)
        {
            ModelEventArgs ea = new ModelEventArgs();

            ea.IpAddress = clientAddress;
            ea.Signature = signature;

            if (GetModelRequested != null)
            {
                GetModelRequested(sender, ea);
            }

            devices          = ea.Devices.ToArray();
            configurations   = ea.ConfiguredCoins.ToArray();
            mining           = ea.Mining;
            hasChanges       = ea.HasChanges;
            dynamicIntensity = ea.DynamicIntensity;
        }
Beispiel #2
0
 public void RestartMining(RemotingService sender, string clientAddress, string signature)
 {
     if (RestartMiningRequested != null)
     {
         RestartMiningRequested(sender, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #3
0
 public void UpgradeBackendMiner(RemotingService sender, string clientAddress, string signature)
 {
     if (UpgradeBackendMinerRequested != null)
     {
         UpgradeBackendMinerRequested(sender, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #4
0
 public void ToggleDynamicIntensity(RemotingService sender, string clientAddress, string signature, bool enabled)
 {
     if (ToggleDynamicIntensityRequested != null)
     {
         ToggleDynamicIntensityRequested(sender, enabled, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #5
0
 public void ToggleDevices(RemotingService sender, string clientAddress, string signature, IEnumerable <DeviceDescriptor> devices, bool enabled)
 {
     if (ToggleDevicesRequested != null)
     {
         ToggleDevicesRequested(sender, devices, enabled, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #6
0
 public void CancelChanges(RemotingService sender, string clientAddress, string signature)
 {
     if (CancelChangesRequested != null)
     {
         CancelChangesRequested(sender, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #7
0
 public void SetDevicesToCoin(RemotingService sender, string clientAddress, string signature, IEnumerable <DeviceDescriptor> devices, string coinSymbol)
 {
     if (SetDeviceToCoinRequested != null)
     {
         SetDeviceToCoinRequested(sender, devices, coinSymbol, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #8
0
 public void SetAllDevicesToCoin(RemotingService sender, string clientAddress, string signature, string coinSymbol, bool disableStrategies)
 {
     if (SetAllDevicesToCoinRequested != null)
     {
         SetAllDevicesToCoinRequested(sender, coinSymbol, disableStrategies, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #9
0
 public void ScanHardware(RemotingService sender, string clientAddress, string signature)
 {
     if (ScanHardwareRequested != null)
     {
         ScanHardwareRequested(sender, new RemoteCommandEventArgs {
             IpAddress = clientAddress, Signature = signature
         });
     }
 }
Beispiel #10
0
 public void SetCoinConfigurations(
     RemotingService sender,
     string clientAddress,
     string signature,
     Engine.Data.Configuration.Coin[] coinConfigurations)
 {
     if (SetCoinConfigurationsRequested != null)
     {
         SetCoinConfigurationsRequested(sender, coinConfigurations,
                                        new RemoteCommandEventArgs
         {
             IpAddress = clientAddress,
             Signature = signature
         });
     }
 }
Beispiel #11
0
        public void SetApplicationConfiguration(
            RemotingService sender,
            string clientAddress,
            string signature,
            Data.Transfer.Configuration.Application application,
            Data.Transfer.Configuration.Engine engine,
            Data.Transfer.Configuration.Path path,
            Data.Transfer.Configuration.Perks perks)
        {
            ConfigurationEventArgs ea = new ConfigurationEventArgs()
            {
                IpAddress   = clientAddress,
                Signature   = signature,
                Application = application,
                Engine      = engine,
                Path        = path,
                Perks       = perks
            };

            if (SetConfigurationRequested != null)
            {
                SetConfigurationRequested(sender, ea);
            }
        }
Beispiel #12
0
        public void GetApplicationConfiguration(
            RemotingService sender,
            string clientAddress,
            string signature,
            out Data.Transfer.Configuration.Application application,
            out Data.Transfer.Configuration.Engine engine,
            out Data.Transfer.Configuration.Path path,
            out Data.Transfer.Configuration.Perks perks)
        {
            ConfigurationEventArgs ea = new ConfigurationEventArgs();

            ea.IpAddress = clientAddress;
            ea.Signature = signature;

            if (GetConfigurationRequested != null)
            {
                GetConfigurationRequested(sender, ea);
            }

            application = ea.Application;
            engine      = ea.Engine;
            path        = ea.Path;
            perks       = ea.Perks;
        }