ItemSelectionPopUp - Changed accessibility to label text and button text

This commit is contained in:
miku-666
2023-08-30 18:47:40 +02:00
parent 993d625330
commit 00669c1c45
5 changed files with 19 additions and 7 deletions

View File

@@ -89,8 +89,8 @@
#endregion
private System.Windows.Forms.Button cancelButton;
public System.Windows.Forms.Label label2;
public System.Windows.Forms.Button okBtn;
private MetroFramework.Controls.MetroComboBox ComboBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button okBtn;
}
}

View File

@@ -7,6 +7,17 @@ namespace PckStudio.Forms.Additional_Popups
{
public string SelectedItem => DialogResult == DialogResult.OK ? ComboBox.Text : string.Empty;
public string LabelText
{
get => label2.Text;
set => label2.Text = value;
}
public string ButtonText
{
get => okBtn.Text;
set => okBtn.Text = value;
}
public ItemSelectionPopUp(params string[] items)
{
InitializeComponent();

View File

@@ -182,6 +182,7 @@ namespace PckStudio.Forms.Editor
public ANIMEditor(SkinANIM skinANIM) : this()
{
initialANIM = skinANIM;
setDisplayAnim(skinANIM);
ruleset.ApplyAnim(skinANIM);
}
@@ -345,8 +346,8 @@ namespace PckStudio.Forms.Editor
private void templateButton_Click(object sender, EventArgs e)
{
var diag = new ItemSelectionPopUp(Templates.Keys.ToArray());
diag.label2.Text = "Presets";
diag.okBtn.Text = "Load";
diag.ButtonText = "Presets";
diag.ButtonText = "Load";
if (diag.ShowDialog() != DialogResult.OK)
return;

View File

@@ -577,7 +577,7 @@ namespace PckStudio.Forms.Editor
if (available.Length > 0)
{
using ItemSelectionPopUp add = new ItemSelectionPopUp(available);
add.okBtn.Text = "Save";
add.ButtonText = "Save";
if (add.ShowDialog() != DialogResult.OK) return;
audioFile.RemoveCategory(category.audioType);

View File

@@ -50,8 +50,8 @@ namespace PckStudio.Forms.Editor
private void PromptForCompressionType()
{
ItemSelectionPopUp dialog = new ItemSelectionPopUp("Wii U, PS Vita", "PS3", "Xbox 360");
dialog.label2.Text = "Type";
dialog.okBtn.Text = "Ok";
dialog.LabelText = "Type";
dialog.ButtonText = "Ok";
if (dialog.ShowDialog() == DialogResult.OK)
{
switch(dialog.SelectedItem)