private void connectionModeLogic() { if (!this.validateConnectionModePage()) { return; } var settings = Settings.Instance; this.conModePage = (ConnectionModePage)this.frame1.Content; settings.RootDPOName = this.conModePage.RootDPONameText.Text; settings.DpoLifetime = int.Parse(this.conModePage.LifetimeText.Text); settings.OwnerAddress = this.conModePage.OwnerAddressText.Text; settings.WalletPassphrase = this.conModePage.WalletPassphrase.Password; if (this.conModePage.localWalletBtn.IsChecked.Value) { this.frame1.Content = this.localModePage; this.nextBtn.Content = "Finish"; } else if (this.conModePage.RemoteWalletBtn.IsChecked.Value) { if (settings != null) { this.remoteSettingsPage.HostText.Text = settings.Host; this.remoteSettingsPage.PortNumberText.Text = settings.Port; this.remoteSettingsPage.UsernameText.Text = settings.Username; this.remoteSettingsPage.RpcPassword.Password = settings.RpcPassword; this.nextBtn.Content = "Finish"; } this.frame1.Content = this.remoteSettingsPage; } }
public SettingsWizardWindow() { this.InitializeComponent(); this.StatusTextBlock.Text = string.Empty; this.success = false; this.conModePage = new ConnectionModePage(); this.conModePage.localWalletBtn.IsChecked = true; this.frame1.Content = this.conModePage; Settings.ReadSettings(); this.conModePage.RootDPONameText.Text = Settings.Instance.RootDPOName; this.conModePage.LifetimeText.Text = Settings.Instance.DpoLifetime.ToString(); this.conModePage.OwnerAddressText.Text = Settings.Instance.OwnerAddress; this.conModePage.WalletPassphrase.Password = Settings.Instance.WalletPassphrase; this.remoteSettingsPage = new DefineSettingsPage(); this.localModePage = new LocalModePage(); }