示例#1
0
文件: Main.cs 项目: srowlison/bbiller
        public Main()
        {
            InitializeComponent();
            try
            {
                nfc = Factory.GetNFC();
                String hotWalletAddress = cardClient.GetHotWalletAddress();

                if (!String.IsNullOrEmpty(hotWalletAddress))
                {
                    // No Sale or Transfers
                    btnSell.Enabled = false;
                }

                this.Settings       = diagnosticClient.GetSettings(this.TerminalId);
                this.CryptoCurrency = new Models.Bitcoin(this.Settings.DefaultFiatCurrency);
                using (DCExchange.ExchangeClient ExchangeClient = new DCExchange.ExchangeClient())
                {
                    this.AtmMargin = ExchangeClient.GetMargin(this.Settings.DefaultFiatCurrency, this.TerminalId);
                }
            }
            catch (Exception ex)
            {
                GeneralExceptions("Initialise", System.Diagnostics.TraceEventType.Critical, ex);
            }
        }
 /**
  * Set the delegate implementation.
  *
  * @param _delegate The delegate implementing platform specific functions.
  */
 public void SetDelegate(INFC _delegate)
 {
     this._delegate = _delegate;
 }
 /**
  * Constructor with delegate.
  *
  * @param _delegate The delegate implementing platform specific functions.
  */
 public NFCBridge(INFC _delegate) : base()
 {
     this._delegate = _delegate;
 }