Beispiel #1
0
        private async void SubmitImpl()
        {
            var path = $"{Exchange.ExchangeName}-{Name}.hash";

            ExchangeApiCore.SaveApiKeys(path, ApiKey, ApiSecret);
            var reg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey($@"Software\wallace\Terminal.WPF\{Exchange.ExchangeName}\Accounts", writable: true);

            ExchangeApiCore.SaveApiKeys(reg, Name, ApiKey, ApiSecret);
            var ok = await CloseDialog.Handle(Unit.Default);
        }
 protected void OnResponse(object o, Gtk.ResponseArgs args)
 {
     if (args.ResponseId == Gtk.ResponseType.Ok)
     {
         ApiKey = new SecureString();
         foreach (var ch in entryApiKey.Text)
         {
             ApiKey.AppendChar(ch);
         }
         ApiSecret = new SecureString();
         foreach (var ch in entryApiSecret.Text)
         {
             ApiSecret.AppendChar(ch);
         }
         ExchangeApiCore.SaveApiKeys(System.IO.Path.ChangeExtension(entryFileName.Text, ".hash").ToLower(), ApiKey, ApiSecret);
     }
 }