ux: add response values and stock types to appropriate buttons

This commit is contained in:
Michael Becker 2019-07-30 23:20:47 -04:00
parent 5f0d27bbea
commit 85957abded

View File

@ -54,18 +54,21 @@ namespace UniversalEditor.UserInterface.Dialogs
{
base.OnCreating(e);
this.Buttons[0].ResponseValue = (int)DialogResult.OK;
this.Buttons [0].ResponseValue = (int)DialogResult.OK;
this.Buttons [1].ResponseValue = (int)DialogResult.Cancel;
switch (Mode)
{
case DocumentPropertiesDialogMode.Open:
{
this.Text = "Open Document";
this.Buttons [0].StockType = ButtonStockType.Open;
break;
}
case DocumentPropertiesDialogMode.Save:
{
this.Text = "Save Document";
this.Buttons [0].StockType = ButtonStockType.Save;
break;
}
}