Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions BK7231Flasher/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,14 +1617,43 @@ private void buttonIPScannerOpenDir_Click(object sender, EventArgs e)

private void buttonTuyaConfig_CopyJSONToClipBoard_Click(object sender, EventArgs e)
{
Clipboard.SetText(textBoxTuyaCFGJSON.Text);
string text = textBoxTuyaCFGJSON?.Text;
if (string.IsNullOrEmpty(text))
{
MessageBox.Show("No JSON text available to copy.", "Copy to clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
try
{
Clipboard.SetText(text);
}
catch (Exception ex)
{
MessageBox.Show("Failed to copy to clipboard: " + ex.Message, "Clipboard error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}

private void buttonTuyaConfig_CopyTextToClipBoard_Click(object sender, EventArgs e)
{
Clipboard.SetText(textBoxTuyaCFGText.Text);
string text = textBoxTuyaCFGText?.Text;
if (string.IsNullOrEmpty(text))
{
MessageBox.Show("No text description available to copy.", "Copy to clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
try
{
Clipboard.SetText(text);
}
catch (Exception ex)
{
MessageBox.Show("Failed to copy to clipboard: " + ex.Message, "Clipboard error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}

private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=WunlqIMAdgw");
Expand Down