예제 #1
0
        private async void GetNodeList(object sender, RoutedEventArgs e)
        {
            TransactionProtocol protocol = new TransactionProtocol();

            string[] nodeList = await protocol.GetAllNode();

            if (nodeList[0] != "")
            {
                RadioButton originalRadioButton = new RadioButton()
                {
                    Content   = XmlManager.GetHttp(),
                    IsChecked = true,
                };

                originalRadioButton.Checked += OnSelect;

                spNodeList.Children.Add(originalRadioButton);

                for (int index = 0; index < nodeList.Length; index++)
                {
                    RadioButton radioButton = new RadioButton();
                    radioButton.Content  = $"{nodeList[index]}/";
                    radioButton.Checked += OnSelect;
                    spNodeList.Children.Add(radioButton);
                }
            }
            else
            {
                MessageBox.Show("Timeout", "Error");
            }
        }
예제 #2
0
 public TransactionProtocol()
 {
     URL      = XmlManager.GetHttp();
     Response = "";
 }
예제 #3
0
 public SettingWindow()
 {
     InitializeComponent();
     txtHostname.Text    = XmlManager.GetHttp();
     txtDefaultName.Text = "Default URL: http://localhost:3000/";
 }