debugging added
This commit is contained in:
parent
bf23503d67
commit
4bae07d36c
@ -13,7 +13,7 @@
|
||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
<Version>5.1.4.1</Version>
|
||||
<Version>5.1.5.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -12,10 +12,14 @@ namespace LibationWinForms.Dialogs.Login
|
||||
{
|
||||
public partial class MfaDialog : Form
|
||||
{
|
||||
private RadioButton[] radioButtons { get; }
|
||||
|
||||
public MfaDialog(AudibleApi.MfaConfig mfaConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
radioButtons = new[] { this.radioButton1, this.radioButton2, this.radioButton3 };
|
||||
|
||||
// optional string settings
|
||||
if (!string.IsNullOrWhiteSpace(mfaConfig.Title))
|
||||
this.Text = mfaConfig.Title;
|
||||
@ -37,13 +41,21 @@ namespace LibationWinForms.Dialogs.Login
|
||||
radioButton3.Tag = mfaConfig.Button3Value;
|
||||
}
|
||||
|
||||
|
||||
public string SelectedName { get; private set; }
|
||||
public string SelectedValue { get; private set; }
|
||||
private void submitBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
var radioButtons = new[] { this.radioButton1, this.radioButton2, this.radioButton3 };
|
||||
Serilog.Log.Logger.Debug("RadioButton states: {@DebugInfo}", new {
|
||||
rb1_checked = radioButton1.Checked,
|
||||
r21_checked = radioButton2.Checked,
|
||||
rb3_checked = radioButton3.Checked
|
||||
});
|
||||
|
||||
var selected = radioButtons.Single(rb => rb.Checked);
|
||||
|
||||
Serilog.Log.Logger.Debug("Selected: {@DebugInfo}", new { isSelected = selected is not null, name = selected?.Name, value = selected?.Tag });
|
||||
|
||||
SelectedName = selected.Name;
|
||||
SelectedValue = (string)selected.Tag;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user