Skip to content

Commit

Permalink
Add copy & export to resource viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
laqieer committed Sep 8, 2024
1 parent ee7edaa commit efdd200
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 52 deletions.
130 changes: 78 additions & 52 deletions FEBuilderGBA/ResourceForm.Designer.cs

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

24 changes: 24 additions & 0 deletions FEBuilderGBA/ResourceForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,29 @@ private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e)
this.filter = this.comboBoxEx1.Text;
UpdateResources();
}

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

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

SaveFileDialog save = new SaveFileDialog();
save.Title = title;
save.Filter = filter;
save.AddExtension = true;
save.FilterIndex = 1;
if (save.ShowDialog() == DialogResult.OK)
{
U.WriteAllText(save.FileName, this.resources.Text);
U.OpenURLOrFile(save.FileName);
}
}
}
}
3 changes: 3 additions & 0 deletions FEBuilderGBA/bin/Debug/config/translate/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13845,3 +13845,6 @@ Descending

:フィルター
Filter

:テキストファイル(*.txt)|*.txt|TSVファイル(*.tsv)|*.tsv|All files|*
Text files (*.txt)|*.txt|TSV files (*.tsv)|*.tsv|All files|*
3 changes: 3 additions & 0 deletions FEBuilderGBA/bin/Debug/config/translate/zh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13845,3 +13845,6 @@ This is the destination which you will go to when ChapterID is completed.\r\nDif

:フィルター
筛选

:テキストファイル(*.txt)|*.txt|TSVファイル(*.tsv)|*.tsv|All files|*
文本文件(*.txt)|*.txt|TSV文件(*.tsv)|*.tsv|All files|*

1 comment on commit efdd200

@laqieer
Copy link
Owner Author

@laqieer laqieer commented on efdd200 Sep 8, 2024

Choose a reason for hiding this comment

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

resource viewer

Please sign in to comment.