mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Quality of Life improvements to DialogCustomInput
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<StackPanel Height="100" Width="490" Margin="5">
|
<StackPanel Height="100" Width="490" Margin="5">
|
||||||
<TextBox x:Name="questionTextbox" Text="PLACEHOLDER" BorderThickness="0" Background="Transparent" IsReadOnly="True"/>
|
<TextBox x:Name="questionTextbox" Text="PLACEHOLDER" BorderThickness="0" Background="Transparent" IsReadOnly="True"/>
|
||||||
<TextBox x:Name="answerTextbox"/>
|
<TextBox x:Name="answerTextbox" KeyDown="answerTextbox_KeyDown" />
|
||||||
<Button x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="0 5 0 0"/>
|
<Button x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="0 5 0 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace OpenBullet
|
|||||||
Caller = caller;
|
Caller = caller;
|
||||||
VariableName = variableName;
|
VariableName = variableName;
|
||||||
questionTextbox.Text = question;
|
questionTextbox.Text = question;
|
||||||
|
answerTextbox.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void acceptButton_Click(object sender, RoutedEventArgs e)
|
private void acceptButton_Click(object sender, RoutedEventArgs e)
|
||||||
@@ -37,5 +38,13 @@ namespace OpenBullet
|
|||||||
}
|
}
|
||||||
((MainDialog)Parent).Close();
|
((MainDialog)Parent).Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void answerTextbox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key == System.Windows.Input.Key.Return)
|
||||||
|
{
|
||||||
|
acceptButton_Click(sender, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user