Skip to content

Commit

Permalink
Fix copy & export in resource viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
laqieer committed Sep 8, 2024
1 parent a8df85b commit 7aefc19
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
44 changes: 22 additions & 22 deletions FEBuilderGBA/ResourceForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions FEBuilderGBA/ResourceForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e)
UpdateResources();
}

private void button1_Click(object sender, EventArgs e)
private void ClipbordButton_Click(object sender, EventArgs e)
{
// Copy text to clipboard
Clipboard.SetText(this.resources.Text);
// Copy to clipboard
U.SetClipboardText(this.resources.Text);
}

private void button2_Click(object sender, EventArgs e)
private void SaveButton_Click(object sender, EventArgs e)
{
// Save text to file
// Save to file
string title = R._("保存するファイル名を選択してください");
string filter = R._("テキストファイル(*.txt)|*.txt|TSVファイル(*.tsv)|*.tsv|All files|*");

Expand All @@ -66,6 +66,11 @@ private void button2_Click(object sender, EventArgs e)
save.FilterIndex = 1;
if (save.ShowDialog() == DialogResult.OK)
{
if (save.FileNames.Length <= 0 || !U.CanWriteFileRetry(save.FileName))
{
return;
}
Program.LastSelectedFilename.Save(this, "", save);
U.WriteAllText(save.FileName, this.resources.Text);
U.OpenURLOrFile(save.FileName);
}
Expand Down

1 comment on commit 7aefc19

@laqieer
Copy link
Owner Author

@laqieer laqieer commented on 7aefc19 Sep 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Please sign in to comment.