private void XayaNameUtility_Load(object sender, EventArgs e)
        {
            // This is to just be able to close the wallet and not have to do any reconfig.
            // That is, we'll always have the correct password even across restarts.
            CookieReader cookie = new CookieReader();

            Console.WriteLine("Username = "******"Userpassword = "******"XAYA_DaemonUrl"]; //  + "/wallet/game.dat";
            rpcUsername                = cookie.Username;                                    //  ConfigurationManager.AppSettings["XAYA_RpcUsername"]; //
            rpcPassword                = cookie.Userpassword;                                //  ConfigurationManager.AppSettings["XAYA_RpcPassword"]; //
            walletPassword             = ConfigurationManager.AppSettings["XAYA_WalletPassword"];
            rpcRequestTimeoutInSeconds = 60;

            //daemonUrl = "http://localhost:8396/wallet/game.dat";
            //rpcUsername = "******";
            //rpcPassword = "******";
            //walletPassword = "******";
            //rpcRequestTimeoutInSeconds = 60;

            xayaCoinService = new XAYAService(daemonUrl, rpcUsername, rpcPassword, walletPassword, rpcRequestTimeoutInSeconds);

            this.Text = xayaCoinService.GetBlockCount().ToString();

            foreach (var v in xayaCoinService.GetPeerInfo())
            {
                Console.WriteLine(v.Version);
            }

            // Load wallet settings into combobox
            PopulateWalletComboBox(string.Empty);
        }
Пример #2
0
        private void GetCookieUserPass()
        {
            CookieReader cookieReader = new CookieReader();

            txtRpcUsername.Text = cookieReader.Username;
            txtRpcPassword.Text = cookieReader.Userpassword;
        }